[Freeswitch-users] how do I detect a call has rung once?
Michael Collins
msc at freeswitch.org
Wed May 12 14:47:41 PDT 2010
On Wed, May 12, 2010 at 11:59 AM, Neil Patel <neilp at cs.stanford.edu> wrote:
> Thanks for the tips.
>
> Where are there examples of using ESL to register and handle events? For
> e.g. I don't see any example of how to register for a change in channel
> variable endpoint_disposition. Or even to check the CHANNEL_STATE event.
>
> -Neil
>
> Neil,
Check out the event socket documentation, specifically the "events plain
all" and "filter" commands. You can listen to all events or just specific
ones:
http://wiki.freeswitch.org/wiki/Event_socket
If you want to experiment with the event socket and the various events then
use fs_cli. Connect with fs_cli and then issue "/log 0" which turns off all
debug messages. Now you have basically a raw event socket. Try some of these
commands:
/event plain all
watch the fun messages fly. :)
You can filter them as well:
/filter Event-Name CHANNEL_STATE
/filter Event-Name CHANNEL_HANGUP
when you apply a filter you will receive only those things you choose. A
it's a "filter in" not filter out. Another way of saying it is "show me
events named CHANNEL_STATE" and "show me events named CHANNEL_HANGUP"
just note that in your script you will be using the ESL abstractions for
these:
http://wiki.freeswitch.org/wiki/Esl#ESLconnection_Object
I hope that helps! Have fun.
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100512/ee46ec3e/attachment.html
More information about the FreeSWITCH-users
mailing list