[Freeswitch-users] ESL for subscribing Channel Events
Lợi Đặng
loi.dangthanh at gmail.com
Fri Dec 2 19:29:52 MSK 2016
haha, that was my mistake, in inbound mode I tried con.events("plain",
"all") and no event capture, and that leads me to some furthur confusion. I
tried con.events("plain", "CHANNEL_CREATE CHANNEL_DESTROY") and things fine
now, not sure why the document page say "all" will work. Thanks @Michael
for your enthusiasm.
@Colin, hmm, I need a lot of information from the channel, so your solution
might not work for me in this case, but mod_amqp is interesting, I might
need that in the future.
rgds,
Loi Dang Thanh
Phone : +841224.735.448
Email : loi.dangthanh at gmail.com
On Thu, Dec 1, 2016 at 9:59 PM, Colin Morelli <colin.morelli at gmail.com>
wrote:
> Obviously this largely depends on your use case, but if you're just
> looking to receive events of things happening in FS (and not trying to
> control FS through ESL), using something like mod_amqp may be a better
> choice. You'll remove the complexity of having to connect to the FS
> instances directly, and buy the flexibility of processing the events
> however you want. You're also less likely to miss events due to application
> errors (assuming that your AMQP host is more "reliable" than your
> application).
>
> On Thu, Dec 1, 2016 at 9:53 AM, Michael Jerris <mike at jerris.com> wrote:
>
>> If you want to get those events just connect to ESL and subscribe to
>> them. Are you saying you want to have a connection per channel but include
>> create events? You would have a chicken and egg problem there but in that
>> case what do you actually need the create event for, surely another event
>> can be used instead.
>>
>> > On Dec 1, 2016, at 5:00 AM, Lợi Đặng <loi.dangthanh at gmail.com> wrote:
>> >
>> > Hi List, I want, but is unable to subscribe to 2 events CHANNEL_CREATE
>> and CHANNEL_DESTROY using ESL.
>> >
>> > In a normal call caller <--> FS <--> callee, 2 CHANNEL_CREATE and 2
>> CHANNEL_DESTROY events fired and captured is my expectation.
>> >
>> > I achieved it easily via writing a new FS module in C. But I have some
>> portion of python codes needed to be executed, so I tried alternative (my
>> thought) way:
>> > - ESL inbound mode, but inbound connection is not bound to any
>> particular channel
>> > - ESL outbound mode, but outbound connection is created from dialplan,
>> so I guess CHANNEL_CREATE event could not be captured.
>> > - set up hangup_hook with mod_python, but python application is also
>> called from dialplan.
>> >
>> > Please correct me if I'm wrong somehow, and give me some advices for
>> what I'm trying to accomplish, since I don't want to rewrite my python code
>> in C.
>> >
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161202/27716563/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list