[Freeswitch-users] Question about Lua script: How do I detect when someone picks up the phone?
Mike van Lammeren
mike at van.lammeren.net
Wed Jan 20 14:06:38 PST 2010
So, I've been reading about early media in the wiki, and have made a little
progress, which leads to more questions.
I understand now why a call is considered connected before one person has
picked up the phone. I am also able to get my script to wait for the phone
to be picked up, by setting the ignore_early_media variable when starting a
new session, like this:
customerSession =
freeswitch.Session("{ignore_early_media=true}sofia/gateway/example.com/" ..
customerPhoneNumber)
After that line, the script waits for the other phone to be picked up.
However, now I wonder what to do with calls that don't complete, get busy
signals, etc.
What do people do in this case? The only related example I can find on the
web is for a javascript dialer, which doesn't address any of these cases.
Early Media: http://wiki.freeswitch.org/wiki/Early_media
ignore_early_media variable:
http://wiki.freeswitch.org/wiki/Variable_ignore_early_media
<http://wiki.freeswitch.org/wiki/Variable_ignore_early_media>javascript
dialer: http://alexn.org/docs/dialer.html
<http://alexn.org/docs/dialer.html>Mike van Lammeren
On Wed, Jan 20, 2010 at 4:45 PM, Mike van Lammeren <mike at van.lammeren.net>wrote:
> Hi Rob!
>
> Unfortunately, I have the next few weeks to complete this part of the
> project. Without a stable release of 1.0.5, I have to stick with 1.0.4. I'm
> sure that 1.0.4 can detect and report when a phone is picked up. It's just
> that I can't figure out how to get that information! Either that, or I have
> something mis-configured.
>
> Mike van Lammeren
>
>
> On Wed, Jan 20, 2010 at 4:32 PM, Rob Forman <rob4manhere at gmail.com> wrote:
>
>> Hi Mike,
>>
>> I don't think v1.0.4 is supported any longer. You'll have better luck
>> getting assistance by upgrading to trunk or the latest tar and reporting
>> back.
>>
>> Good luck!
>> Rob
>>
>> On Wed, Jan 20, 2010 at 3:18 PM, Mike van Lammeren <mike at van.lammeren.net
>> > wrote:
>>
>>> Hello!
>>>
>>> Some day, I'll probably laugh at asking this question, but today I can't
>>> figure it out.
>>>
>>> I've written a Lua script that listens for a call, then dials a phone
>>> number to a second person. It plays a message, then prompts the second
>>> person to hit pound to connect. If the second person hits pound, then it
>>> bridges the two calls together.
>>>
>>> All that works great, but I can't figure out how to get the session for
>>> the second person to wait until that person answers.
>>>
>>> I'm using FreeSWITCH 1.0.4, and although there is a *getState* function
>>> documented in the wiki, it doesn't seem to exist for me.
>>>
>>> Any help would be appreciated!
>>>
>>>
>>> Mike van Lammeren
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100120/a193ebde/attachment-0002.html
More information about the FreeSWITCH-users
mailing list