[Freeswitch-users] How to make Lua script wait few seconds and then answer a call

Vitalii Colosov vetali100 at gmail.com
Sun Apr 11 13:22:11 PDT 2010


[RESOLVED]

Looks like the following resolved my problem, calling party can hear
ringtone now:

session:execute("ring_ready");
session:execute("sleep","5000");

http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_ring_ready

Thank you all,
Vitalie



2010/4/11 Vitalii Colosov <vetali100 at gmail.com>

> Hi,
> Thanks for the hints.
>
> When I am doing this, calling party *does not hear any ringtone* during
> this pause.
>
> session:execute("pre_answer");
> session:execute("sleep","5000");
>
>
> I tried to add the following (before or after pre-answer), but same result
> - only silence:
> session:setVariable("ringback", "%(2000,4000,440,480)");
>
>
> I need ringtone. What am I doing wrong?
>
> Thank you,
> Vitalie
>
> 2010/4/8 David Ponzone <david.ponzone at gmail.com>
>
> Perhaps:
>> pre_ answer
>> then
>> sleep ?
>>
>>  David Ponzone  Direction Technique
>> email: david.ponzone at ipeva.fr
>> tel:      01 74 03 18 97
>> gsm:   06 66 98 76 34
>>
>> Service Client IPeva
>> tel:      0811 46 26 26
>> www.ipeva.fr  -   www.ipeva-studio.com
>>
>> *Ce message et toutes les pièces jointes sont confidentiels et établis à
>> l'intention exclusive de ses destinataires. Toute utilisation ou diffusion
>> non autorisée est interdite. Tout message électronique est susceptible
>> d'altération. **IPeva** décline toute responsabilité au titre de ce
>> message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas
>> destinataire de ce message, merci de le détruire immédiatement et d'avertir
>> l'expéditeur.*
>> *
>> *
>>
>>
>>
>> Le 07/04/2010 à 23:17, Vitalii Colosov a écrit :
>>
>> Hi dear community,
>>
>> I am using a Lua script that is being executed when a call reaches a
>> particular extension, say 1001.
>> It works ok, but it answers immediately when call reaches the system.
>>
>> How can I make it to wait 5-10 seconds (so the caller will hear several
>> ringtones) and only after that the Lua script should answer and start the
>> processing?
>>
>> Thank you,
>> Vitalie
>> _______________________________________________
>> 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/20100411/5a05735f/attachment-0021.html 


More information about the FreeSWITCH-users mailing list