[SR-Users] Variable in dialog event routes

Minh Phan mphan at wengo.com
Fri May 27 18:25:41 CEST 2016


Hi List,

I'm trying to have an external application to write CDR to a database by
doing this:

event_route[dialog:start] {
        evapi_relay("{'cdr_id':* $dlg_var(cdr_id),* 'event': 'answered'}");
}
event_route[dialog:end] {
        evapi_relay("{'cdr_id': *$dlg_var(cdr_id)*, 'event': 'ended'}");
}

event_route[dialog:failed] {
        evapi_relay("{'cdr_id': *$dlg_var(cdr_id)*, 'event': 'failed'}");
}

$dlg_var(cdr_id) is set inside a request route. However, in these event
routes, its value is always null. Its seems that $dlg_var variables are not
available in those event routes.

What are the variables available in dialog event route? Any suggestion on
how to achieve what I'm trying to do?

Best regards,
Minh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160527/8fc0ceb9/attachment.html>


More information about the sr-users mailing list