[Freeswitch-users] Lua not playing wav files

Yuriy Nasida nasida at live.ru
Wed Aug 17 00:06:03 MSD 2011


The issue  consists in that I get dialplan automatically through xml_curl + php (by intralanman). 
I see it by means xml_curl_debug_on
<action application="lua" data="$1" inline="true"/>
How can I disable "inline="true"" ?


From: nasida at live.ru
To: freeswitch-users at lists.freeswitch.org
Date: Tue, 16 Aug 2011 21:46:35 +0400
Subject: [Freeswitch-users] Lua not playing wav files









Hi
Freeswitch-users,




My
simple lua script:




freeswitch.consoleLog("err","start
hello.lua\n")

session:answer();

message
= "ivr/ivr-enter_destination_telephone_number.wav"

session:execute("playback",
message)

session:hangup();




Script
looks fine I think, but FS doesn't play audio. If I use corresponding
XML dialplan all work fine.







logs
when I use lua:




2011-08-16
13:18:00.336003 [DEBUG] switch_core_state_machine.c:371
(sofia/external/79213777785 at 65.98.107.130:5080) State EXECUTE going
to sleep

2011-08-16
13:18:00.336003 [DEBUG] switch_core_state_machine.c:364
(sofia/external/79213777785 at 65.98.107.130:5080) State ROUTING

2011-08-16
13:18:00.336003 [DEBUG] mod_sofia.c:147
sofia/external/79213777785 at 65.98.107.130:5080 SOFIA ROUTING

2011-08-16
13:18:00.336003 [DEBUG] switch_core_state_machine.c:77
sofia/external/79213777785 at 65.98.107.130:5080 Standard ROUTING

2011-08-16
13:18:00.336003 [INFO] mod_dialplan_xml.c:331 Processing unknown
<79213777785>->inbound_type_uri in context public

2011-08-16
13:18:00.345157 [ERR] switch_cpp.cpp:1197 start hello.lua

2011-08-16
13:18:00.345157 [DEBUG] sofia_glue.c:4650 Audio Codec Compare
[PCMA:8:8000:20:64000]/[PCMU:0:8000:20:64000]

2011-08-16
13:18:00.345157 [DEBUG] sofia_glue.c:4650 Audio Codec Compare
[PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]

2011-08-16
13:18:00.345157 [DEBUG] sofia_glue.c:2773 Set Codec
sofia/external/79213777785 at 65.98.107.130:5080 PCMU/8000 20 ms 160
samples 64000 bits

2011-08-16
13:18:00.346166 [DEBUG] sofia_glue.c:4764 Set 2833 dtmf send/recv
payload to 101

2011-08-16
13:18:00.346166 [DEBUG] sofia_glue.c:3014 AUDIO RTP
[sofia/external/79213777785 at 65.98.107.130:5080] 65.98.107.130 port
26266 -> 212.232.72.134 port 49276 codec: 0 ms: 20

2011-08-16
13:18:00.346166 [DEBUG] switch_rtp.c:1623 Starting timer [soft] 160
bytes per 20ms

2011-08-16
13:18:00.347205 [DEBUG] sofia_glue.c:3276 Set 2833 dtmf send payload
to 101

2011-08-16
13:18:00.347205 [DEBUG] sofia_glue.c:3281 Set 2833 dtmf receive
payload to 101

2011-08-16
13:18:00.347205 [DEBUG] mod_sofia.c:681 Local SDP
sofia/external/79213777785 at 65.98.107.130:5080:

v=0

o=FreeSWITCH
1313488814 1313488815 IN IP4 65.98.107.130

s=FreeSWITCH

c=IN
IP4 65.98.107.130

t=0 0

m=audio
26266 RTP/AVP 0 101

a=rtpmap:0
PCMU/8000

a=rtpmap:101
telephone-event/8000

a=fmtp:101
0-16

a=silenceSupp:off
- - - -

a=ptime:20

a=sendrecv




2011-08-16
13:18:00.348214 [DEBUG] sofia.c:4761 Channel
sofia/external/79213777785 at 65.98.107.130:5080 entering state
[completed][200]

2011-08-16
13:18:00.348214 [DEBUG] switch_core_session.c:1939 Application
playback Requires media! pre_answering channel
sofia/external/79213777785 at 65.98.107.130:5080

2011-08-16
13:18:00.348214 [DEBUG] switch_cpp.cpp:618 CoreSession::hangup

2011-08-16
13:18:00.348214 [DEBUG] switch_cpp.cpp:988
sofia/external/79213777785 at 65.98.107.130:5080 destroy/unlink session
from object

2011-08-16
13:18:00.348214 [DEBUG] switch_core_state_machine.c:364
(sofia/external/79213777785 at 65.98.107.130:5080) State ROUTING going
to sleep"










========================================




logs
when I use XML dialplan:




2011-08-16
13:19:49.609765 [DEBUG] switch_core_state_machine.c:371
(sofia/external/79213777785 at 65.98.107.130:5080) State EXECUTE going
to sleep

2011-08-16
13:19:49.609765 [DEBUG] switch_core_state_machine.c:364
(sofia/external/79213777785 at 65.98.107.130:5080) State ROUTING

2011-08-16
13:19:49.609765 [DEBUG] mod_sofia.c:147
sofia/external/79213777785 at 65.98.107.130:5080 SOFIA ROUTING

2011-08-16
13:19:49.609765 [DEBUG] switch_core_state_machine.c:77
sofia/external/79213777785 at 65.98.107.130:5080 Standard ROUTING

2011-08-16
13:19:49.609765 [INFO] mod_dialplan_xml.c:331 Processing unknown
<79213777785>->inbound_type_uri in context public

2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:364
(sofia/external/79213777785 at 65.98.107.130:5080) State ROUTING going
to sleep

2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:371
(sofia/external/79213777785 at 65.98.107.130:5080) State EXECUTE

2011-08-16
13:19:49.615894 [DEBUG] mod_sofia.c:240
sofia/external/79213777785 at 65.98.107.130:5080 SOFIA EXECUTE

2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:157
sofia/external/79213777785 at 65.98.107.130:5080 Standard EXECUTE

2011-08-16
13:19:49.615894 [DEBUG] sofia_glue.c:4650 Audio Codec Compare
[PCMA:8:8000:20:64000]/[PCMU:0:8000:20:64000]

2011-08-16
13:19:49.615894 [DEBUG] sofia_glue.c:4650 Audio Codec Compare
[PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]

2011-08-16
13:19:49.616902 [DEBUG] sofia_glue.c:2773 Set Codec
sofia/external/79213777785 at 65.98.107.130:5080 PCMU/8000 20 ms 160
samples 64000 bits

2011-08-16
13:19:49.616902 [DEBUG] sofia_glue.c:4764 Set 2833 dtmf send/recv
payload to 101

2011-08-16
13:19:49.616902 [DEBUG] sofia_glue.c:3014 AUDIO RTP
[sofia/external/79213777785 at 65.98.107.130:5080] 65.98.107.130 port
23946 -> 212.232.72.134 port 49278 codec: 0 ms: 20

2011-08-16
13:19:49.616902 [DEBUG] switch_rtp.c:1623 Starting timer [soft] 160
bytes per 20ms

2011-08-16
13:19:49.617998 [DEBUG] sofia_glue.c:3276 Set 2833 dtmf send payload
to 101

2011-08-16
13:19:49.617998 [DEBUG] sofia_glue.c:3281 Set 2833 dtmf receive
payload to 101

2011-08-16
13:19:49.617998 [DEBUG] mod_sofia.c:681 Local SDP
sofia/external/79213777785 at 65.98.107.130:5080:

v=0

o=FreeSWITCH
1313491243 1313491244 IN IP4 65.98.107.130

s=FreeSWITCH

c=IN
IP4 65.98.107.130

t=0 0

m=audio
23946 RTP/AVP 0 101

a=rtpmap:0
PCMU/8000

a=rtpmap:101
telephone-event/8000

a=fmtp:101
0-16

a=silenceSupp:off
- - - -

a=ptime:20

a=sendrecv




2011-08-16
13:19:49.619008 [DEBUG] sofia.c:4761 Channel
sofia/external/79213777785 at 65.98.107.130:5080 entering state
[completed][200]

2011-08-16
13:19:49.631344 [DEBUG] switch_ivr_play_say.c:1278 Codec Activated
L16 at 8000hz 1 channels 20ms

2011-08-16
13:19:49.740067 [DEBUG] sofia.c:4761 Channel
sofia/external/79213777785 at 65.98.107.130:5080 entering state
[ready][200]

2011-08-16
13:19:52.879234 [DEBUG] switch_ivr_play_say.c:1648 done playing file

2011-08-16
13:19:52.880333 [NOTICE] switch_core_state_machine.c:189
sofia/external/79213777785 at 65.98.107.130:5080 has executed the last
dialplan instruction, hanging up.







I
have compared logs and saw that case without lua have some strings
unlike case with lua.




"2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:364
(sofia/external/79213777785 at 65.98.107.130:5080) State ROUTING going
to sleep

2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:371
(sofia/external/79213777785 at 65.98.107.130:5080) State EXECUTE

2011-08-16
13:19:49.615894 [DEBUG] mod_sofia.c:240
sofia/external/79213777785 at 65.98.107.130:5080 SOFIA EXECUTE

2011-08-16
13:19:49.615894 [DEBUG] switch_core_state_machine.c:157
sofia/external/79213777785 at 65.98.107.130:5080 Standard EXECUTE"






Many thanks to anyone who can help.




 		 	   		  

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/20110817/02acaac3/attachment-0001.html 


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