[OpenSIPS-Users] Some questions about module dispatcher.

Ben Newlin Ben.Newlin at genesys.com
Fri Mar 29 08:19:37 EDT 2019


Hello,

I don’t think the second parameter (algorithm) will accept multiple values as you have. You are indicating that you want to hash over both the call-id and the from uri, which I don’t think is possible. You must choose one.

For the failover, it is described in the documentation [1]: “If the character 'f' in 'flags' is set, the rest of the addresses from the destination set is stored in AVP list. You can use 'ds_next_dst()' to use next address to achieve serial forking to all possible destinations.” So you need to use a failure_route [2] and arm it before you send the request [3]. Then in the failure route you would check the code that was returned [4] and if appropriate use ds_next_dst to select another endpoint to try and send the request back out.

I cannot answer about the “first_hit_counter, I’ve never looked at that before. I will say that we use the dispatcher module to send a lot of traffic and we have never had to reset it or anything, so it is either vary large or the module must handle it.

[1] - https://opensips.org/html/docs/modules/2.4.x/dispatcher.html#func_ds_select_dst
[2] - https://www.opensips.org/Documentation/Script-Routes-2-4
[3] - https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_on_failure
[4] - https://opensips.org/html/docs/modules/2.4.x/tm.html#func_t_check_status


Ben Newlin

From: Users <users-bounces at lists.opensips.org> on behalf of Алексей Хамстр <homstr at gmail.com>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org>
Date: Friday, March 29, 2019 at 8:05 AM
To: "users at lists.opensips.org" <users at lists.opensips.org>
Subject: [OpenSIPS-Users] Some questions about module dispatcher.

Hello.
I wanted to ask, if anybody have some extra information about function
ds_select_dst ("part4 : 2,3", "0,1", "fuD M 5, fuS M 2");
Please, any examples will be appreciated. :-)
How is this working, when we have such komplex parameters? I need to set up
failover in case of any error on my "Active" destinations. For example, what if yate1 have  an error in isdn channel and giving me back code 480, or 500? I need to try next  destination in this case.
And another one question. How big could be "first_hit_counter"?  Maybe i bether sould reset it by cron?

lets say, I have a two gateways
        SET:: 1
                URI:: sip:10.10.128.97:5060<http://10.10.128.97:5060> state=Active first_hit_counter=1828
                URI:: sip:10.10.128.98:5060<http://10.10.128.98:5060> state=Active first_hit_counter=1849
root at sipproxy1:/home/it# opensipsctl dispatcher show
dispatcher gateways
+----+-------+------------------------+--------+-------+--------+----------+-------+-----------------------+
| id | setid | destination            | socket | state | weight | priority | attrs | description           |
+----+-------+------------------------+--------+-------+--------+----------+-------+-----------------------+
|  1 |     1 | sip:10.10.128.97:5062<http://10.10.128.97:5062> |        |     0 | 0      |        1 |       | YATE1    |
|  3 |     1 | sip:10.10.128.98:5062<http://10.10.128.98:5062> |        |     0 | 0      |        1 |       | YATE2    |

Thankyou!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190329/84046890/attachment-0001.html>


More information about the Users mailing list