[SR-Users] Dispatcher question

Joel Serrano joel at textplus.com
Sat Sep 1 00:09:40 CEST 2018


Sorry, hit sent too soon.

I meant ds_next_dst() or ds_next_domain():

https://kamailio.org/docs/modules/5.1.x/modules/dispatcher.html#idp44172212

On Fri, Aug 31, 2018 at 3:06 PM, Joel Serrano <joel at textplus.com> wrote:

> Try with ds_select_next() in failure_route[]
>
> On Fri, Aug 31, 2018 at 06:17 Igor Olhovskiy <igorolhovskiy at gmail.com>
> wrote:
>
>> Tried other way round
>> All of this is happening in FAILURE ROUTE.
>>
>> ds_mark_dst("d");
>> ds_select_dst("1", "0")
>>
>> But ds_select_dst still selecting for me gateway already marked with "d"
>> on previous step. Seems, it applying states after packet sent. And any
>> other way I can select new dst from set?
>>
>>  Idea why I'm using ds_select_dst in FAILURE_ROUTE and not ds_next_dst()
>> that during failover timer dispatcher list could change (yes, it could be
>> extensive process) and I want to use most fresh version.
>>
>> 2018-08-31 13:05 GMT+02:00 Igor Olhovskiy <igorolhovskiy at gmail.com>:
>>
>>> Made a pv_xavp_print() afrer ds_select_dst
>>>
>>> Seems both destinations are there.
>>>
>>>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc835288 (level=0)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dsctx_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 1427193258
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc834ed8>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc834ed8 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: cnt
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7279890
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 2
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc834ed8 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dispacher_dst_list_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 508490514
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc834d78>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc834d78 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: grp
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7056653
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 1
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: uri
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 8122237
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 2
>>> 13(23) INFO: <core> [core/xavp.c:558]: xavp_print_list_content():
>>>  XAVP value: sip:172.28.0.12:5060
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc834d78 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dispacher_dst_list_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 508490514
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc834f80>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc834f80 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: grp
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7056653
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 1
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: uri
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 8122237
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 2
>>> 13(23) INFO: <core> [core/xavp.c:558]: xavp_print_list_content():
>>>  XAVP value: sip:172.28.0.19:5060
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc834f80 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dsctx_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 1427193258
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc833db0>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc833db0 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: cnt
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7279890
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 2
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc833db0 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dispacher_dst_list_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 508490514
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc833b80>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc833b80 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: grp
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7056653
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 1
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: uri
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 8122237
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 2
>>> 13(23) INFO: <core> [core/xavp.c:558]: xavp_print_list_content():
>>>  XAVP value: sip:172.28.0.19:5060
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc833b80 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dispacher_dst_list_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 508490514
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc833960>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc833960 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: grp
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7056653
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 1
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: uri
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 8122237
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 2
>>> 13(23) INFO: <core> [core/xavp.c:558]: xavp_print_list_content():
>>>  XAVP value: sip:172.28.0.12:5060
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc833960 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dsctx_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 1427193258
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc835670>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc835670 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: cnt
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7279890
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 1
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc835670 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: _dispacher_dst_list_
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 508490514
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 6
>>> 13(23) INFO: <core> [core/xavp.c:571]: xavp_print_list_content():
>>>  XAVP value: <xavp:0x7f8bfc833580>
>>> 13(23) INFO: <core> [core/xavp.c:543]: xavp_print_list_content(): +++++
>>> start XAVP list: 0x7f8bfc833580 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: grp
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 7056653
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 1
>>> 13(23) INFO: <core> [core/xavp.c:555]: xavp_print_list_content():
>>>  XAVP value: 2
>>> 13(23) INFO: <core> [core/xavp.c:547]: xavp_print_list_content():
>>>  *** XAVP name: uri
>>> 13(23) INFO: <core> [core/xavp.c:548]: xavp_print_list_content():
>>>  XAVP id: 8122237
>>> 13(23) INFO: <core> [core/xavp.c:549]: xavp_print_list_content():
>>>  XAVP value type: 2
>>> 13(23) INFO: <core> [core/xavp.c:558]: xavp_print_list_content():
>>>  XAVP value: sip:172.28.0.46:5060
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc833580 (level=1)
>>> 13(23) INFO: <core> [core/xavp.c:583]: xavp_print_list_content(): -----
>>> end XAVP list: 0x7f8bfc835288 (level=0)
>>>>>> call ds_next_dst() here
>>>>>> 13(23) WARNING: dispatcher [dispatch.c:2285]: ds_update_dst(): no xavp
>>> uri field in next destination record
>>>
>>> 2018-08-31 12:33 GMT+02:00 Daniel Tryba <d.tryba at pocos.nl>:
>>>
>>>> On Fri, Aug 31, 2018 at 12:11:53PM +0200, Igor Olhovskiy wrote:
>>>> > Can I somehow dump xavp_dst var to check if ds_select_dst is correct?
>>>>
>>>> You could use pv_xavp_print():
>>>> https://www.kamailio.org/docs/modules/5.1.x/modules/pv.html#
>>>> pv.f.pv_xavp_print
>>>>
>>>> If there is a better way I'd like to know myself.
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users at lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180831/2b96de36/attachment.html>


More information about the sr-users mailing list