[Freeswitch-users] failure to start a session from within lua for outbound call

Michael Collins msc at freeswitch.org
Thu Jun 16 00:08:31 MSD 2011


Your dialstring is invalid. You need to format it properly:
sofia/gateway/my_gw/1000
sofia/internal/1000 at host
user/1000

It all depends on exactly what you're doing. Use this wiki page for lots of
cool examples:
http://wiki.freeswitch.org/wiki/Dialplan_XML#SIP-Specific_Dialstrings

-MC

On Tue, Jun 14, 2011 at 1:41 PM, paul at iamfine.com <paul at iamfine.com> wrote:

> Having problems getting a session created from a lua script - its the
> latest build on a centos system
>
> this is the lua code
>
> -----------------------
> freeswitch.console_log("info", "Lua in da house!!!\n");
>
> local session = freeswitch.Session("sofia/00.00.127.61/1000");
> session:execute("playback", "/sr8k.wav");
> session:hangup();
> -----------------------
>
> ***** please note i changed the ip address to protect its identity *****
> **********
>
>
>
>
> please help - i am tearing my hair out on this one
>
> Paul
>
>
> +OK
>
> freeswitch at internal> 2011-06-14 20:31:01.476406 [INFO] switch_cpp.cpp:1197
> Lua in da house!!!
> 2011-06-14 20:31:01.476406 [DEBUG] switch_ivr_originate.c:1869 Parsing
> global variables
> 2011-06-14 20:31:01.476406 [NOTICE] switch_channel.c:833 New Channel
> sofia/internal/1000 [c9c5d8ec-af7f-4153-a844-5000983170d5]
> 2011-06-14 20:31:01.476406 [DEBUG] mod_sofia.c:4392 (sofia/internal/1000)
> State Change CS_NEW -> CS_INIT
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:325
> (sofia/internal/1000) Running State Change CS_INIT
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:361
> (sofia/internal/1000) State INIT
> 2011-06-14 20:31:01.476406 [DEBUG] mod_sofia.c:85 sofia/internal/1000 SOFIA
> INIT
> 2011-06-14 20:31:01.476406 [DEBUG] mod_sofia.c:125 (sofia/internal/1000)
> State Change CS_INIT -> CS_ROUTING
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:361
> (sofia/internal/1000) State INIT going to sleep
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:325
> (sofia/internal/1000) Running State Change CS_ROUTING
> 2011-06-14 20:31:01.476406 [DEBUG] switch_channel.c:1736
> (sofia/internal/1000) Callstate Change DOWN -> RINGING
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:364
> (sofia/internal/1000) State ROUTING
> 2011-06-14 20:31:01.476406 [DEBUG] mod_sofia.c:148 sofia/internal/1000
> SOFIA ROUTING
> 2011-06-14 20:31:01.476406 [DEBUG] switch_ivr_originate.c:66
> (sofia/internal/1000) State Change CS_ROUTING -> CS_CONSUME_MEDIA
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:364
> (sofia/internal/1000) State ROUTING going to sleep
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:325
> (sofia/internal/1000) Running State Change CS_CONSUME_MEDIA
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:383
> (sofia/internal/1000) State CONSUME_MEDIA
> 2011-06-14 20:31:01.476406 [DEBUG] switch_core_state_machine.c:383
> (sofia/internal/1000) State CONSUME_MEDIA going to sleep
> 2011-06-14 20:31:01.476406 [DEBUG] sofia.c:4800 Channel sofia/internal/1000
> entering state [calling][0]
> 2011-06-14 20:31:01.638509 [DEBUG] sofia.c:4800 Channel sofia/internal/1000
> entering state [terminated][503]
> 2011-06-14 20:31:01.638509 [DEBUG] switch_channel.c:2641
> (sofia/internal/1000) Callstate Change RINGING -> HANGUP
> 2011-06-14 20:31:01.638509 [NOTICE] sofia.c:5522 Hangup sofia/internal/1000
> [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]
> 2011-06-14 20:31:01.638509 [DEBUG] switch_ivr_originate.c:3308 Originate
> Resulted in Error Cause: 41 [NORMAL_TEMPORARY_FAILURE]
> 2011-06-14 20:31:01.638509 [ERR] switch_cpp.cpp:655 session is not
> initalized
> 2011-06-14 20:31:01.638509 [ERR] switch_cpp.cpp:617 session is not
> initalized
> 2011-06-14 20:31:01.638509 [DEBUG] switch_channel.c:2657 Send signal
> sofia/internal/1000 [KILL]
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:325
> (sofia/internal/1000) Running State Change CS_HANGUP
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:565
> (sofia/internal/1000) State HANGUP
> 2011-06-14 20:31:01.638509 [DEBUG] mod_sofia.c:452 sofia/internal/1000
> Overriding SIP cause 503 with 503 from the other leg
> 2011-06-14 20:31:01.638509 [DEBUG] mod_sofia.c:458 Channel
> sofia/internal/1000 hanging up, cause: NORMAL_TEMPORARY_FAILURE
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:46
> sofia/internal/1000 Standard HANGUP, cause: NORMAL_TEMPORARY_FAILURE
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:565
> (sofia/internal/1000) State HANGUP going to sleep
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:356
> (sofia/internal/1000) State Change CS_HANGUP -> CS_REPORTING
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:325
> (sofia/internal/1000) Running State Change CS_REPORTING
> 2011-06-14 20:31:01.638509 [DEBUG] switch_core_state_machine.c:625
> (sofia/internal/1000) State REPORTING
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:53
> sofia/internal/1000 Standard REPORTING, cause: NORMAL_TEMPORARY_FAILURE
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:625
> (sofia/internal/1000) State REPORTING going to sleep
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:350
> (sofia/internal/1000) State Change CS_REPORTING -> CS_DESTROY
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_session.c:1118 Send signal
> sofia/internal/1000 [BREAK]
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_session.c:1290 Session 8
> (sofia/internal/1000) Locked, Waiting on external entities
> 2011-06-14 20:31:02.631557 [NOTICE] switch_core_session.c:1308 Session 8
> (sofia/internal/1000) Ended
> 2011-06-14 20:31:02.631557 [NOTICE] switch_core_session.c:1310 Close
> Channel sofia/internal/1000 [CS_DESTROY]
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:454
> (sofia/internal/1000) Callstate Change HANGUP -> DOWN
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:457
> (sofia/internal/1000) Running State Change CS_DESTROY
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:467
> (sofia/internal/1000) State DESTROY
> 2011-06-14 20:31:02.631557 [DEBUG] mod_sofia.c:363 sofia/internal/1000
> SOFIA DESTROY
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:60
> sofia/internal/1000 Standard DESTROY
> 2011-06-14 20:31:02.631557 [DEBUG] switch_core_state_machine.c:467
> (sofia/internal/1000) State DESTROY going to sleep
> _______________________________________________
> 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/20110615/4dcc012b/attachment.html 


More information about the FreeSWITCH-users mailing list