[OpenSIPS-Users] insert dialog end reason into DB

Jayesh Nambiar jayesh1017 at gmail.com
Mon Aug 25 13:15:15 CEST 2014


I dont know why I thought of not having the pseudo variable directly in the
modparam. Thank you very much for such a simple solution. I'm just feeling
stupid about why I didn't think about this before :(

Thanks again.

--- Jayesh


On Mon, Aug 25, 2014 at 8:32 AM, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

>  Hi Jayesh,
>
> have you tried to do directly:
>
> modparam("acc", "db_extra_bye", "sip_dlg_end_reason=$DLG_end_reason")
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 23.08.2014 14:25, Jayesh Nambiar wrote:
>
>  Hello,
>  How do you insert the $DLG_end_reason in a particular column in acc
> table?? I basically did set a db_extra_bye modparam as follows:
> modparam("acc", "db_extra_bye", "sip_dlg_end_reason=$avp(dlg_end_reason)")
>
>  The problem is; when I do this before the loose route:
>
>  if(is_method("BYE")) {
>     $avp(dlg_end_reason) = $DLG_end_reason
>     xlog("L_INFO", "Dialog End Reason is $avp(dlg_end_reason)");
>  }
>
>  The $DLG_end_reason returns NULL, since the dialog is not ended yet. And
> if I do the same after loose route, the xlog shows up proper dialog end
> reason but the same is not inserted into the DB since once the transaction
> enters into loose route and probably it cannot set the values for cdr.
>  So I am in kind of a deadlock here. Is there a solution to this??
>
> Thanks in advance,
>
>  --- Jayesh
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140825/780c33b5/attachment.htm>


More information about the Users mailing list