<br><font size=2 face="sans-serif">Hello,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I have been trying to completely disable music on hold on my asterisk system.
When a call is put on hold I do not want any music on hold, but I would
like the remote user to get informed of this event (depending on the technology
e.g. with a SIP reinvite and an SDP indicating the call is on hold).</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
I have searched and tried out various approaches, but when putting the
call on hold by a SIP user, I always get an indication that asterisk tries
to play music on hold.</font><font size=3> The remote side does not get
a re-invite.<br>
</font><font size=2 face="sans-serif"><br>
What I have tried so far:</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
- no musiconhold.conf in the hope that lack of the configuration file disables
moh</font><font size=3> </font><font size=2 face="sans-serif"><br>
- a musiconhold.conf where everything is commented out</font><font size=3>
</font><font size=2 face="sans-serif"><br>
- modules.conf with 'unload => res_musiconhold.so'</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
When I start asterisk, it indicates that it disables music on hold:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
[Jan 28 10:15:02] WARNING[31052]: res_musiconhold.c:1784 load_module: No
music on hold classes configured, disabling music on hold.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
== Registered application 'MusicOnHold'</font><font size=3> </font><font size=2 face="sans-serif"><br>
== Registered application 'WaitMusicOnHold'</font><font size=3>
</font><font size=2 face="sans-serif"><br>
== Registered application 'SetMusicOnHold'</font><font size=3> </font><font size=2 face="sans-serif"><br>
== Registered application 'StartMusicOnHold'</font><font size=3>
</font><font size=2 face="sans-serif"><br>
== Registered application 'StopMusicOnHold'</font><font size=3>
</font><font size=2 face="sans-serif"><br>
res_musiconhold.so => (Music On Hold Resource)</font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
However, when I set up a sip call between two sip phones and one end puts
the call on hold, then I always get the following message and the remote
side is not informed that the call is on hold:</font><font size=3> </font><font size=2 face="sans-serif"><br>
</font>
<br><font size=3> -- Executing [s@macro-stddial:2] Dial("SIP/2222-00000000",
"SIP/4444") in new stack</font>
<br><font size=3> == Using SIP RTP CoS mark 5</font>
<br><font size=3> -- Called 4444</font>
<br><font size=3> -- SIP/4444-00000001 is ringing</font>
<br><font size=3> -- SIP/4444-00000001 answered SIP/2222-00000000</font>
<br><font size=3> -- Native bridging SIP/2222-00000000 and
SIP/4444-00000001</font>
<br><font size=3>later when the call is put on hold:</font>
<br><font size=3> -- Music class default requested but no
musiconhold loaded.<br>
<br>
</font><font size=2 face="sans-serif"><br>
Can anybody give me any pointers or tell me how to disable moh completely
and send re-invites for call hold?</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
thanks for any help</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Urs</font><font size=3> <br>
<br>
</font><font size=2 face="sans-serif"><br>
My easiest configuration with Asterisk 1.6.2.7:</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
modules.conf</font><font size=3> </font><font size=2 face="sans-serif"><br>
----------------------------------------------------------</font><font size=3>
</font><font size=2 face="sans-serif"><br>
[modules]</font><font size=3> </font><font size=2 face="sans-serif"><br>
autoload=yes</font><font size=3> </font><font size=2 face="sans-serif"><br>
; res_phoneprov requires func_strings.so to be loaded:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
preload => func_strings.so</font><font size=3> </font><font size=2 face="sans-serif"><br>
noload => pbx_gtkconsole.so</font><font size=3> </font><font size=2 face="sans-serif"><br>
noload => res_musiconhold.so</font><font size=3> <br>
<br>
</font><font size=2 face="sans-serif"><br>
extensions.conf:</font><font size=3> </font><font size=2 face="sans-serif"><br>
-----------------------------------------------------------</font><font size=3>
</font><font size=2 face="sans-serif"><br>
[general]</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
[default]</font><font size=3> </font><font size=2 face="sans-serif"><br>
;SIP extensions</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => _XXXX,1,Macro(stddial,SIP/${EXTEN})</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
[macro-stddial]</font><font size=3> </font><font size=2 face="sans-serif"><br>
; ${ARG1} - What to dial</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => s,1,Answer()</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => s,n,Dial(${ARG1})</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => s,n,Goto(s-${DIALSTATUS},1)</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => s-NOANSWER,1,Hangup</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => s-BUSY,1,Hangup</font><font size=3> </font><font size=2 face="sans-serif"><br>
exten => _s-.,1,NoOp</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
sip.conf:</font><font size=3> </font><font size=2 face="sans-serif"><br>
--------------------------------------------------------</font><font size=3>
</font><font size=2 face="sans-serif"><br>
[general]</font><font size=3> </font><font size=2 face="sans-serif"><br>
language=en
; configured default language</font><font size=3>
</font><font size=2 face="sans-serif"><br>
dtmfmode=rfc2833
; default dtmfmode for sending DTMF (Dual-tone multi-frequency)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
directrtpsetup=no
; Disable the new experimental direct RTP setup</font><font size=3>
</font><font size=2 face="sans-serif"><br>
allowtransfer=yes
; enable all transfers for peers and users</font><font size=3> </font><font size=2 face="sans-serif"><br>
match_auth_username=yes ; use
'authentication username' instead of 'username for authentication' (if
available)</font><font size=3> </font><font size=2 face="sans-serif"><br>
session-timers=originate ; Request
and run session-timers always</font><font size=3> </font><font size=2 face="sans-serif"><br>
session-expires=3600 ;
maximum session refresh interval</font><font size=3> </font><font size=2 face="sans-serif"><br>
session-minse=600
; minimum session refresh interval</font><font size=3> </font><font size=2 face="sans-serif"><br>
session-refresher=uas
; session refresher is user-agent-server</font><font size=3> </font><font size=2 face="sans-serif"><br>
;allowguest=no
; Allow or reject guest calls (default is yes)</font><font size=3>
</font><font size=2 face="sans-serif"><br>
notifyhold = yes
; Notify subscriptions on HOLD state (default: no)</font><font size=3>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
udpbindaddr=0.0.0.0:5060 ; Servers
IP address (all) to bind UDP listen socket to</font><font size=3> </font><font size=2 face="sans-serif"><br>
srvlookup=yes
; enable DNS SRV lookups on outbound calls</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
[allusers](!)</font><font size=3> </font><font size=2 face="sans-serif"><br>
context=default</font><font size=3> </font><font size=2 face="sans-serif"><br>
type=friend
; All options are possible</font><font size=3> </font><font size=2 face="sans-serif"><br>
qualify=2000
; no, 2000=2 sec to wait for reply before remote party
is considered unreachable</font><font size=3> </font><font size=2 face="sans-serif"><br>
;qualifyfreq=60
; Qualification: How often to check in seconds</font><font size=3>
</font><font size=2 face="sans-serif"><br>
canreinvite=yes
; certain devices do not like change of RTP source/destination
during call</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
[4444](allusers)</font><font size=3> </font><font size=2 face="sans-serif"><br>
host=dynamic ; the device needs to register</font><font size=3>
</font><font size=2 face="sans-serif"><br>
secret = 1234</font><font size=3> </font><font size=2 face="sans-serif"><br>
[3333](allusers)</font><font size=3> </font><font size=2 face="sans-serif"><br>
host=dynamic ; the device needs to register</font><font size=3>
</font><font size=2 face="sans-serif"><br>
secret = 1234</font><font size=3> </font><font size=2 face="sans-serif"><br>
[2222](allusers)</font><font size=3> </font><font size=2 face="sans-serif"><br>
host=dynamic ; the device needs to register</font><font size=3>
</font><font size=2 face="sans-serif"><br>
secret = 1234</font><font size=3> </font>
<br>