[asterisk-users] Adding an Event on chan_sip.c (asterisk 1.8.22)

Valter Nogueira valter at fastway.com.br
Wed Jan 7 13:18:00 CST 2015


In some situations I got the following message on asterisk console:

* Autodestruct on dialog '857128833 at 192.168.2.129
<857128833 at 192.168.2.129>' with owner SIP/1015-00000002 in place (Method:
BYE). Rescheduling destruction for 10000 ms*

I would like to raise a manager event, to take some action when it is
happening.

To do so, I believed that was just a matter of adding an manger_event call
as follows:

* owner = sip_pvt_lock_full(p);*
* if (owner) {*
* ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner %s in place
(Method: %s). Rescheduling destruction for 10000 ms\n", p->callid,
owner->name, sip_methods[p->method].text);*
* manager_event(EVENT_FLAG_SYSTEM, "MY-HANGUP-ALERT", "channel: %s\r\n",
owner->name);*

But for some reason, I don't get such event on my ami client.

What is going wrong?

Thanks,

Valter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150107/9df6e64e/attachment.html>


More information about the asterisk-users mailing list