Hi all, I'm stuck trying to figure out why my lua app does not output any audio or detect any DTMF input. This app has been installed and running successfully on another server. The lua code in question is: read(absolute_path_to_wav, 0); Logs show: 2010-03-29 20:12:15.596856 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-29 20:12:15.596856 [DEBUG] switch_ivr_play_say.c:1444 done playing file DTMF input is not being recognized, nothing is showing up in the logs. App is being accessed with SIP from a remote client. I'm not really sure how to debug this, so any pointers are appreciated. This is FS from trunk. Thanks, Neil
oops, sorry about that. Here's read: function read(file, delay) if (digits == "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "Prompt", "\t", file, "\n"); digits = session:read(1, 1, file, delay, "#"); if (digits ~= "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "dtmf", "\t", file, "\t", digits, "\n"); end end end On Mon, Mar 29, 2010 at 8:28 PM, Brian West <brian@freeswitch.org> wrote:
what is this code?
/b
On Mar 29, 2010, at 10:21 PM, Neil Patel wrote:
read(absolute_path_to_wav, 0);
_______________________________________________ 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
Neil, Are you sure you receive the DTMFs ? You should see the DTMF events decoded by FS on the console (/log 7), even without any app reading them. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 30/03/2010 à 06:19, Neil Patel a écrit :
oops, sorry about that. Here's read:
function read(file, delay) if (digits == "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "Prompt", "\t", file, "\n"); digits = session:read(1, 1, file, delay, "#"); if (digits ~= "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "dtmf", "\t", file, "\t", digits, "\n"); end end end
On Mon, Mar 29, 2010 at 8:28 PM, Brian West <brian@freeswitch.org> wrote: what is this code?
/b
On Mar 29, 2010, at 10:21 PM, Neil Patel wrote:
read(absolute_path_to_wav, 0);
_______________________________________________ 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
_______________________________________________ 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
Here is the log output (with names/IPs hidden) from my broken server executing my lua app: EXECUTE sofia/internal/1001@broken.server.eduhash(insert/broken.server.IP-spymap/1001/e93b00d7-fb0f-413b-9f17-207ea444239a) EXECUTE sofia/internal/1001@broken.server.eduhash(insert/broken.server.IP-last_dial/1001/5000) EXECUTE sofia/internal/1001@broken.server.eduhash(insert/broken.server.IP-last_dial/global/e93b00d7-fb0f-413b-9f17-207ea444239a) EXECUTE sofia/internal/1001@broken.server.edu lua(AO/otalo.lua) 2010-03-30 08:49:24.092796 [INFO] switch_cpp.cpp:1142 otalo.lua : caller id = 1001 2010-03-30 08:49:24.093798 [INFO] switch_cpp.cpp:1142 otalo.lua : user id = 1 2010-03-30 08:49:24.099786 [DEBUG] sofia_glue.c:2594 AUDIO RTP [sofia/internal/1001@broken.server.edu] broken.server.IP port 26884 -> 127.0.0.1 port 4000 codec: 3 ms: 20 2010-03-30 08:49:24.099786 [DEBUG] switch_rtp.c:1182 Starting timer [soft] 160 bytes per 20ms 2010-03-30 08:49:24.101833 [DEBUG] mod_sofia.c:636 Local SDP sofia/internal/ 1001@broken.server.edu: v=0 o=FreeSWITCH 1269937280 1269937281 IN IP4 broken.server.IP s=FreeSWITCH c=IN IP4 broken.server.IP t=0 0 m=audio 26884 RTP/AVP 3 101 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv 2010-03-30 08:49:24.101833 [DEBUG] switch_core_session.c:638 Send signal sofia/internal/1001@broken.server.edu [BREAK] 2010-03-30 08:49:24.101833 [NOTICE] switch_cpp.cpp:554 Channel [sofia/internal/1001@broken.server.edu] has been answered 2010-03-30 08:49:24.101833 [DEBUG] sofia.c:4152 Channel sofia/internal/ 1001@broken.server.edu entering state [completed][200] 2010-03-30 08:49:24.146888 [DEBUG] sofia.c:4152 Channel sofia/internal/ 1001@broken.server.edu entering state [ready][200] 2010-03-30 08:49:25.115874 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:44.335874 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:44.835892 [INFO] switch_cpp.cpp:1142 otalo.lua : SELECT id, name_file FROM app_tbl ORDER BY id ASC 2010-03-30 08:49:44.835892 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:44.835892 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:44.855887 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:46.355889 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:46.375877 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:49.495889 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:49.515889 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:50.215892 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:50.735890 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:50.735890 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:50.755890 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 08:49:52.515889 [DEBUG] switch_ivr_play_say.c:1444 done playing file 2010-03-30 08:49:52.535889 [DEBUG] switch_ivr_play_say.c:1152 Codec Activated L16@8000hz 1 channels 20ms And here is pretty much up to the same point in the app executed on my older, working server: EXECUTE sofia/internal/1001@working.server.eduhash(insert/working.server.edu-spymap/1001/e8b73a98-b783-4c73-8547-2e2c20786b0d) EXECUTE sofia/internal/1001@working.server.eduhash(insert/working.server.edu-last_dial/1001/5000) EXECUTE sofia/internal/1001@working.server.eduhash(insert/working.server.edu-last_dial/global/e8b73a98-b783-4c73-8547-2e2c20786b0d) EXECUTE sofia/internal/1001@working.server.edu lua(AO/otalo.lua) 2010-03-30 21:20:51.763507 [DEBUG] switch_cpp.cpp:554 sofia/internal/ 1001@working.server.edu receive message [ANSWER] 2010-03-30 21:20:51.763507 [DEBUG] sofia_glue.c:2381 AUDIO RTP [sofia/internal/1001@working.server.edu] working.server.edu port 32338 -> 127.0.0.1 port 4002 codec: 3 ms: 20 2010-03-30 21:20:51.763507 [DEBUG] switch_rtp.c:1167 Starting timer [soft] 160 bytes per 20ms 2010-03-30 21:20:51.764569 [DEBUG] mod_sofia.c:571 Local SDP sofia/internal/ 1001@working.server.edu: v=0 o=FreeSWITCH 1269931913 1269931914 IN IP4 working.server.edu s=FreeSWITCH c=IN IP4 working.server.edu t=0 0 m=audio 32338 RTP/AVP 3 101 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv 2010-03-30 21:20:51.765633 [DEBUG] switch_core_session.c:645 Send signal sofia/internal/1001@working.server.edu [BREAK] 2010-03-30 21:20:51.765633 [DEBUG] sofia.c:3774 Channel sofia/internal/ 1001@working.server.edu entering state [completed][200] 2010-03-30 21:20:51.765633 [NOTICE] switch_cpp.cpp:554 Channel [sofia/internal/1001@working.server.edu] has been answered 2010-03-30 21:20:51.765633 [DEBUG] switch_channel.c:182 sofia/internal/ 1001@working.server.edu receive message [AUDIO_SYNC] 2010-03-30 21:20:52.132157 [DEBUG] sofia.c:3774 Channel sofia/internal/ 1001@working.server.edu entering state [ready][200] 2010-03-30 21:20:52.346042 [INFO] switch_rtp.c:1987 Auto Changing port from 127.0.0.1:4002 to 75.42.72.134:4002 2010-03-30 21:20:52.766898 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:20:52.766898 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:11.985960 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:12.486077 [INFO] switch_cpp.cpp:1129 otalo.lua : SELECT id, name_file FROM app_tbl ORDER BY id ASC 2010-03-30 21:21:12.486077 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:12.486077 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:12.506154 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:12.506154 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:14.006120 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:14.026376 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:14.026376 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:17.146408 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:17.166614 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:17.166614 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:17.866526 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:18.366651 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:18.366651 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:18.386040 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:18.386040 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:20.146593 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:20.166701 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:20.166701 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:23.286448 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:23.306606 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:23.306606 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:24.126360 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:24.646291 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:24.646291 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:24.666736 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:24.666736 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:26.166139 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:26.186290 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:26.186290 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:29.306221 [DEBUG] switch_ivr_play_say.c:1446 done playing file 2010-03-30 21:21:29.326378 [DEBUG] switch_ivr_play_say.c:1154 Codec Activated L16@8000hz 1 channels 20ms 2010-03-30 21:21:29.326378 [DEBUG] switch_core_io.c:652 sofia/internal/ 1001@working.server.edu receive message [TRANSCODING_NECESSARY] 2010-03-30 21:21:30.126585 [DEBUG] switch_ivr_play_say.c:1446 done playing file I think the most significantly the broken server doesn't give the '... receive message [TRANSCODING_NECESSARY]' output. The new server is Ubuntu 9.0.4 running FS downloaded from main trunk in Dec 09, the broken is CentOS 5.4 running FS main trunk downloaded this month (not sure how to get version info from FS). Let me know if more info is necessary to solve this, and thanks again! Neil On Mon, Mar 29, 2010 at 9:19 PM, Neil Patel <neilp@cs.stanford.edu> wrote:
oops, sorry about that. Here's read:
function read(file, delay) if (digits == "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "Prompt", "\t", file, "\n"); digits = session:read(1, 1, file, delay, "#"); if (digits ~= "") then logfile:write(sessid, "\t", session:getVariable("caller_id_number"), "\t", os.time(), "\t", "dtmf", "\t", file, "\t", digits, "\n"); end end end
On Mon, Mar 29, 2010 at 8:28 PM, Brian West <brian@freeswitch.org> wrote:
what is this code?
/b
On Mar 29, 2010, at 10:21 PM, Neil Patel wrote:
read(absolute_path_to_wav, 0);
_______________________________________________ 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
in fs_cli run version. For Example: fs_cli -x "version" FreeSWITCH Version 1.0.4 (exported)
Running fs_cli then running version also works. -- freeswitch@internal> version FreeSWITCH Version 1.0.4 (exported)
Old (Ubuntu) working FS install: FreeSWITCH Version 1.0.trunk (15859) New (CentOS) broken FS install: FreeSWITCH Version 1.0.trunk (17071) On Tue, Mar 30, 2010 at 9:27 AM, William Suffill <william.suffill@gmail.com>wrote:
Running fs_cli then running version also works. -- freeswitch@internal> version
FreeSWITCH Version 1.0.4 (exported)
_______________________________________________ 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
Could this be a firewall issue? I have opened up ports 5060 and 5080 on the server manually using iptables, which I don't believe I had to do on the old server. What other ports should be opened of the ones listed here<http://wiki.freeswitch.org/wiki/Firewall>, especially for audio I/O? For reference netstat output is pasted below. Thanks, Neil ================== [root@topaz ~]# netstat -tupln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 3217/hpiod tcp 0 0 128.32.226.175:5060 0.0.0.0:* LISTEN 16609/freeswitch tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 19228/mysqld tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2906/portmap tcp 0 0 127.0.0.1:8021 0.0.0.0:* LISTEN 16609/freeswitch tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 18870/cupsd tcp 0 0 128.32.226.175:5080 0.0.0.0:* LISTEN 16609/freeswitch tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3288/sendmail: acce tcp 0 0 0.0.0.0:1021 0.0.0.0:* LISTEN 2959/rpc.statd tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 3222/python tcp 0 0 ::1:5060 :::* LISTEN 16609/freeswitch tcp 0 0 :::80 :::* LISTEN 22999/httpd tcp 0 0 :::22 :::* LISTEN 19266/sshd tcp 0 0 :::443 :::* LISTEN 22999/httpd udp 0 0 128.32.226.175:5060 0.0.0.0:* 16609/freeswitch udp 0 0 0.0.0.0:68 0.0.0.0:* 2809/dhclient udp 0 0 128.32.226.175:5080 0.0.0.0:* 16609/freeswitch udp 0 0 0.0.0.0:5353 0.0.0.0:* 3389/avahi-daemon: udp 0 0 0.0.0.0:47338 0.0.0.0:* 3389/avahi-daemon: udp 0 0 0.0.0.0:111 0.0.0.0:* 2906/portmap udp 0 0 0.0.0.0:631 0.0.0.0:* 18870/cupsd udp 0 0 0.0.0.0:1015 0.0.0.0:* 2959/rpc.statd udp 0 0 0.0.0.0:1018 0.0.0.0:* 2959/rpc.statd udp 0 0 ::1:5060 :::* 16609/freeswitch udp 0 0 :::5353 :::* 3389/avahi-daemon: udp 0 0 :::43892 :::* 3389/avahi-daemon: On Tue, Mar 30, 2010 at 11:34 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Old (Ubuntu) working FS install: FreeSWITCH Version 1.0.trunk (15859)
New (CentOS) broken FS install: FreeSWITCH Version 1.0.trunk (17071)
On Tue, Mar 30, 2010 at 9:27 AM, William Suffill < william.suffill@gmail.com> wrote:
Running fs_cli then running version also works. -- freeswitch@internal> version
FreeSWITCH Version 1.0.4 (exported)
_______________________________________________ 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
participants (4)
-
Brian West
-
David Ponzone
-
Neil Patel
-
William Suffill