[OpenSIPS-Users] Equal priority and weight SRV authentication

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Apr 22 15:47:49 CEST 2013


Hello Chris,

Load the localcache module and use the cache functions to store / fetch 
keys in the cache ( 
http://www.opensips.org/Resources/DocsCoreFcn19#toc110 ).

Build the name of the keys based on the nonce, so that you name is nonce 
and value is the IP of the server.

Regards,

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


On 04/22/2013 03:35 PM, Chris Maciejewski wrote:
> Hello Bogdan,
>
> Thank you for explanation.
>
> Could you please point me in the right direction to Documentation
> where I can find functions to retrieve nonce<->server mapping
> information from localcache?
>
> If SRV record in this scenario would have SRV 1 - priority 10, SRV 2 -
> priority 20, would OpenSIPS always send requests to SRV 1 (and only
> switch to SRV 2 in case SRV 1 is down)?
>
> Best regards,
> Chris
>
> On 22 April 2013 12:21, Bogdan-Andrei Iancu<bogdan at opensips.org>  wrote:
>> Hello Chris,
>>
>> The INVITE (2) is not a re-INVITE, but an initial INVITE - it does not
>> belong to the same dialog as INVITE (1).
>>
>> Considering that they are 2 different initial requests, based on DNS lookup,
>> it is impossible to force their routing to the same back server (at least
>> not based on SIP signalling).
>>
>> A solution may be:
>>      - when the 407 is send back to uac, opensips makes an short entry (10
>> secs lifetime) in localcache, remembering the mapping between the auth nonce
>> and the server which generated it.
>>      - when opensips receives an INVITE with credential, you check in
>> localcache for the mapping with received nonce ->  you will know where to
>> send it (the server).
>>
>> So you actually do DNS only for the INVITEs without credentials.
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>>
>>
>> On 04/21/2013 11:26 AM, Chris Maciejewski wrote:
>>> Hi,
>>>
>>> I have a scenario where OpenSIPS relays proxy authentication to PSTN
>>> gateway which uses SRV records of equal priority and weight. Example
>>> SIP diagram can be found below:
>>>
>>> https://dl.dropboxusercontent.com/u/3182365/OpenSIPS-SRV-Auth.pdf
>>>
>>> Would it be possible to make OpenSIPS send Re-INVITE marked as (2) in
>>> diagram above to the same host where initial INVITE was sent?
>>>
>>> Kind regards,
>>> Chris
>>>



More information about the Users mailing list