[Freeswitch-users] Problems with Originate

Nik Middleton nik.middleton at noblesolutions.co.uk
Fri Feb 13 03:48:39 PST 2009


Use this method in js

var session = new
Session('{absolute_codec_string=PCMA,accountcode=54321,ignore_early_medi
a=true,origination_caller_id_number=40711222222,originate_timeout=25}sof
ia/gateway/myprovider/873040711222222);

-----Original Message-----
From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Alexandru Nedelcu
Sent: 13 February 2009 11:33
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] Problems with Originate

Hi all,

I'm using "originate" to initiate calls, and streamFile to play audio
files on the answered sessions. All the logic was encapsulated in a
Javascript file.

The problem with this setup is that origination_caller_id_number doesn't
work from inside the JS file (when calling session.originate). My setup
only works when doing a direct originate command, with the JS script
attached as an application to it, i.e...

originate
{ignore_early_media=true}sofia/gateway/myprovider/873040711222222
'&javascript(dialer.js <params>)'

Now, my next problem ... this doesn't work properly because with
"ignore_early_media=true" then "dialer.js" isn't executed on FAIL. And I
need that. If "ignore_early_media" is not specified, then "dialer.js"
executes, but the recording starts before the phone is answered.

Can you give me any tips?

Thanks,

-- 
Alexandru Nedelcu
Software Developer, Sinapticode


_______________________________________________
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