[Users] OpenSer Sending CANCEL after receiving 200 OK for a INVITE

Klaus Darilion klaus.mailinglists at pernau.at
Wed Dec 20 17:19:18 CET 2006


Hi!

TAke a look at this line:

Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
destination set: $ds=Contact: sip:02111 at xx.87.220.xx:6060,
sip:02111 at xx.87.220.xx:6060

The destination set include 2 destinations:
sip:02111 at xx.87.220.xx:6060 and
sip:02111 at xx.87.220.xx:6060

Thus, openser will fork the call with 2 branches (if you take a look at 
the message flow you will see 2 INVITEs from openser to Asterisk which 
are nearly identical, only the branch parameter in openser's Via header 
will be different.)

Asterisk is buggy and does not recognize that the 2 INVITEs are 
different branches but think the second INVITE is a retransmission.

Thus when Asterisk accepts the call (accepting on of the two branches), 
openser will cancel the other branch. As the second branch is identical 
to the first one, it will send the CANCEL to Asterisk. As Asterisk cann 
not handle multiple dialog it wil think this is the recently accepted 
call and will hang up.

Conclusion: fix your openser config. Probably in your exec script (or 
somewhere in openser.cfg) you create a second branch which will be 
filled with the same URI as the first destination.

regards
klaus

PS: please always Cc the mailing list.

Md. Samiul Aftad Chowdhury wrote:
> Sorry for quite a late reply...
> 
> but i found same scenario when i am sending the call to an asterisk box.
> 
> Here is the log you asked for:
> 
> In following scenario:
> 
> xx.35.32.xx <- My Openser IP which is running on 5060 port
> 
> xx.87.220.xx:6060 <- Asterisk Box where i am forwarding the calls
> which is running on 6060 port
> 
> xx.88.13.xx <- ipphone ip
> 
> Same thing is happening here just after receiving 200 OK Openser
> generating a CANCEL.
> 
> i am using :
> 
> ============================================
> exec_dset("/usr/local/route"); # here route is a script which returns
> a desired host port (URI)
>   append_branch();
> ============================================
> 
> to rewrite the host port.
> 
> 
> Dec 20 14:47:45 openser[17368]: Invite ->
> [CallerID=sip:707234121839 at xx.35.32.xx] and [DialedNo=02111]
> Dec 20 14:47:46 openser[17366]: Invite ->
> [CallerID=sip:707234121839 at xx.35.32.xx] and [DialedNo=02111]
> 
> Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> first branch:    $br=sip:02111 at xx.87.220.xx:6060
> Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> all branches:    $bR=sip:02111 at xx.87.220.xx:6060
> Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> destination set: $ds=Contact: sip:02111 at xx.87.220.xx:6060,
> sip:02111 at xx.87.220.xx:6060
> Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> destination uri: $du=
> Dec 20 14:47:46 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> uri:             $ru=sip:02111 at xx.87.220.xx:6060
> 
> Dec 20 14:48:01 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> first branch:    $br=<null>
> Dec 20 14:48:01 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> all branches:    $bR=
> Dec 20 14:48:01 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> destination set: $ds=<null>
> Dec 20 14:48:01 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> destination uri: $du=
> Dec 20 14:48:01 openser[17366]: oRnbgCwOGh9EngQ1 at xx.88.13.xx request's
> uri:             $ru=sip:02111 at xx.87.220.xx:6060
> 
> 
> 
> On 12/7/06, Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
>>
>> Hi!
>>
>> I could not find any suspect messages. I guess there is some parallel
>> forking inside openser, thus, the second branch is cancelled when the
>> first branch picks up.
>>
>> Can you add this just before t_relay():
>>
>>          xlog("L_INFO","$ci request's first branch:    $$br=$br\n");
>>          xlog("L_INFO","$ci request's all branches:    $$bR=$bR\n");
>>          xlog("L_INFO","$ci request's destination set: $$ds=$ds\n");
>>          xlog("L_INFO","$ci request's destination uri: $$du=$du\n");
>>          xlog("L_INFO","$ci request's uri:             $$ru=$ru\n");
>>
>>
>> regards
>> klaus
>>


-- 
Klaus Darilion
nic.at





More information about the Users mailing list