POSSA / freepbx-weather-by-zip

FreePBX module, reads back weather forcast from dtmf zip code input
4 stars 5 forks source link

Broken Pipe Error #26

Open nexusbroadcast opened 10 years ago

nexusbroadcast commented 10 years ago

I have never been able to get this to work. I am able to dial *947 - it answers and asks for the zip code. I dial that zip code and it says please wait while we retrieve your report - but then it just disconnects the call. On centos 6.5 FreePBX 11..

[2014-02-02 18:11:50] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:1] Answer("SIP/103-00000002", "") in new stack
[2014-02-02 18:11:50] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:2] Wait("SIP/103-00000002", "1") in new stack
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:3] Set("SIP/103-00000002", "TIMEOUT(digit)=7") in new stack
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] func_timeout.c: -- Digit timeout set to 7.000
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:4] Set("SIP/103-00000002", "TIMEOUT(response)=10") in new stack
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] func_timeout.c: -- Response timeout set to 10.000
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:5] AGI("SIP/103-00000002", "googletts.agi,"At the beep enter the zip code of the weather report you wish to retrieve",en") in new stack
[2014-02-02 18:11:51] VERBOSE[29346][C-0000000b] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[2014-02-02 18:11:52] VERBOSE[29346][C-0000000b] res_agi.c: -- Playing '/tmp/015ad77bd2ece874230bfd177e5acd28' (escape_digits=) (sample_offset 0)
[2014-02-02 18:11:55] VERBOSE[29346][C-0000000b] res_agi.c: -- <SIP/103-00000002>AGI Script googletts.agi completed, returning 0
[2014-02-02 18:11:55] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:6] Read("SIP/103-00000002", "ZIPCODE,beep,5,,,") in new stack
[2014-02-02 18:11:55] VERBOSE[29346][C-0000000b] app_read.c: -- Accepting a maximum of 5 digits.
[2014-02-02 18:11:55] VERBOSE[29346][C-0000000b] file.c: -- <SIP/103-00000002> Playing 'beep.ulaw' (language 'en')
[2014-02-02 18:11:58] VERBOSE[29346][C-0000000b] app_read.c: -- User entered '75457'
[2014-02-02 18:11:58] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:7] AGI("SIP/103-00000002", "googletts.agi,"Please hold a moment while we retrieve your report",en") in new stack
[2014-02-02 18:11:58] VERBOSE[29346][C-0000000b] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[2014-02-02 18:11:58] VERBOSE[29346][C-0000000b] res_agi.c: -- Playing '/tmp/f669945debe9bb12cc9f53be72fd9b5b' (escape_digits=) (sample_offset 0)
[2014-02-02 18:12:00] VERBOSE[29353] pbx_spool.c: -- Attempting call on Local/s@tc-maint for application NoCDR() (Retry 1)
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:1] NoCDR("Local/s@tc-maint-00000009;2", "") in new stack
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:2] Set("Local/s@tc-maint-00000009;2", "TCMAINT=RETURN") in new stack
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:3] GosubIf("Local/s@tc-maint-00000009;2", "0?timeconditions,3,1()") in new stack
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:4] GosubIf("Local/s@tc-maint-00000009;2", "0?timeconditions,4,1()") in new stack
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:5] System("Local/s@tc-maint-00000009;2", "/var/lib/asterisk/bin/schedtc.php 60 /var/spool/asterisk/outgoing 0") in new stack
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: -- Executing [s@tc-maint:6] Answer("Local/s@tc-maint-00000009;2", "") in new stack
[2014-02-02 18:12:00] NOTICE[29353] pbx_spool.c: Call completed to Local/s@tc-maint
[2014-02-02 18:12:00] VERBOSE[29354][C-0000000c] pbx.c: == Spawn extension (tc-maint, s, 6) exited non-zero on 'Local/s@tc-maint-00000009;2'
[2014-02-02 18:12:01] VERBOSE[29346][C-0000000b] res_agi.c: -- <SIP/103-00000002>AGI Script googletts.agi completed, returning 0
[2014-02-02 18:12:01] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:8] AGI("SIP/103-00000002", "nv-weather-wunderground.php,75457") in new stack
[2014-02-02 18:12:01] VERBOSE[29346][C-0000000b] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/nv-weather-wunderground.php
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:01] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe

... hundreds of broken pipe errors removed for brevety ...

[2014-02-02 18:12:02] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:02] ERROR[29346][C-0000000b] utils.c: write() returned error: Broken pipe
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] res_agi.c: -- <SIP/103-00000002>AGI Script nv-weather-wunderground.php completed, returning 0
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:9] NoOp("SIP/103-00000002", "Forecast: ") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:10] AGI("SIP/103-00000002", "googletts.agi,"",en") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] res_agi.c: -- <SIP/103-00000002>AGI Script googletts.agi completed, returning 0
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [*947@from-internal:11] Macro("SIP/103-00000002", "hangupcall,") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/103-00000002", "1?theend") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Goto (macro-hangupcall,s,3)
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [s@macro-hangupcall:3] ExecIf("SIP/103-00000002", "0?Set(CDR(recordingfile)=)") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [s@macro-hangupcall:4] Hangup("SIP/103-00000002", "") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/103-00000002' in macro 'hangupcall'
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: == Spawn extension (from-internal, *947, 11) exited non-zero on 'SIP/103-00000002'
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: -- Executing [h@from-internal:1] Hangup("SIP/103-00000002", "") in new stack
[2014-02-02 18:12:02] VERBOSE[29346][C-0000000b] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/103-00000002'
lgaetz commented 10 years ago

What version of the module are you using, latest is 1.3.5? Do you get the same errors when using the NOAA weather engine?

nexusbroadcast commented 10 years ago

It is 1.3.5 - I cannot -- with noaa - it just disconnects the call quickly with the error No application 'Flite' for extension - I am working on getting Flite going - but I cant get it to register with asterisk.

lgaetz commented 10 years ago

Asterisk version? Are you using a distro or manual install. By default, wunderground agi file writes a log file to /var/log/asterisk/nv-weather-underground.txt which may not be writable on your system. Can you confirm?

nexusbroadcast commented 10 years ago

It is 11.7 - The file nv-weather-underground.txt does not appear in the directory you mentioned. I changed the permissions to 777 and tried again

On Sun, Feb 2, 2014 at 6:46 PM, Lorne Gaetz notifications@github.comwrote:

Asterisk version? Are you using a distro or manual install. By default, wunderground agi file writes a log file to /var/log/asterisk/nv-weather-underground.txt which may not be writable on your system. Can you confirm?

Reply to this email directly or view it on GitHubhttps://github.com/POSSA/freepbx-weather-by-zip/issues/26#issuecomment-33918581 .

nexusbroadcast commented 10 years ago

It was originally installed from a distro

lgaetz commented 10 years ago

locate the file: /var/www/html/admin/modules/weatherzip/agi-bin/nv-weather-wunderground.php near the top is this line: $debug = 1; change it to $debug = 0;

At the CLI, reload the dialplan with: amportal a r

nexusbroadcast commented 10 years ago

I have been trying to do that - but as soon as I restart freepbx and asterisk - it overwrites nv-weather-wunderground.php with the default file.

lgaetz commented 10 years ago

Then you are editing the wrong file, note the directions again.

nexusbroadcast commented 10 years ago

Yes you are absolutely correct. My apologies for sound and acting like a complete noob here. Next problem is I dont have the weatherzip directory under the modules directory. Shall I copy them over?

lgaetz commented 10 years ago

What?? If you are running the latest version of this module on Centos you must have a weatherzip directory.

nexusbroadcast commented 10 years ago

Again my apologies - I think my brain isnt screwed on securely today. There were there where you said and I made the edits. Same results - still no log file. Note the log file says it is launching the script here: Launched AGI Script /var/lib/asterisk/agi-bin/nv-weather-wunderground.php

lgaetz commented 10 years ago

Okay, so you made the edits which should DISABLE the log file from being written. You did the 'amportal a r' command to reload everything, and a test call still gives hundreds of broken pipe errors?

nexusbroadcast commented 10 years ago

Yes that is correct - no obvious changes in the output.

lgaetz commented 10 years ago

Okay, well we have exhausted my ideas for tonight. If I ever stumble upon a solution I will update this ticket and you will get an email notice. Please update this ticket if you ever find the problem, it may be helpful to others.

nexusbroadcast commented 10 years ago

Thanks for your help. While I am not getting a log from your application - I did find these errors in the freepbx logs

creiners commented 9 years ago

Was there ever a resolution to this? I am also having this exact issue FreePBX12 on CentOS

nexusbroadcast commented 9 years ago

No solution was ever found

lgaetz commented 9 years ago

Try upgrading to latest version (1.3.6) and retest.

TheWebMachine commented 9 years ago

Then issue exists in v 1.3.5 as well. While there is a commit for v 1.3.6, it only resolves issue #6, which is unrelated entirely.

TheWebMachine commented 9 years ago

Also, flite is working fine in my other TTS calls. What i do notice in the logs is that it says "Flite" and not "flite" (note: CaSe). Perhaps that is the issue?

lgaetz commented 9 years ago

Version 1.3.6 of the module should fix this issue, but it was misisng from the download site until now. Upgrade to 1.3.6 and retest. The latest commit says it is a fix for #6, but that is a typo, is should say #26.