[OpenSIPS-Users] Displaying the state of the peer in the dispatcher
Denys Pozniak
denys.pozniak at gmail.com
Tue Jan 24 10:58:40 UTC 2023
Hello!
Help me figure out how to set up a dispatcher in the new version of
OpenSIPS.
I need to constantly send SIP OPTIONS ping to all peers and change the
status (mi dlg_list) if there is no answer from someone.
Before I used to operate with flags, but in new versions, they were removed.
Here I added 2 peers (active and fake) into dbtext/dispatcher:
*id(int,auto) setid(int) destination(string) socket(string,null) state(int)
probe_mode(int) weight(string) priority(int) attrs(string)
description(string)*
*0:1:sip\:192.168.100.100::2:1:1:1:'':''**1:1:sip\:127.0.0.1::2:1:1:1:'':''*
*loadmodule "dispatcher.so"*
*modparam("dispatcher", "db_url", "text:///etc/opensips/dbtext")*
*modparam("dispatcher", "ds_ping_method", "OPTIONS")*
*modparam("dispatcher", "ds_ping_from", "sip:ping at dispatcher")*
*modparam("dispatcher", "ds_ping_interval", 1)*
*modparam("dispatcher", "ds_probing_mode", 1)*
*modparam("dispatcher", "options_reply_codes", "501,403,404,400,200")*
But always the *mi ds_list* gives me the status of both as Probing,
although I would expect the status of the fake peer (127.0.0.1) to become
Inactive, the real one should be Active
*# opensips-cli -x mi ds_list *
*{*
* "PARTITIONS": [*
* {*
* "name": "default",*
* "SETS": [*
* {*
* "id": 1,*
* "Destinations": [*
* {*
* "URI": "sip:192.168.100.100",*
* "state": "Probing",*
* "first_hit_counter": 0,*
* "attr": "''",*
* "resolved_addresses": [*
* "192.168.100.100:5060
<http://192.168.100.100:5060>"*
* ]*
* },*
* {*
* "URI": "sip:127.0.0.1",*
* "state": "Probing",*
* "first_hit_counter": 0,*
* "attr": "''",*
* "resolved_addresses": [*
* "127.0.0.1:5060 <http://127.0.0.1:5060>"*
* ]*
--
BR,
Denys Pozniak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230124/d0ddf4d5/attachment.html>
More information about the Users
mailing list