[Freeswitch-users] session.originate requires existing call leg?

Jonas Gauffin jonas.gauffin at gmail.com
Tue Aug 19 04:16:09 PDT 2008


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 at 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 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
>
>




More information about the FreeSWITCH-users mailing list