Summary:ASTERISK-13636: M() ignored in Dial
Reporter:Alistair Cunningham (acunningham)Labels:
Date Opened:2009-02-23 23:45:20.000-0600Date Closed:2011-06-07 14:08:17
Versions:Frequency of
Description:Asterisk seems to ignore the M() option in Dial(). From extensions.conf:

exten => 123, 1, Dial(SIP/123@|60|oM(test))
exten => 124, 1, Macro(test)

exten => s, 1, Answer
exten => s, 2, Playback(vm-login)

When dialling 123, the destination telephone answers and is immediately connected to the caller, without playing vm-login:

   -- Executing [123@from-internal:1] Dial("SIP/", "SIP/123@|60|oM(test)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called 123@|60|oM(test)
   -- SIP/|60|oM(test)-1861d140 is ringing
   -- SIP/|60|oM(test)-1861d140 answered SIP/
   -- Packet2Packet bridging SIP/ and SIP/|60|oM(test)-1861d140

When dialling 124, vm-login is heard, proving that the macro is working:

   -- Executing [124@from-internal:1] Macro("SIP/", "test") in new stack
   -- Executing [s@macro-test:1] Answer("SIP/", "") in new stack
   -- Executing [s@macro-test:2] Playback("SIP/", "vm-login") in new stack
   -- <SIP/> Playing 'vm-login.gsm' (language 'en')
Comments:By: Joshua C. Colp (jcolp) 2009-02-24 08:01:27.000-0600

This is a configuration issue. You are using | as the argument separator when it should be , - this is causing app_dial to literally dial your entire string but due to the forgiving parsing of chan_sip it does dial at least.