[Home]

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
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk 1.6.0.6 seems to ignore the M() option in Dial(). From extensions.conf:

[from-internal]
exten => 123, 1, Dial(SIP/123@1.2.3.4:5060|60|oM(test))
exten => 124, 1, Macro(test)

[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/1.2.3.4-186534f0", "SIP/123@1.2.3.4:5060|60|oM(test)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called 123@1.2.3.4:5060|60|oM(test)
   -- SIP/1.2.3.4:5060|60|oM(test)-1861d140 is ringing
   -- SIP/1.2.3.4:5060|60|oM(test)-1861d140 answered SIP/1.2.3.4-186534f0
   -- Packet2Packet bridging SIP/1.2.3.4-186534f0 and SIP/1.2.3.4:5060|60|oM(test)-1861d140

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

   -- Executing [124@from-internal:1] Macro("SIP/1.2.3.4-1861d140", "test") in new stack
   -- Executing [s@macro-test:1] Answer("SIP/1.2.3.4-1861d140", "") in new stack
   -- Executing [s@macro-test:2] Playback("SIP/1.2.3.4-1861d140", "vm-login") in new stack
   -- <SIP/1.2.3.4-1861d140> 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.