[Freeswitch-users] No ringback with Lua Call Control

Michael Jerris mike at jerris.com
Wed Aug 22 00:17:34 MSD 2012


You can do all this with a single originate command, why would you use lua for this in the first place?

Mike

On Aug 21, 2012, at 6:31 AM, Chris B. Ware <chrisbware at yahoo.it> wrote:

> Hi,
> 
> I need a small lua script to originate two extension calls  and bridge them.
> This is my script (based on lua wiki example):
> 
> local callee = argv[1]
> local called = argv[2]
> local domain = argv[3]
> 
> Adisp = "None";
> param="{ignore_early_media=true,ringback=\'%(1000,4000,425,425)\',origination_caller_id_number="
> 
> legA=freeswitch.Session(param..callee.."}user/"..called);
> while (Adisp~="ANSWER" and legA:ready()) do
>          Adisp  = legA:getVariable("endpoint_disposition");
>         os.execute("sleep 1")
> end -- waiting for A to answer
> if (Adisp=="ANSWER") then
>         legB=freeswitch.Session(param..called.."}user/"..callee);
>         freeswitch.bridge(legA,legB);
> end
> 
> The script works but there's no ringback, when A answers and B is ringing.
> When B answers, we can talk.
> 
> This is my log:
> http://pastebin.freeswitch.org/19745
> 
> 
> I know that something stupid is missing but I can't work out where's the error!
> Any help?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120821/436b6c51/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list