Re: [OpenSIPS-Users] 4xx response to invite

2022-11-18 Thread Bogdan-Andrei Iancu

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() send_reply(402, "more money");
    ..
}

Then if an invite is received and  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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] 4xx response to invite

2022-11-15 Thread M S
Hi List,
If I use a block like:

if(is_method("invite") && !has_totags()) {
if() send_reply(402, "more money");
..
}

Then if an invite is received and  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@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users