[Freeswitch-users] Lua script issue.

jesse chat2jesse at gmail.com
Wed Aug 25 11:29:24 PDT 2010


hmm, I do not think that is the reason. Just tried your suggestion,
the same error.

-jesse

On Wed, Aug 25, 2010 at 3:15 AM, Seven Du <dujinfang at gmail.com> wrote:
> On Wed, Aug 25, 2010 at 7:56 AM, jesse <chat2jesse at gmail.com> wrote:
>> I have a bridge.lua script:
>>
>> phone1 = argv[1];
>> phone2 = argv[2];
>>
>> dialstring1 = "sofia/gateway/xyz.com/" .. phone1;
>> dialstring2 = "sofia/gateway/xyz.com7" .. phone2;
>>
>> session1 = freeswitch.Session(dialstring1);
>> session2 = freeswitch.Session(dialstring2, session1);
>
> According to http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.bridge
> , you may try
> session2 = freeswitch.Session(dialstring2);
>
>> freeswitch.bridge(session1, session2);
>>
>>
>>
>> freeswitch at xyz.com> luarun bridge.lua 16502222222 16503333333
>> 2010-08-24 16:47:55.331681 [NOTICE] switch_channel.c:779 New Channel
>> sofia/external/16502222222 [043e3bb2-afda-11df-b543-e5f35c280c99]
>>
>> +OK
>>
>> freeswitch at xyz.com> 2010-08-24 16:47:55.425462 [INFO] sofia.c:662
>> sofia/external/16502222222 Update Callee ID to "Caller Jesse" <43583>
>> 2010-08-24 16:47:55.427493 [NOTICE] sofia_glue.c:3294 Pre-Answer
>> sofia/external/16502222222!
>> 2010-08-24 16:47:55.428468 [NOTICE] switch_channel.c:779 New Channel
>> sofia/external/16503333333 [044cee96-afda-11df-b544-e5f35c280c99]
>> 2010-08-24 16:47:56.360476 [INFO] sofia.c:662
>> sofia/external/16503333333 Update Callee ID to "16503333333"
>> <16503333333>
>> 2010-08-24 16:47:56.361475 [NOTICE] sofia_glue.c:3294 Pre-Answer
>> sofia/external/16503333333!
>> 2010-08-24 16:47:56.363477 [ERR] switch_cpp.cpp:1220 Channels not ready
>> 2010-08-24 16:47:56.363477 [NOTICE] switch_cpp.cpp:972 Hangup
>> sofia/external/16503333333 [CS_SOFT_EXECUTE] [NORMAL_CLEARING]
>> 2010-08-24 16:47:56.363477 [NOTICE] switch_cpp.cpp:972 Hangup
>> sofia/external/16502222222 [CS_SOFT_EXECUTE] [NORMAL_CLEARING]
>> 2010-08-24 16:47:56.364556 [NOTICE] switch_core_session.c:1220 Session
>> 25 (sofia/external/16503333333) Ended
>> 2010-08-24 16:47:56.364556 [NOTICE] switch_core_session.c:1222 Close
>> Channel sofia/external/16503333333 [CS_DESTROY]
>> 2010-08-24 16:47:56.364556 [NOTICE] switch_core_session.c:1220 Session
>> 24 (sofia/external/16502222222) Ended
>> 2010-08-24 16:47:56.364556 [NOTICE] switch_core_session.c:1222 Close
>> Channel sofia/external/16502222222 [CS_DESTROY]
>>
>> As you can see the call gets dropped immediately after couple rings.
>> however, it works well if i do like this:
>>
>> originate sofia/gateway/xyz.com/16502222222
>> &bridge(sofia/gateway/xyz.com/16503333333)
>>
>> What is the reason Lua script will fail?  any difference between the
>> two approaches?
>>
>> thanks!
>>
>> jesse
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Blog: http://www.dujinfang.com
> Proj:  http://www.freeswitch.org.cn
>
> _______________________________________________
> 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