[Freeswitch-dev] Send event from javascript?

Johny Kadarisman jkr888 at gmail.com
Thu Sep 25 10:43:03 EDT 2008


Got it, Thanks. will also update the wiki.

==========================
Content-Length: 608
Content-Type: text/event-plain

Event-Subclass: message
Event-Name: CUSTOM
Core-UUID: 95e16640-7ddf-11dd-adfa-133c220a79a4
FreeSWITCH-Hostname: johny-ubuntu
FreeSWITCH-IPv4: 192.168.150.134
FreeSWITCH-IPv6: 127.0.0.1
Event-Date-Local: 2008-09-25%2010%3A38%3A42
Event-Date-GMT: Thu,%2025%20Sep%202008%2014%3A38%3A42%20GMT
Event-Date-timestamp: 1222353522769992
Event-Calling-File: mod_spidermonkey.c
Event-Calling-Function: event_fire
Event-Calling-Line-Number: 673
Event-Subclass: message
Event-Subclass-Owner: src/switch_event.c
Content-Length: 90

Hello, welcome to the FreeSWITCH demo application please enter some text
into the chat box



On Wed, Sep 24, 2008 at 7:47 PM, Anthony Minessale <
anthony.minessale at gmail.com> wrote:

> that sends the message over the call like a chat message.
>
> if you want to fire the event to event socket
>
> change:
> session.sendEvent(e);
> to
> e.fire();
>
>
> On Wed, Sep 24, 2008 at 2:40 PM, Johny Kadarisman <jkr888 at gmail.com>wrote:
>
>> Hi, I am trying to fire a custom event from javascript, and found
>> following code snippet:
>>
>> =====================
>> var msg = "Hello, welcome to the FreeSWITCH demo application please enter
>> some text into the chat box";
>>
>> e = new Event("custom", "message");
>> e.addBody(msg);
>> session.sendEvent(e);
>> ======================
>>
>> But, i don't seems to receive the custom event on the event_socket side.
>> Is this still a valid way to fire event from javascripts?
>> I can't seem to find any ref except above snippet on wiki or mailing list.
>>
>> Best Regards,
>> Johny K.
>>
>>
>> _______________________________________________
>> Freeswitch-dev mailing list
>> Freeswitch-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
> iax:guest at conference.freeswitch.org/888
> googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
> pstn:213-799-1400
>
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080925/c7dce28f/attachment-0001.html 


More information about the Freeswitch-dev mailing list