[Asterisk-Users] Music not on hold
Niclas Gustafsson
niclas.gustafsson at codesense.com
Thu May 8 08:41:47 MST 2003
Ok, surely there must be some other way of getting the timing
to work without the zaptel code?
Well anyways, I've compiled the Zaptel and done an modprobe on the
ztdummy module:
Module Size Used by Not tainted
ztdummy 2580 0 (unused)
zaptel 178880 4 [ztdummy]
ppp_generic 24380 0 [zaptel]
And it looks like the /dev/zap/psuedo works, there is output coming from
it. ;)
What raised my eyebrows was what I saw when inspecting the channels:
*CLI> show channels
Channel (Context Extension Pri ) State Appl.
Data
H323:19312 (cs-pbx 5003 5 ) Up MusicOnHold
(Empty)
1 active channel(s)
-- General --
Name: H323:19312
Type: OH323
Caller ID: 5005
DNID Digits: (N/A)
State: Up (6)
Rings: 0
NativeFormat: 4
WriteFormat: 64
ReadFormat: 4
1st File Descriptor: 36
Frames in: 127640
Frames out: 52
Time to Hangup: 0
-- PBX --
Context: cs-pbx
Extension: 5003
Priority: 5
Call Group: 0
Pickup Group: 0
Application: MusicOnHold
Data: (Empty)
Stack: 0
Blocking in: ast_waitfor_nandfds
-------
Frames out: 52, where all frames from the moh-mp3 should be.
After changing my extension to:
...
exten => 5003,2,Answer
;exten => 5003,3,Playback(beep)
;exten => 5003,4,Wait(2)
exten => 5003,3,MusicOnHold()
exten => 5003,4,Hangup
It was clear that the 52 frames came from the "beep".
So, nothing gets sent out from *...
Any futher ideas?
Regards,
Niclas
-----Original Message-----
From: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Andy Powell
Sent: den 8 maj 2003 15:34
To: asterisk-users at lists.digium.com
Subject: RE: [Asterisk-Users] Music not on hold
Ok, well that's a start,
I don;t know if you NEED to do this next bit but I have MP3Player
working fine, but music on hold wasn't. Have you tried modifying the
makefile in the zaptel directory (if you don't have a zaptel interface)
Change line 82 (ish)
Near the end of line 82, change # ztdummy to ztdummy
(ie remove the #) then continue with the compile (make clean
first) ie.
# cd zaptel
modify the Makefile.
# make clean ; make install
# cd ../libpri
# make clean ; make install
# cd ../asterisk
# make clean ; make install
I don;t have a zaptel interface and it fixed my issue with
music on hold not working. (apparently is helps by providing
some fake timing required)
HTH
Andy
*********** REPLY SEPARATOR ***********
On 08/05/2003 at 13:38 Niclas Gustafsson wrote:
>Yep, it's version 0.59r.
>
>But I shouldn't get the app MP3Player to work if there was some problem
>with the player?
>
>In the below I hear the 'beep' and then nothing.
>
>-- Executing StripMSD("H323:8284", "6") in new stack
>-- Executing Answer("H323:8284", "") in new stack
>-- Executing Playback("H323:8284", "beep") in new stack
>-- Playing 'beep'
>-- Executing Wait("H323:8284", "2") in new stack
>-- Executing MusicOnHold("H323:8284", "loud") in new stack
>-- Started music on hold, class 'loud', on H323:8284
>
>...(I hangup)...
>
>-- Stopped music on hold on H323:8284
>== Spawn extension (cs-pbx, 5003, 5) exited non-zero on 'H323:8284'
>-- Hungup 'H323:8284'
>
>I've tried numerous options to mpg123 (including copying the ones that
>work
>for the app MP3Player) But no success. I believe that mpg123 is working
>fine.
>
>Seems to be something stuck in the pipe between mpg123 and the
>oh323-channel?
>
>Have anyone on the list got the oh323 channel driver to work with the
>music
>on hold? If so could you send me some example configurations?
>
>Regards
>Niclas
>
>
>
>-----Original Message-----
>From: asterisk-users-admin at lists.digium.com
>[mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Andy Powell
>Sent: den 8 maj 2003 00:13
>To: asterisk-users at lists.digium.com
>Subject: Re: [Asterisk-Users] Music not on hold
>
>
>
>What version of mpg123 are you using? I had this problem too and it
>turns
>out, for some unknown reason, I'd downloaded an older version. Make
sure
>it's Version 0.59r ...( do mpg123 -? and it will say in the top few
>lines)
>
>HTH
>
>Andy
>
>*********** REPLY SEPARATOR ***********
>
>On 07/05/2003 at 16:11 Niclas Gustafsson wrote:
>
>>Hello,
>>
>>I just can't seem to get the MusicOnHold function to work out ok.
>>I' managed to get the MP3Player app to work out fine, but
>>when I run the MusicOnHold all i get is siliece.
>>I can see that Asterisk executes mpg123 properly (I think)
>>
>>#ps axuww|grep mp
>>gk 4383 0.0 0.4 3736 552 pts/4 S 15:06 0:00
>>/usr/bin/mpg123 -q -s --mono -r 8000 -b 2048 -f 8192 sample-hold.mp3
>>sample-hold2.mp3
>>
>># ls -l /proc/4382/
>>total 0
>>-r--r--r-- 1 gk gk 0 May 7 16:05 cmdline
>>lrwxrwxrwx 1 gk gk 0 May 7 16:05 cwd ->
>>/var/lib/asterisk/mohmp3
>>
>>From the CLI:
>>This is OK:
>> -- Executing StripMSD("H323:29995", "6") in new stack
>> -- Executing Answer("H323:29995", "") in new stack
>> -- Executing MP3Player("H323:29995",
>>"/var/lib/asterisk/mohmp3/sample-hold.mp3") in new stack
>> == Spawn extension (cs-pbx, 5002, 3) exited non-zero on 'H323:29995'
>> -- Hungup 'H323:29995'
>>
>>This is not ok, (silence):
>>
>> -- Executing StripMSD("H323:17768", "6") in new stack
>> -- Executing Answer("H323:17768", "") in new stack
>> -- Executing MusicOnHold("H323:17768", "loud") in new stack
>> -- Started music on hold, class 'loud', on H323:17768
>>
>>*CLI> show channels
>> Channel (Context Extension Pri ) State Appl.
>>Data
>> H323:17768 (cs-pbx 5003 3 ) Up MusicOnHold
>>loud
>>1 active channel(s)
>>*CLI> Warning, flexibel rate not heavily tested!
>>Warning, flexibel rate not heavily tested!
>>
>>The two extensions looks like this:
>>
>> '_5250XXXX' => 1. StripMSD(4)
>>[pbx_config]
>> '_5002' => 2. Answer()
>>[pbx_config]
>> 3.
>>MP3Player(/var/lib/asterisk/mohmp3/sample-hold.mp3) [pbx_config]
>> 4. Hangup()
>>[pbx_config]
>> '_5003' => 2. Answer()
>>[pbx_config]
>> 3. MusicOnHold(loud)
>>[pbx_config]
>> 4. Hangup()
>>[pbx_config]
>>
>>and musiconhold.conf:
>>;
>>; Music on hold class definitions
>>;
>>[classes]
>>default => quietmp3:/var/lib/asterisk/mohmp3
>>loud => mp3:/var/lib/asterisk/mohmp3
>>;random => quietmp3:/var/lib/asterisk/mohmp3,-z
>>
>>
>>Any Ideas would be appreciated!
>>
>>
>>Regards,
>>
>>Niclas Gustafsson
>>
>>
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list