[OpenSIPS-Users] YNT: Re: YNT: Re: YNT: Re: RFC3261 transaction matching failed error for the second 401 Unauthorized - Challenging the UE

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Oct 14 17:50:47 CEST 2014


Hi Kaan,

When you do parallel forking (sending same request to two destinations), 
only one negative reply (from the two branches) is sent back to caller 
(to .11 in your case). You get the 401 reply on both .3 and .5 branches 
and OpenSIPS picks one to be sent to caller .11 (in SIP only one SIP 
negative reply per request is allowed).

So, from SIP perspective it works ok, but my impression is you want 
something else.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 13.10.2014 23:01, Kaan Dandin wrote:
> Hi Bogdan,
>
> Thanks for the response. I have edited the script as you have 
> mentioned but I  have the same problem:
> 401 message going to .3  is not passed by .141(opensips lb)
>
> else if (is_method("REGISTER")) {
>     xlog("xlog_initialregister");
>     if($si=="192.168.2.11") {
> $du = "sip:192.168.2.3:4060";
>     append_branch();
>     $du = "sip:192.168.2.5:4060";
>     t_relay();
> exit;
>     }
>         if (!t_relay()) {
>     xlog("xlog_route1error");
>     sl_reply_error();
>         };
>
>
> No. Time        Source                Destination Protocol Info
>      57 13.772015   192.168.2.11          192.168.2.141         SIP   
>  Request: REGISTER sip:open-ims.test
>      58 13.774094   192.168.2.141         192.168.2.5           SIP   
>  Request: REGISTER sip:open-ims.test
>      59 13.774097   192.168.2.141         192.168.2.3           SIP   
>  Request: REGISTER sip:open-ims.test
>      60 13.890456   192.168.2.3           192.168.2.141         SIP   
>  Status: 401 Unauthorized - Challenging the UE    (0 bindings)
>      61 14.046746   192.168.2.5           192.168.2.141         SIP   
>  Status: 401 Unauthorized - Challenging the UE    (0 bindings)
>      62 14.047052   192.168.2.141         192.168.2.11          SIP   
>  Status: 401 Unauthorized - Challenging the UE    (0 bindings)
>      63 14.047538   192.168.2.11          192.168.2.141         SIP   
>  Request: REGISTER sip:open-ims.test
>      64 14.047887   192.168.2.141         192.168.2.5           SIP   
>  Request: REGISTER sip:open-ims.test
>      65 14.047947   192.168.2.141         192.168.2.3           SIP   
>  Request: REGISTER sip:open-ims.test
>      66 14.084120   192.168.2.3           192.168.2.141         SIP   
>  Status: 401 Unauthorized - Challenging the UE    (0 bindings)
>      67 14.112597   192.168.2.5           192.168.2.141         SIP   
>  Status: 200 OK - SAR succesful and registrar saved    (1 bindings)
>      68 14.112755   192.168.2.141         192.168.2.11          SIP   
>  Status: 200 OK - SAR succesful and registrar saved    (1 bindings)
>
>
>
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: xlog 
> method: [REGISTER] totag: [<null>] sipid: [192.168.2.11] messageid: 
>  [1] callid:  [1-3096 at 192.168.2.11] callsequence: [2]
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:uri:has_totag: no totag
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> xlog_initialregister
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:comp_scriptvar: str 20 : 192.168.2.11
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:t_newtran: transaction on entrance=0xffffffffffffffff
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:parse_headers: flags=ffffffffffffffff
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:get_hdr_field: content_length=0
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:get_hdr_field: found end of header
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:parse_headers: flags=78
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:t_lookup_request: start searching: hash=23653, isACK=0
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:matching_3261: RFC3261 transaction matching failed
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:t_lookup_request: no transaction found
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:run_reqin_callbacks: trans=0x7fc6d2b0d9e8, callback type 1, id 
> 1 entered
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:tm:run_reqin_callbacks: trans=0x7fc6d2b0d9e8, callback type 1, id 
> 0 entered
> Oct 13 12:42:21 ubuntu /usr/local/opensips/sbin/opensips[4626]: 
> DBG:core:_shm_resize: resize(0) called
>
>
> Kind regardsi
> Kaan
> ------------------------------------------------------------------------
> *From:* Bogdan-Andrei Iancu <bogdan at opensips.org>
> *To:* Kaan Dandin <kaandandin at yahoo.com>; OpenSIPS users mailling list 
> <users at lists.opensips.org>
> *Cc:* Gunes Kurt <gkurt at itu.edu.tr>; "Ibrahim Hokelek, (BİLGEM-UEKAE)" 
> <ibrahim.hokelek at tubitak.gov.tr>
> *Sent:* Monday, October 13, 2014 8:05 PM
> *Subject:* Re: YNT: Re: YNT: Re: YNT: Re: [OpenSIPS-Users] RFC3261 
> transaction matching failed error for the second 401 Unauthorized - 
> Challenging the UE
>
> Hi Kaan,
>
> That is completely wrong as you break the transaction logic. The 
> correct way of doing parallel forking is :
>
>   if($si=="192.168.2.11") {
>     $du = "sip:192.168.2.3:4060";
>     append_branch();  # add first destination with the above value
>     $du = "sip:192.168.2.5:4060";
>     t_relay();
>   }
>
> Regards,
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com  <http://www.opensips-solutions.com/>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20141014/2452100d/attachment-0001.htm>


More information about the Users mailing list