[OpenSIPS-Users] uac_registrant module and TCP

Peter Baines (lists) lists at pbaines.com
Fri Apr 21 05:21:30 EDT 2017


Hi Bogdan,

Yes you are correct, it is a retransmission.

I've specifed port 5060 as the forced_socket in the registrant table but
opensips (1.2.3.4 below) doesn't use it. Is there a way to force
uac_registrant to use 5060, or alternatively make the uac_registrant module
listen for replies on whatever port it decides to open ?

T 2017/04/21 11:05:26.960562 1.2.3.4:52945 -> 4.3.2.1:5060 [AP]
REGISTER sip:imsreg.example.com SIP/2.0.

T 2017/04/21 11:05:27.381976 4.3.2.1:5060 -> 1.2.3.4:52945 [AP]
SIP/2.0 401 Unauthorized.


mysql> SELECT * FROM registrant \G
*************************** 1. row ***************************
                    id: 1
             registrar: sip:imsreg.example.com
                 proxy: NULL
                   aor: sip:+98765432101 at ims.example.com
third_party_registrant: NULL
              username: +98765432101 at ims.example.com
              password: 123
           binding_URI: sip:+98765432101 at 1.2.3.4
        binding_params: NULL
                expiry: NULL
*         forced_socket: tcp:1.2.3.4:5060 <http://1.2.3.4:5060>*
1 row in set (0.00 sec)


Thank you,
Peter

On 21 April 2017 at 09:53, Bogdan-Andrei Iancu <bogdan at opensips.org> wrote:

> Hi Pete,
>
> Looking to the logs, I see only one line :
>
> Apr 21 09:58:56 dev01 /usr/local/opensips_2.2/sbin/opensips[4766]:
> DBG:uac_registrant:reg_tm_cback: tm [0x7f2ceb70b2f0] notification cb for
> FAKED_REPLY [408] reply at [1492761536]
>
> The "reg_tm_cback" is the TM callback used to report back to the
> uac_registrant module the reply code for the sent REGISTER. And I see there
> a 408 timeout :-/ .....
>
> Even more, the "run_reg_tm_cback" function (that triggers the build of the
> auth hdr) does not show up logging anything (and there are some debug over
> there).
>
> So, are you sure that the 401 is actually received ? maybe the second
> REGISTER is actually a retransmission of the first one ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/21/2017 11:14 AM, Peter Baines (lists) wrote:
>
> Hello,
>
> I am trying to use the uac_registrant module (2.2) to register via TCP but
> when it recieves the 401 it is not adding the Authorization header.
>
> It does work with UDP so I get:
>
> REGISTER -> 401 (with WWW-Authenticate) -> REGISTER (with Authorization)
> -> 200 OK
>
> However when I tell it to use TCP it doesn't add the Authorization header:
>
> UPDATE registrant SET forced_socket = 'tcp:1.2.3.4:5060';
>
> REGISTER -> 401 (with WWW-Authenticate) -> REGISTER (no Authorization) ->
> 403 Forbidden
>
> I've included the debug log for the failing TCP REGSITER attempt:
> https://pastebin.com/gigJkWZX
>
> Regards,
> Peter
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170421/71f98463/attachment-0001.html>


More information about the Users mailing list