[OpenSIPS-Users] Logging into DB BYE messages with 481 Code

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Feb 5 11:53:43 CET 2014


Hello,

The piece of script you posted is for handling the requests, so 
logically, you cannot inspect the reply code (for BYE) when you are 
still routing the BYE request - right :) ?

So, in the script, when handling the BYE request, you need to arm a 
failure_route (to catch the negative replies) and to check in that route 
what is the reply code -> do the acc.

Let me know if you have problems in scripting this.

Regards,

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

On 05.02.2014 06:36, Wilmar Campos wrote:
> Hi All,
>
> I am trying to log into the database all BYE messages that contains 
> the return code 481.
>
> I have this piece of code:
>     if (has_totag()  && is_method("INVITE|ACK|BYE|UPDATE"))
>     {
>         if(loose_route()) {
>             if(!match_dialog())
>                 exit;
>
>             if (is_method("BYE")) {
>                 if(t_check_status("481"))
>                         acc_db_request("481 No","acc_bye");
>             }
>
> But is giving me this error.
> ERROR:tm:t_check_status: cannot check status for a reply which has no 
> transaction-state established
>
> I have try different ways to accomplish this without any luck.
>
> Can anyone please point me to the right direction?
>
> Thanks,
>
> Wilmar
>
>
> _______________________________________________
> 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/20140205/7ff6e7c7/attachment.htm>


More information about the Users mailing list