[OpenSIPS-Users] Proxy on INVITE with auth

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Oct 12 15:58:03 EDT 2017


Hi Igor,

If you want to go into the B2B are, OpenSIPS can also do it, by using 
the b2b modules - there is built-in support for UAC authentication.

Regards,

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

On 10/02/2017 10:45 AM, Igor Olhovskiy wrote:
> But yes, maybe better idea to use SEMS as a intermediate layer
>
> Regards, Igor
>
> On Sep 29, 2017, 1:37 PM +0300, Bogdan-Andrei Iancu 
> <bogdan at opensips.org>, wrote:
>> Hi Igor,
>>
>> I do not want ruin your enthusiasm here, but that is not enough, as 
>> there are messages generated by OpenSIPS, like the ACK (for negative 
>> replies) and CANCEL requests - and they will be build by OpenSIPS 
>> internals with the un-modified cseq value.
>>
>> Regards,
>> Bogdan-Andrei Iancu
>>    OpenSIPS Founder and Developer
>>    http://www.opensips-solutions.com
>> On 09/27/2017 02:49 PM, Igor Olhovskiy wrote:
>>> Got it, thanks.
>>>
>>> Done with something alike
>>>
>>> route[RESTORE_CSEQ] {
>>>   if (isflagset(AUTH_DONE) && is_avp_set("$avp(original_cseq)")) {
>>>     remove_hf("CSeq:");
>>>     append_hf("CSeq: $avp(original_cseq) $rm\r\n", "Call-ID");
>>>     xlog("L_INFO", "[RESTORE_CSEQ]: [F=$fu R=$ru D=$du M=$rm 
>>> IP=($si:$sp $Ri:$Rp) ID=$ci CSeq: $avp(original_cseq)");
>>>   }
>>> }
>>>
>>> route[INCREASE_CSEQ] {
>>>   if (isflagset(AUTH_DONE) && is_avp_set("$avp(original_cseq)")) {
>>>     $var(inc_cseq) = $(avp(original_cseq){s.int}) + 1;
>>>     remove_hf("CSeq:");
>>>  append_hf("CSeq: $var(inc_cseq) $rm\r\n", "Call-ID");
>>>     xlog("L_INFO", "[INCREASE_CSEQ]: [F=$fu R=$ru D=$du M=$rm 
>>> IP=($si:$sp $Ri:$Rp) ID=$ci CSeq: $avp(original_cseq) -> 
>>> $var(inc_cseq)");
>>>   }
>>> }
>>>
>>> And than - put these routes in necessary places.
>>>
>>> Regards, Igor
>>>
>>> On 26 сент. 2017 г., 19:51 +0300, Bogdan-Andrei Iancu 
>>> <bogdan at opensips.org>, wrote:
>>>> Hello Igor,
>>>>
>>>> Right now OpenSIPs does not support increasing the cseq during UAC 
>>>> authentication. At the end this is a limitation of the a proxy 
>>>> versus a B2B :)
>>>>
>>>> Best regards,
>>>> Bogdan-Andrei Iancu
>>>>    OpenSIPS Founder and Developer
>>>>    http://www.opensips-solutions.com
>>>> On 09/25/2017 04:00 PM, Igor Olhovskiy wrote:
>>>>> Hi!
>>>>>
>>>>> I’m trying to implement scenario, when OpenSIPS would be a proxy 
>>>>> for  IP auth SIP side and username/pass auth other side.
>>>>> So, call scenario would be like
>>>>>
>>>>> 1. A -> INVITE -> OpenSIPS                     B
>>>>> 2. A                       OpenSIPS -> INVITE       -> B
>>>>> 3. A                       OpenSIPS <-   401          <- B
>>>>> 4. A                       OpenSIPS -> INVITE (auth)  -> B
>>>>> 5. A                       OpenSIPS <-    200         <- B
>>>>> 6. A  <- 200 <-    OpenSIPS
>>>>>
>>>>> But the problem is in CSeq. On step 4, when sending INVITE with 
>>>>> Auth CSeq should be changed from original (usually incremented), 
>>>>> but on step 6, when replying back to A, it should be original.
>>>>>
>>>>> I didn’t found better solution, than to manually manipulate with 
>>>>> CSeq with append/remove headers.
>>>>> So, maybe there is more OpenSIPS - wise way of doing this?
>>>>>
>>>>> Regards, Igor
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20171012/4bf9b80c/attachment.html>


More information about the Users mailing list