[OpenSIPS-Users] 4xx response to invite

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Nov 18 10:25:02 UTC 2022


Hi,

If an ACK is received, there is not way for is_method("invite") to let 
it pass.... I suggest using the script_trace() function, so you can 
understand the script execution.
https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#script_trace

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Bootcamp 5-16 Dec 2022, online
   https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/

On 11/15/22 11:21 PM, M S wrote:
> Hi List,
> If I use a block like:
>
> if(is_method("invite") && !has_totags()) {
>     if(xxxx) send_reply(402, "more money");
>     ......
> }
>
> Then if an invite is received and xxxx is true, a 402 is sent, and 
> then an ACK is received in response to 402, which has a to_tag too.
> This ACK strangely matches both method=invite and !has_totags... and 
> therefore we (incorrectly) send another 402 in response to ACK.
> Is this normal behaviour? or is this happening because I'm doing 
> something wrong like I need to send 100 Trying and then 402?
>
> Thank you!
>
> _______________________________________________
> 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/20221118/a7b51200/attachment.html>


More information about the Users mailing list