[SR-Users] Kamailio: 500 Server error occurred (19/SL).

Max Doronin max at booggee.com
Thu Jul 21 06:53:00 CEST 2011


Hello Daniel,

Where were my eyes?! Thank you for this. It works now.

Max.

On Wed, Jul 20, 2011 at 4:47 PM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

>  Hello,
>
>
> On 7/19/11 12:10 PM, Max Doronin wrote:
>
> Hello Daniel,
>
>  I think your guess about failure_route is correct. Here is the related
> piece of config. Actually I can not find any append_branch() call in config
> (which is not originally developed by me).
>
>  failure_route[1] {
>         if (t_was_cancelled()) {
>                 exit;
>         }
>
>          if (t_check_status("408|403|404|488|480|415|50[0-4]")) {
>                 if (next_gw()) {
>                         t_on_failure("1");
>                         route(6);
>                 }
>                 else
>                 {
>                         route(6);
>
> you should not call route(6) in the above line, but rather exit -- there
> was no next gw to try.
>
> Cheers,
> Daniel
>
>                  }
>         }
> }
>
>  route[6] {
>         if (!t_relay()) {
>                 sl_reply_error();
>         }
>          exit;
> }
>
>  Cheers,
> Max.
>
> On Tue, Jul 19, 2011 at 3:37 PM, Daniel-Constantin Mierla <
> miconda at gmail.com> wrote:
>
>> Hello,
>>
>>
>> On 7/13/11 5:51 PM, Max Doronin wrote:
>>
>>> Hello guys,
>>>
>>> I have strange behavior on my Kamailio-1.5.1-notls instance.
>>>
>>> I have LCR and TM modules enabled.For a particular destination I have
>>> 4 routes to try. When I call to non-existing number, it tries
>>> - route 1 (404 Not Found)
>>> - route 2 (404 Not Found)
>>> - route 3 (503 Service unavailable)
>>>
>>> And the problem is with the last 503.
>>>
>>> Kamailio ACKs it, immediately drops these 2 lines into syslog
>>> Jul 13 04:14:47 /usr/local/sbin/kamailio[23572]:
>>> ERROR:tm:t_forward_nonack: no branch for forwarding
>>> Jul 13 04:14:47 /usr/local/sbin/kamailio[23572]: ERROR:tm:w_t_relay:
>>> t_forward_nonack failed
>>> And sends
>>> SIP/2.0 500 Server error occurred (19/SL).
>>> To the call originator.
>>>
>>> 30 microseconds later it sends
>>> SIP/2.0 500 Service Unavailable.
>>> to the originator again
>>>
>>> Latter 500 looks like the relayed original "503 Service unavailable".
>>> I think so because the Reason header is the same:
>>> Reason: SIP;cause=503;text="Service
>>> Unavailable";icodetext="NoCircuitAvailable";iintcode=10034;isubsystem=3.
>>>
>>> Obviously call is terminated.
>>>
>>> I noticed that that last peer rewrites my Via headers like this:
>>> Original:
>>> ==
>>> Via: SIP/2.0/UDP 187.45.214.132;branch=z9hG4bK3dac.fae9b793.2.
>>> Via: SIP/2.0/UDP
>>> 192.168.2.33:5622
>>> ;received=49.49.59.23;branch=z9hG4bK-d8754z-a6ba40014f97fb7c-1---d8754z-;rport=23832.
>>> ==
>>>
>>> Rewritten
>>> ==
>>> Via: SIP/2.0/UDP
>>>
>>> 187.45.214.132;received=187.45.214.132;branch=z9hG4bK3dac.fae9b793.2,SIP/2.0/UDP
>>> 192.168.2.33:5622;received=49.49.59.23;branch=z9hG4b
>>> ==
>>>
>>> I tried to modify via1_matching parameter (1 ->  0) but no changes.
>>>
>>> My questions are:
>>> - What can be the reason of that 500 with 19/SL
>>> - Can kamailio properly handle this 1 line Via header?
>>> - What can be the reason of that "t_forward_nonack: no branch for
>>> forwarding"?
>>>
>>
>>  it seems you try to forward one more time, but there is no new branch
>> where to send. I guess there is some issue in the failure_route, like
>> calling t_relay() even if the new branch is not added. If you can paste it
>> here, I can tell more clear if something is wrong there.
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
>> http://linkedin.com/in/miconda -- http://twitter.com/miconda
>>
>>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110721/d8e9a397/attachment.htm>


More information about the sr-users mailing list