[SR-Users] Diversion Header - relay messed up

Daniel-Constantin Mierla miconda at gmail.com
Wed Feb 8 08:21:51 CET 2017


There should be something in the config file that changes the $ru,
kamailio internally doesn't do it if no function in config does it.

To see what it is executed in config file, load debugger module and set
its parameter cfgtrace to 1.

Then in the syslog you should see what lines are executed. You can send
those log messages here and we can provide hints which of the action may
change the $ru.

Cheers,
Daniel


On 31/01/2017 18:25, Roman Dissauer wrote:
> Just tried, but it doesn’t help.
>
> request_route {
>
>         if $di == $null {
>                 xlog("L_INFO","[$fU@$si:$sp]{$rm} Incomeing Request...\n");
>         } else {
>                 xlog("L_INFO","[$fU@$si:$sp]{$rm} Incomeing Request... with Diversion Header: $di, Request URI: $ru\n");
>                 remove_hf("Diversion");
>                 if (msg_apply_changes()) {
>                         if (is_present_hf("Diversion")) {
>                                 xlog("L_INFO","[$fU@$si:$sp]{$rm} This damn header is still there!!\n");
>                         }
>                 }
>         }
>>
> INFO: <script>: [+43987654321 at y.y.y.y:5060]{INVITE} Incomeing Request... with Diversion Header: sip:+436761234567 at y.y.y.y:5060, Request URI: sip:+43123456789 at x.x.x.x:5060
> INFO: <script>: [+43987654321 at y.y.y.y:5060]{INVITE} Diversion header: <null>
> INFO: <script>: [+43987654321 at y.y.y.y:5060]{INVITE} Routing Call to FreeSWITCH sip:10.23.101.11:5060
> INFO: <script>: [+43987654321 at y.y.y.y:5060]{INVITE} Relay request…
>
> Call is being received, Diversion Header is deleted, in RELAY route I print Diversion header (there it is null).
> When I call t_relay() I still get wrong INVITE:
>
> INVITE sip:436761234567 at x.x.x.x:5060 SIP/2.0
> From: <sip:+43987654321 at y.y.y.y>;tag=gK04715d90
> To: <sip:436766369520 at x.x.x.x>
>
> seems that $tu is taken instead of $ru when doing t_relay()
> Diversion Header has e164 with leading + and to Header has just e164.
>
> Thanks,
> Roman
>
>
>> Am 30.01.2017 um 14:45 schrieb Daniel Tryba <d.tryba at pocos.nl>:
>>
>> On Sun, Jan 29, 2017 at 06:42:23PM +0100, Roman Dissauer wrote:
>>> When I get an INVITE with Diversion Header the Request is forwarded
>>> without Diversion Header and the Request User is taken from Diversion
>>> User.  Problem is that on the Destination Host I cannot get original
>>> Request User what is the intended destination!  Is this intended
>>> behaviour? How can I change this behaviour?
>>>
>>> I already tried to delete the Diversion Header on request_route but
>>> this didn’t change the behaviour.
>>> INVITE sip:+43123456789 at x.x.x.x:5060 SIP/2.0.
>>> From: <sip:+43987654321 at y.y.y.y>;tag=gK022ac5cb.
>>> To: <sip:436761234567 at x.x.x.x>.
>>> Diversion: <sip:+436761234567 at y.y.y.y:5060>;privacy=full;screen=no; reason=unconditional; counter=1.
>>> INVITE sip:436761234567 at x.x.x.x:5060 SIP/2.0.
>>> From: <sip:+43987654321 at y.y.y.y>;tag=gK022ac5cb.
>>> To: <sip:436761234567 at x.x.x.x>.
>> This behavior is AFAIK not something that kamailio does out of the box
>> and is just plain wrong (since the Diversion indicates the source of a
>> forward/deflection). Maybe somebody made a typo to set $ru to $di
>> instead of $du :)
>>
>> What may work is calling msg_apply_changes after the delete:
>> http://www.kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.msg_apply_changes
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com




More information about the sr-users mailing list