[OpenSIPS-Users] parallel forking and CANCEL/BYE

Uwe Kastens kiste at kiste.org
Wed Oct 21 09:51:37 CEST 2009


Hello Bogdan,

Now we changed the behaviour of the UAC. One of them will send a BYE and
this is relayed to the PSTN GW which drops the call, since opensips will
not handle the BYE locally. So loose_route is done and the BYE is
relayed to the PSTN GW.

The following is happening:

1) INVITE from PSTN GW
2) parallel forking to ast1 and ast2 (branches z9hG4bK51f6.9afa91c3.1
and z9hG4bK51f6.9afa91c3.0)
3) ast1 sends an 200 OK (branch z9hG4bK51f6.9afa91c3.0)
4) opensips sends an cancel to ast2 (branch z9hG4bK51f6.9afa91c3.1)
5) opensips receives the 200 OK from ast1 and sends an ACK (branch is
changing here to z9hG4bK51f6.9afa91c3.3)
6) opensips receives 200 OK from ast2 from the INVITE (branch
z9hG4bK51f6.9afa91c3.1)and sends an ACK (branch is changing to
z9hG4bK51f6.9afa91c3.3)
7) opensips reives 200 OK from ast2 for the cancel request ( branch
z9hG4bK51f6.9afa91c3.1)
8) opensips receives BYE from ast2 with branch z9hG4bK40d1af5d
9) opensips is doing loose_route and sends the BYE to the PSTN GW


The only thing I could see on the logs is:

 WARNING:dialog:dlg_onroute: tight matching failed for BYE with
callid='393105a419950c1f265f298914662393 at 10.20.30.100'/46,
ftag='as63949c6e'/10, ttag='as0d1597ca'/10 and direction=0
Oct 21 09:09:15 asne02 /usr/sbin/opensips[15615]:
WARNING:dialog:dlg_onroute: dialog identification elements are
callid='393105a419950c1f265f298914662393 at 10.20.30.100'/46, caller
tag='as0d1597ca'/10, callee tag='as79debd51'/10

Why is the opensips not handling the BYE locally and only closing one
branch?

BR

UWe


Bogdan-Andrei Iancu schrieb:
> Hi Uwe,
> 
> Uwe Kastens wrote:
>> Hi Bogdan,
>>
>>   
>>> So actually both legs do send 200 OK (but one faster than the 
>>> other)......so there is kind on race between the 200 OK from the slow 
>>> branch and the CANCEL from OpenSIPS...is this the case?
>>>     
>> Exactly
>>
>>   
>>> If so, the UAS will simply reply with negative reply to CANCEL (decline 
>>> it) and opensips (for INVITE transaction) will not close the second 
>>> branch as there is a 200 OK (and not a 487) received ....RFC3261 says 
>>> that a proxy must send all 200 OK (for a call), even if more than one, 
>>> to the UAC - the UAC is the one who will decide what branch to keep and 
>>> it will fire a BYE for the other branch.
>>>
>>>     
>> Could this explan, why only the 2nd Node will get the BYE, if the call
>> is released "behind" the opensips?
>>   
> yes, because the caller will hung up only one of the callee branch, so 
> the BYE will go to only one of them. The other branch will remain up and 
> will be the ongoing call.
> 
> Regards,
> Bogdan
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 

kiste lat: 54.322684, lon: 10.13586



More information about the Users mailing list