[Freeswitch-users] Orginate: getting status of call fail

Nik Middleton nik.middleton at noblesolutions.co.uk
Sat Feb 28 14:49:39 PST 2009


Hi Guys,

 

I've been running a test script written in lua which now works very well
thanks to Anthony's fix to stream file.

 

Right now I'm using an event socket to initiate the call and passing the
name of the script along with originate thus:

 

$dialstring = "originate
{ignore_early_media=true,origination,originate_timeout=25}sofia/gateway/
Mygw/phonenum '&lua(helloworld.lua )'";

$result = $obj ->bgapi_command($dialstring);

 

The script gets fired (it would appear) on answer.  However, if the
number is invalid , timed out or was busy, I'm not sure the script gets
executed or am I wrong?

 

I want to be able to fire an event back on what happed to the call in
the event that it failed for whatever reason.

 

I know I can simply call the originate and pass the number as an
argument and execute the dial within the script but I'm led to believe
that's not very efficient, or am I completely wrong?

 

Looking for the most FS friendly way here

 

Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090228/3b813f25/attachment-0002.html 


More information about the FreeSWITCH-users mailing list