[OpenSIPS-Users] Opensips 1.8 ds_list behavior in dispatcher

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jan 14 10:39:44 CET 2016


Hi Gunjan,

In dispatcher there are 2 storages:
     - primary storage which is in memory
     - secondary storage (read only at startup or reload) which is the DB

First is about synchronizing the 2 storages (from secondary to primary 
via a ds_reload command). AFter that is about which storage you are 
querying for data. Like the "opensipsctl fifo ds_list" (via MI command) 
gets data from memory cache while the "opensipsctl dispatcher show" 
simply dumps db content.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 14.01.2016 03:44, Gunjan Korlekar wrote:
> Hello,
>
> I am observing some unusual behavior of the ds_list command when 
> adding and removing gateways in the dispatcher table for opensips 1.8
>
> I am running the following sequence of commands -
>
> ./opensipsctl dispatcher addgw 40 sip:2.2.2.4:5060 
> <http://2.2.2.4:5060/> 0 'test1'
>  ./opensipsctl dispatcher addgw 40 sip:2.2.2.5:5060 
> <http://2.2.2.5:5060/> 0 'test1'
>  ./opensipsctl dispatcher addgw 40 sip:2.2.2.6:5060 
> <http://2.2.2.6:5060/> 0 'test1'
>
> When I view the dispatcher list using ds_list I see-
>  ./opensipsctl fifo ds_list
> SET_NO:: 1
> SET:: 40
> URI:: sip:2.2.2.4:5060 <http://2.2.2.4:5060/> flag=A
> URI:: sip:2.2.2.5:5060 <http://2.2.2.5:5060/> flag=A
> URI:: sip:2.2.2.6:5060 <http://2.2.2.6:5060/> flag=A
> and the ./opensipsctl dispatcher show output is as follows -
> dispatcher gateways
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> | id | setid | destination      | socket | flags | weight | attrs | 
> description |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> |  3 |    40 | sip:2.2.2.4:5060 <http://2.2.2.4:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> |  4 |    40 | sip:2.2.2.5:5060 <http://2.2.2.5:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> |  5 |    40 | sip:2.2.2.6:5060 <http://2.2.2.6:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
>
> However when I remove the 3 gateways one after another using 
> the ./opensipsctl dispatcher rmgw command. I see that the gateway that 
> was removed last can still be seen in the ds_list command even though 
> 'dispatcher show' does not show any gateways present. Here is the 
> sequence of commands I am executing-
>
>  ./opensipsctl dispatcher rmgw 3
> ./opensipsctl fifo ds_list
> SET_NO:: 1
> SET:: 40
> URI:: sip:2.2.2.5:5060 <http://2.2.2.5:5060/> flag=A
> URI:: sip:2.2.2.6:5060 <http://2.2.2.6:5060/> flag=A
>  ./opensipsctl dispatcher show
> dispatcher gateways
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> | id | setid | destination      | socket | flags | weight | attrs | 
> description |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> |  4 |    40 | sip:2.2.2.5:5060 <http://2.2.2.5:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> |  5 |    40 | sip:2.2.2.6:5060 <http://2.2.2.6:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
>
>  ./opensipsctl dispatcher rmgw 4
>  ./opensipsctl fifo ds_list
> SET_NO:: 1
> SET:: 40
> URI:: sip:2.2.2.6:5060 <http://2.2.2.6:5060/> flag=A
>  ./opensipsctl dispatcher show
> dispatcher gateways
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> | id | setid | destination      | socket | flags | weight | attrs | 
> description |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
> |  5 |    40 | sip:2.2.2.6:5060 <http://2.2.2.6:5060/> | NULL   |     
> 0 |      1 |       | test1       |
> +----+-------+------------------+--------+-------+--------+-------+-------------+
>
>  ./opensipsctl dispatcher rmgw 5
>  ./opensipsctl fifo ds_list
> SET_NO:: 1
> SET:: 40
> URI:: sip:2.2.2.6:5060 <http://2.2.2.6:5060/> flag=A
>  ./opensipsctl dispatcher show
> dispatcher gateways
>
>
> Can you please help in understanding this behavior? Is this expected 
> behavior? Is there something I am missing that needs to be done to 
> correct this?
>
> -- 
> Thanks,
> Gunjan
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160114/0d35151b/attachment.htm>


More information about the Users mailing list