insert customized SIP-Reason column in ACC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

insert customized SIP-Reason column in ACC

jay1017
Hi All,
For all the failed calls, I respond with customized SIP-Codes and SIP-Reasons to my callers using t_reply function in my script. The SIP_code gets inserted correctly in the acc table but the SIP reasons are not inserted as what I set. For example, if I send a t_reply("403", "Account-Inactive"), the entry in sip_code column is "403" but the entry in sip_reason column is still "Forbidden".
I know I can add an extra column and insert those values in a separate column using AVPs, but I intend to use the default column in acc table.
Is it possible to insert the customized reason code generated from script to be entered into the sip_reason column of the acc table?

Thanks for any pointers or help in advance.

--- Jayesh

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: insert customized SIP-Reason column in ACC

Bogdan-Andrei Iancu
Hi Jayesh,

one way to go is to use manual missed call accounting, instead of
automatic one (with flags).  Use acc_db_request("403
Account-Inactive","missed_calls") in your failure route, when you
overwrite the reply.

Regards,
Bogdan

Jayesh Nambiar wrote:

> Hi All,
> For all the failed calls, I respond with customized SIP-Codes and
> SIP-Reasons to my callers using t_reply function in my script. The
> SIP_code gets inserted correctly in the acc table but the SIP reasons
> are not inserted as what I set. For example, if I send a
> t_reply("403", "Account-Inactive"), the entry in sip_code column is
> "403" but the entry in sip_reason column is still "Forbidden".
> I know I can add an extra column and insert those values in a separate
> column using AVPs, but I intend to use the default column in acc table.
> Is it possible to insert the customized reason code generated from
> script to be entered into the sip_reason column of the acc table?
>
> Thanks for any pointers or help in advance.
>
> --- Jayesh
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


--
Bogdan-Andrei Iancu
OpenSIPS Event - expo, conf, social, bootcamp
2 - 4 February 2011, ITExpo, Miami,  USA
www.voice-system.ro


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: insert customized SIP-Reason column in ACC

jay1017
In reply to this post by jay1017
Ho Bogdan,
Will the acc_db_request function accept PV in it. If at all I'd like to fetch the reason phrases from the DB and send it back to the caller?

--- Jayesh
 
Hi Jayesh,

one way to go is to use manual missed call accounting, instead of
automatic one (with flags).  Use acc_db_request("403
Account-Inactive","missed_calls") in your failure route, when you
overwrite the reply.

Regards,
Bogdan

Jayesh Nambiar wrote:
> Hi All,
> For all the failed calls, I respond with customized SIP-Codes and
> SIP-Reasons to my callers using t_reply function in my script. The
> SIP_code gets inserted correctly in the acc table but the SIP reasons
> are not inserted as what I set. For example, if I send a
> t_reply("403", "Account-Inactive"), the entry in sip_code column is
> "403" but the entry in sip_reason column is still "Forbidden".
> I know I can add an extra column and insert those values in a separate
> column using AVPs, but I intend to use the default column in acc table.
> Is it possible to insert the customized reason code generated from
> script to be entered into the sip_reason column of the acc table?
>
> Thanks for any pointers or help in advance.
>
> --- Jayesh
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users