session.originate requires existing call leg?
I am attempting to programatically call out from FreeSWITCH to my office phone as a test and simply play some music using Javascript. session.originate() looks closest but the first argument is an existing session (A-leg). But what if I'm creating the A-leg of the call? Do I just: session = new Session(); session.originate(session, my_destination); ? Or does 'session' exist even though there are no channels connected and if so can it act as the A-leg? Thanks, James
Here is how I do it: var s = new Session(); s.setCallerData("caller_id_name", "Inspelning"); s.setCallerData("caller_id_number", "inget"); s.originate(session, destination); session = s; where destination is something like "sofia/yourdomain.com/destination" On Tue, Aug 19, 2008 at 12:56 PM, James Green <james.green@stealthnet.net> wrote:
I am attempting to programatically call out from FreeSWITCH to my office phone as a test and simply play some music using Javascript.
session.originate() looks closest but the first argument is an existing session (A-leg).
But what if I'm creating the A-leg of the call? Do I just:
session = new Session(); session.originate(session, my_destination); ?
Or does 'session' exist even though there are no channels connected and if so can it act as the A-leg?
Thanks,
James
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
James Green
-
Jonas Gauffin