Musiconhold at all the wrong times

Hi guys,

I am new to the forums, but not new to Asterisk. I am having a problem with my setup here, and wondering if anyone has any ideas

I have two Asterisk boxes (based on AsteriskNow, but have extensively modified the dialplan etc by hand) and a Mitel 3300 PBX. I have the three talking nicely, and for calls from SIP to an extension on the Mitel it works just peachy.

Two problems:

The first problem comes when trying to make a call from SIP (in this case, a grandstream GX2000 on the Asterisk box) via the Mitel to the PSTN. The call will connect ok, but instead of the ringing tone as the dialled number is ringing, I get the MOH music instead.

Output from the Asterisk console (numbers sanitised) on dialling an external number:

-- Executing [90870xxxxxxx@numberplan-custom-1:1] Answer("SIP/13203-b5803760", "") in new stack -- Executing [90870xxxxxxx@numberplan-custom-1:2] Dial("SIP/13203-b5803760", "SIP/90870xxxxxxx@3300||ri") in new stack -- Called 908708xxxxxxx@3300 -- Call on SIP/3300-082b8628 placed on hold -- Started music on hold, class 'default', on SIP/13203-b5803760 -- SIP/3300-082b8628 is making progress passing it to SIP/13203-b5803760 -- Stopped music on hold on SIP/13203-b5803760

Output from dialling a Mitel extension:

-- Executing [13299@numberplan-custom-1:1] Dial("SIP/13203-b58019e0", "SIP/3300/13299") in new stack -- Called 3300/13299 -- SIP/3300-082b8628 is ringing

(SIP/13203 is the Grandstream on the Asterisk box, SIP/3300 is the SIP route to the Mitel)

Now, I am not sure if it’s the Mitel placing the call on hold, or Asterisk, but it is getting the progress information at least. As I said, this doesn’t happen when calling an internal extension. Is there anyway to “ignore” the hold?

The second problem (which I believe is related) is that every so often when making a call via IAX to the second Asterisk box, when the called party picks up the phone, the caller can hear the called party, but the called party only gets Musiconhold. Put the phone down and redial straight away and it clears the problem.

Output from Asterisk:

-- Executing [12503@numberplan-custom-1:1] Dial("SIP/144.100.xx.xx-08258860", "IAX2/trunk_1/12503") in new stack -- Called trunk_1/12503 -- Call accepted by (format gsm) -- Format for call is gsm -- IAX2/trunk_1-6 answered SIP/ -- Started music on hold, class 'default', on IAX2/trunk_1-6 -- Stopped music on hold on IAX2/trunk_1-6 -- Started music on hold, class 'default', on IAX2/trunk_1-6 -- Stopped music on hold on IAX2/trunk_1-6 -- Hungup 'IAX2/trunk_1-6'

Any ideas?

Can you post your extensions.conf ? Do you have the m option in your dial command string ?

As requested, here is the relevant section in extensions.conf

[numberplan-custom-1] plancomment = DialPlan1 include = default include = parkedcalls exten = _13xxx,1,Dial(SIP/3300/${EXTEN}) exten = _9XXXXXX!,1,Answer exten = _9XXXXXX!,2,Dial(SIP/3300/${EXTEN}||ri)

As you can see, I don’t use the “m” option on there, and have tried to force ringing by setting the “r”

in case it’s needed, here is the (sanitised) sip.conf entry for 3300

[3300] type=friend secret=xxxxx host=144.100.xx.xx context=from-mitel allow=all nat=yes canreinvite=yes


Ok couple of things to try, set the canreinvite to “no” and dont answer the call before sending it to the mitel.
and also are they all on different lan segments ?


actually, I meant to change “canreinvite” to no before posting (was in the process of trying that), as with it set to yes, you get the problem of the called number only ever getting hold music when they answer.

And yes, the Mitel is on and the Asterisk box on - without setting “nat=yes”, it is only ever one way audio.

I also originally had it set to just dial the Mitel (i.e. not answer), but the same result occurs - hold music instead of a ring tone. I put the Answer in, as I know in other areas of the dialplan, it’s the only way to get Asterisk to generate the UK dial tones.

hi,is this problem sloved? i happen got this proglem,too.

The question is twelve years old. Asterisk has changed a lot since then!