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 <[email protected]>,
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
> > [email protected]
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users