Hi, Not sure if it helps, but I got similar problem and I made workaround when I bridge to loopback inside Lua something like this: session:execute("bridge", "{ignore_early_media=true,timeout="..timeout.."}loopback/wait") And in dialplan: <extension name="wait"> <condition field="destination_number" expression="^wait$"> <action application="set" data="ringback=$${uk-ring}"/> <action application="pre_answer"/> <!-- dial command to B leg sofia/internal/0123456789@myserver --> </condition></extension> In this case you should be able to hear UK ring-back tones. P.S. I never tested this code, but you should get an overall idea. With kind regards, Jurijs On Thu, Jul 6, 2017 at 1:11 PM, Stefano Favaro <stefano.favaro@edistar.com> wrote:
Hello,
I'm writing a simple script with LUA to connect an inbound call to e new outbound call. Everything work fine but I can't set the *ringback* tone nor a waiting music on the leg A and also the *call_timeout* variable. The legA is in silence while the legB is ringing and the call_timeout is always the default 60 seconds. What is wrong with this code?
Thanks
This is the code: ... legA:streamFile("/usr/share/freeswitch/sounds/wait.wav")
legA:setVariable("ringback", "$${uk-ring}") legA:setVariable("call_timeout", 30)
legB = freeswitch.Session("{ignore_early_media=true, hangup_after_bridge=true, origination_caller_id_number= 1234}sofia/internal/0123456789@myserver)
if legB:ready() then freeswitch.bridge(legA, legB) end
Stefano Favaro Sviluppo Servizi ed Applicazioni _____________________
Edistar Srl
a socio unico soggetta a direzione e coordinamento di YourVoice SpA
Via Artigianato 1 – I – 31050 Vedelago (TV) Italy
Phone +39 0423 7331 <+39%200423%207331> – Fax +39 0423 733133 <+39%200423%20733133>
skype: stefanofavaro
www.edistar.com
<http://twitter.com/#%21/edistar>
<http://www.linkedin.com/company/239920>
Le informazioni trasmesse attraverso la presente e-mail ed i suoi allegati sono dirette esclusivamente al destinatario e devono ritenersi riservate con divieto di diffusione e di uso nei giudizi salva espressa autorizzazione; nel caso di utilizzo senza espressa autorizzazione, potrà essere effettuata denuncia alla competente Autorità. La diffusione e la comunicazione da parte di soggetto diverso dal destinatario è vietata dall’art. 616 e ss. c.p. e dal d. l.vo n. 196/03. Se la presente e-mail e i suoi allegati fossero stati ricevuti per errore da persona diversa dal destinatario preghiamo di distruggere quanto ricevuto e di rinviare al mittente con lo stesso mezzo. Grazie per la collaborazione.
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org