[Freeswitch-dev] Send event from javascript?

Anthony Minessale anthony.minessale at gmail.com
Wed Sep 24 19:47:34 EDT 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080924/35b6df50/attachment.html 


More information about the Freeswitch-dev mailing list