[Freeswitch-users] Need help detecting when phone call is answered in lua script (it is starting before the call is picked up)

Wes wes-fs at 499x.com
Wed Jun 22 18:47:39 MSD 2011


Hello,

I'm having trouble detecting when a phone call (originated from 
freeswitch) is answered by the called party using a lua script.  I have 
freeswitch connected to a corporate phone system at my office via SIP.  
When I call my deskphone at work (914145551212), the script waits until 
I answer to start playing the welcome message, and other actions.  But 
when I call my cellphone (912625551212), the script starts before I pick 
up the cellphone, as can be seen in the logs I've pasted below.

Even though the lua script isn't properly detecting when the cell phone 
has been answered, freeswitch *does* seem to know, as shown by the line:
2011-06-22 09:21:28.334618 [NOTICE] sofia.c:5594 Channel 
[sofia/external/912625551212] has been answered
which gets logged when I answer the cell, even though the script is 
already running.

This fact gives me hope that there will be a way to fix this script.

Any suggestions are appreciated!
thanks.

using:
FreeSWITCH Version 1.0.head (git-8decee3 2011-06-20 13-21-20 -0500)

Script
http://pastebin.freeswitch.org/16564

logs:
http://pastebin.freeswitch.org/16563




More information about the FreeSWITCH-users mailing list