[SR-Users] Nonce extract from SIP Meesage

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 2 09:02:03 CEST 2016



On 30/05/16 16:50, Olle E. Johansson wrote:
>> On 30 May 2016, at 15:40, Sergio Serrano <sergio.serrano at avanzada7.com> wrote:
>>
>> Hi all,
>>
>> 	I just try integrate Kamailio with external software and We
>> want taht kamailio doesn't authenticate users. I want that the
>> autehtication process would be done by external software.  I want To
>> receive a REGISTER for a user. Then I send a 407 and then when I
>> receive all paramters for autehtincation(nonce, response, digestURI,
>> etc, etc etc) send that data to external software and receive if data
>> is correct, then sent 200 OK and save location in external software. 
>>
>> Bu t I can see any pseudovariable or enything else to obtain that dato
>> to provide to external software. Anyone could think that this process
>> could be done?
> This is one of the reasons I built  http_client - we fetch the data with
> http_client and feed it to the pvar-based authentication.
>
> It’s tricky if you can’t use that since the 200 OK is special and
> needs to include all current contacts, not just the recently registred
> one. 
>
> So fetch username and pwd from external system or feed external
> system with all data to confirm.
>
If the location is saved in the external software, then the Contact
header(s) for 200ok can be returned in the http response and added to
the sip reply with append_to_reply(...).

If the location is also saved in kamailio, then it is save(...) that
generates the 200ok, independent of authentication mechanism. So all
works fine without need to fetch user/password to use them in kamailio.cfg.

For auth in external app - you can get the auth attributes from the
Proxy-/Authorization header. You can send all that header to the
external application -- for example, for REGISTER the var
$hdr(Authorization) will give you those attributes.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160602/a548699d/attachment.html>


More information about the sr-users mailing list