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

Md. Samiul Aftad Chowdhury voip.lover at gmail.com
Tue Dec 26 10:28:30 CET 2006


Thanks Klaus.

It really helped.  It was a pure mistake done by me.

  In my cfg file I'v done some thing like this:

in the route{} block...

if (!method=="REGISTER") {
    exec_dset("/usr/local/gplex/sbin/route"); #<-- as i am takeing the
routing info from
                                                                #
external script
    append_branch(); #<----[This is the line that caused the problem]
};

as I had to use "append_branch()"  for my failure routes...
i added (by mistake) this in line also in the main route block thus it
was making forked calls to same
destination twice, but with different branch params. and next thing
was same that you told
in your last mail. Buggy asterisk (in my case Mera 0.1.2 also)
canceling the 1st branch
though that cancel was for the 2nd branch. After removing the
append_branch() from my main route block its working perfect.

Thanks again.

[PS: I didnt relized that i was only replying to you instead of
mailing list, this time solved.]

Regads,

Aftad


On 12/20/06, Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
>
> 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 sr-users mailing list