[Freeswitch-users] [Outbound call using GSMOpen] help needed for research on Maternal Health

Michael Jerris mike at jerris.com
Wed Dec 24 00:28:57 MSK 2014


I would just do this in dialplan instead of in lua, and just use the api interface originate command to create the call.

> On Dec 23, 2014, at 3:27 PM, Abdul Mannan Butt <ab928 at itu.edu.pk> wrote:
> 
> Hi Freeswitch-Users,
> 
> We are basically working on a research project on Maternal Health, in which we have to call to women and instruct them about the diet at each stage of their pregnancy to reduce mortality rate due to pregnancy complications.
> 
> Could anyone please help us in implementing an outbound call? We are trying the following code but we are unable to make an outbound call properly and play a sound file when call get received by the called person.
> 
> Code: 
> --------------------------------------------------------------------------------
> audio_file_path = "ivr/MESSAGE_TO_PLAY.wav";
> freeswitch.consoleLog("INFO","Initiating call\n");
> -- this will call the person and move to next line of call get accepted/rejected etc
> session = freeswitch.Session("{ignore_early_media=true}gsmopen/gsm01/03454329512");
> -- Checking session status
> session:consoleLog("info", "checking session status\n");
> -- Stream audio if session is ready
> if(session:ready() == true) then
>     session:consoleLog("info", "ready to stream\n");
>     session:streamFile(audio_file_path);
>     session:sleep(250);
>        session:hangup();
> end
> --------------------------------------------------------------------------------
> 
> But the problem is 
> session = freeswitch.Session("{ignore_early_media=true}gsmopen/gsm01/03454329512"); is not returning the control to the below code until user disconnect the call. At that time session got invalid. please help, how could we do Call-Out properly. We have posted the following issue n Jira but we remain unable to get our work done.
> https://freeswitch.org/jira/browse/FS-7101 <https://freeswitch.org/jira/browse/FS-7101>
> https://freeswitch.org/jira/browse/FS-7057 <https://freeswitch.org/jira/browse/FS-7057>
> 
> Please help us to make an outbound call and play a audio message. We will be very thankful to you.
> 
> Kind Regards,
> 
> Amna Batool and Abdul Mannan,
> Information Technology University,
> Lahore Pakistan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141223/665a3bcf/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list