[Freeswitch-users] script finished before call is answered

Michael Jerris mike at jerris.com
Tue Aug 26 07:22:54 PDT 2008


"originate {ignore_early_media=true}sofia/gateway/onesuite/123456789  
&lua(hello.lua)"

On Aug 25, 2008, at 11:46 PM, Yanhao Zhu wrote:

> Hi, all,
>
> I have a very simple lua script hello.lua:
>    session:answer()
>    session:streamFile("hello.wav")
>    session:hangup()
>
> When I tried
>    "originate sofia/default/1001 &lua(hello.lua)",
> the script  started to execute after the call is answered. But when I
> tried with something like
>    "originate sofia/gateway/onesuite/123456789 &lua(hello.lua)",
> the script executed/finished before the call was answered.
>
> Is there a way to make sure the script only executes after the call is
> answered (by the end device) when calling through a SIP gateway? Can
> any one give me some hints?
>
> Thanks a lot,
> Yanhao Zhu
>
> _______________________________________________
> 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





More information about the FreeSWITCH-users mailing list