Hello!
I’m brand new to the asterisk world and I’ve run into a problem right off the bat. I have installed asterisk 1.8.0.1 on my Asus RT-N16 router which is running Tomato. I managed to get it running, and I was even able to set up two extensions. I could then call one of my computers from the other. I haven’t set anything to do with calling outside my local LAN.
I ran into a problem as I was trying to explore more options. I set up an extension using the simple example shown here: wiki.asterisk.org/wiki/display/ … nd+Prompts
Basically thisexten=>6000,1,Answer(500)
exten=>6000,2,Playback(hello-world)
exten=>6000,3,Hangup()
What happens? Asterisk shuts down! Or seems to at least. As soon as I dial the extension, the call is answered, and then playback causes a message of “Disconnected from server”. Here is what I see in my prompt with -vvv: == Using SIP RTP CoS mark 5
-- Executing [6000@users:1] Answer("SIP/demo-laptop-00000006", "500") in new stack
-- Executing [6000@users:2] Playback("SIP/demo-laptop-00000006", "hello-world") in new stack
unknown*CLI>
Disconnected from Asterisk server
Once this happens, I can’t call any extensions anymore and I have to type ‘asterisk’ on the command line to start it up again. I’ve tried leaving out the Hangup() line, but it doesn’t make a difference.
Can anybody give any input on what the problem could possibly be? I’m sure this is a boneheaded move on my part, but I’m so new I can’t see what would be wrong. I have changed nothing except for adding three extensions, and making two users so my computers could be registered. I’ve also installed the Asterisk Core sounds, Asterisk Extra sounds, and the Asterisk MOH sounds, all in ulaw format (from asterisk 1.4), so the sounds should be there. I can post the contents of any files that people request.
I am having the same problem with the same router, asterisk 1.8, but I’m using DD-WRT instead of Tomato. I don’t find any backtrace.txt anywhere and I can’t create a core.* file using asterisk -g. Anyone else with similar problems?
I definitely tried those methods to get a core dump but with no luck. The optware package that I installed to get asterisk 1.8 was probably compiled with optimized settings. I certainly can’t change that with my background but here’s some more of what I’ve tried. Originally my extensions.conf had a section like this:
Which resulted in output like this when I made a call to 1001:
== Using SIP RTP CoS mark 5
– Executing [1001@users:1] Answer(“SIP/demo-bob-00000006”, “”) in new stack
– Executing [1001@users:2] Playback(“SIP/demo-bob-00000006”, “hello-world”) in new stack
DD-WRT*CLI>
Disconnected from Asterisk server
And I’m back to a shell prompt and asterisk is killed. If I change my extensions.conf to:
exten => 1001,1,Answer()
exten => 1001,2,Playback(hello-world.gsm)
exten => 1001,3,Hangup()
Then I get this:
Verbosity is at least 10
== Using SIP RTP CoS mark 5
– Executing [1001@users:1] Answer(“SIP/demo-bob-00000005”, “”) in new stack
– Executing [1001@users:2] Playback(“SIP/demo-bob-00000005”, “hello-world.gsm”) in new stack
[Dec 6 21:47:28] WARNING[22606]: file.c:648 ast_openstream_full: File hello-world.gsm does not exist in any format
[Dec 6 21:47:28] WARNING[22606]: file.c:954 ast_streamfile: Unable to open hello-world.gsm (format 0x2 (gsm)): No such file or directory
[Dec 6 21:47:28] WARNING[22606]: app_playback.c:471 playback_exec: ast_streamfile failed on SIP/demo-bob-00000005 for hello-world.gsm
– Auto fallthrough, channel ‘SIP/demo-bob-00000005’ status is ‘UNKNOWN’
Asterisk continues to run. And this file DOES exist. Here:/opt/var/lib/asterisk/sounds/hello-world.gsm
If I put in the full path, it doesn’t change, either. I’ve checked my asterisk.conf and astdatadir points to /opt/var/lib/asterisk.
Has anybody figured out a solution/workaround for this bug? I am using asterisk 10 and the bug is still there. I can use “ringing()” and will get a ringing sound, but all attempts to use “playback()” or “background()” result in an asterisk crash. I’m using Tomato on an Asus RT16.
No-one on this thread has produced any information that would allow it to be debugged. You need to provide a backtrace from an unoptimised build of Asterisk.
As version 10 has been on security fixes only for three months, you will need to reproduce it on version 11 or 1.8.
I am using asterisk 10 and the only other version for tomato is asterisk 1.8. I don’t believe either was compiled with backtrace on.
I tried asterisk -g and safe_asterisk. The latter provides an endless loop of the same error on the terminal and had to be force closed. Ctrl-C did not do anything. The -g option did not drop any files in the /tmp or /opt/tmp directory.
I set all the permissions globally to 777 but it still crashed so its not a permission issue.
Saynumber() also crashes so its definitely something wrong with the sound playback. If I force to Ulaw it does the same thing as gsm.
Its a shot in the dark, but the only thing I can think of is that the sound files provided are v1.4. Could that make a difference? Could the ulaw and gsm file formats have changed between versions?
The file formats will not have changed. Those are the raw formats, anyway. A raw mu-law file cannot be invalid (in the sense that it violates the structure rules for such files; it may still be extremely distorted, or sound like noise).
If you cannot get backtraces, and, in particular, you can’t build from source, you need to report this via the packager, as even identifying this against an already fixed bug will require getting and analyzing the backtraces. The packager needs to take responsibility if they have created a package against which end users cannot raise bug reports.
I have found a new package maintainer “entware” that supports asterisk 1.8. I am working with them for a solution.
But just to beat a dead horse, I am thinking that the Playback() function is causing asterisk to execute a playback.so file and I think there is something wrong with that file.
There are new problems with the new package system that aren’t related to asterisk, but as soon as I have asterisk up, I’ll post here what the results were.
I am having the same issues, I have a Asus RT-N16 with wrt and optware installed.
I have installed Asterisk 1.8 and 11 with the same result:-
When Playback is used the following happens.
DD-WRTCLI> core set verbose 3
Set remote console verbosity to 3
== Using SIP RTP CoS mark 5
– Executing [104@Internal:1] Answer(“SIP/101-00000000”, “60”) in new stack
– Executing [104@Internal:2] Playback(“SIP/101-00000000”, “demo-nogo”) in new stack
DD-WRTCLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
Enable the full log (logger.conf). Turn up the debug level and verbosity to 5. Increase the debug level until you get no more output or there is some indication of why a shut down was initiated.
Note the current trace shows a controlled shutdown, and erroneously initiating one of those is rather difficult.
The only thing that stands out is “Error loading module ‘codec_pcm.so’: File not found”, this may be an issue as I am using .gsm sound files?
I am trying to find out why the module cannot be found since it exists in the modules directory…
I will be grateful for any assistance.
The steps:-
I enabled the full log (logger.conf).
I started asterisk (/opt/sbin/asterisk -cccc)
In the asterisk cli entered the following:-
core set verbose 5
core set debug 5
From extension 101, called 104, then the server quit.
Extract from Debug File
[Apr 12 23:56:02] Asterisk 11.7.0 built by slug @ imitron on a i686 running Linux on 2014-01-16 18:26:28 UTC
[Apr 12 23:56:02] WARNING[9025] loader.c: Error loading module ‘chan_console.so’: File not found
[Apr 12 23:56:02] WARNING[9025] loader.c: Error loading module ‘codec_pcm.so’: File not found
[Apr 12 23:56:02] WARNING[9025] loader.c: Error loading module ‘res_calendar_ews.so’: File not found
[Apr 12 23:56:02] WARNING[9025] loader.c: Error loading module ‘res_calendar_exchange.so’: File not found
[Apr 12 23:56:02] WARNING[9025] loader.c: Error loading module ‘res_calendar_icalendar.so’: File not found
Problem solved!!!
After trawling forums for weeks I found a clue that there may be a timing issue.
In the /etc/asterisk/modules.conf file I added the following:- noload => res_timing_pthread.so
And it works!!!
I am guessing that the asterisk timing module res_timing_pthread.so has a problem running on
dd-wrt and buy not loading it timing is supplied by the OS…