[macro-normal]
exten => s,1,Dial(${ARG2}|15)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG1},u)
exten => s-BUSY,1,Voicemail(${ARG1},b)
exten => s-CHANUNAVAIL,1,Voicemail(${ARG1},u)
But it doesnt go to chanunavail:
notmutt*CLI>
-- Executing [44988@internal:1] Dial("SIP/44987-b7401ed0",
"Zap/g1/44988") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g1/44988
-- Zap/1-1 is proceeding passing it to SIP/44987-b7401ed0
-- Accepting call from '44987' to '44988' on channel 0/16, span 1
-- Executing [44988@incoming:1] Macro("Zap/16-1",
"normal|44988|SIP/44988") in new stack
-- Executing [s@macro-normal:1] Dial("Zap/16-1", "SIP/44988|15") in
new stack
-- Called 44988
-- Channel 0/1, span 1 got hangup
-- Hungup 'Zap/1-1'
== Everyone is busy/congested at this time (1:0/0/1)
== Auto fallthrough, channel 'SIP/44987-b7401ed0' status is 'CHANUNAVAIL'
-- Channel 0/16, span 1 got hangup request
== Spawn extension (macro-normal, s, 1) exited non-zero on 'Zap/16-1'
in macro 'normal'
== Spawn extension (macro-normal, s, 1) exited non-zero on 'Zap/16-1'
-- Hungup 'Zap/16-1'
Works for noanswer:
notmutt*CLI>
-- Executing [44988@internal:1] Dial("SIP/44987-b7328220",
"Zap/g1/44988") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g1/44988
-- Zap/1-1 is proceeding passing it to SIP/44987-b7328220
-- Accepting call from '44987' to '44988' on channel 0/17, span 1
-- Executing [44988@incoming:1] Macro("Zap/17-1",
"normal|44988|SIP/44988") in new stack
-- Executing [s@macro-normal:1] Dial("Zap/17-1", "SIP/44988|15") in
new stack
-- Called 44988
-- SIP/44988-09598080 is ringing
-- Zap/1-1 is ringing
-- Nobody picked up in 15000 ms
-- Executing [s@macro-normal:2] Goto("Zap/17-1", "s-NOANSWER|1") in
new stack
-- Goto (macro-normal,s-NOANSWER,1)
-- Executing [s-NOANSWER@macro-normal:1] VoiceMail("Zap/17-1",
"44988|u") in new stack
-- <Zap/17-1> Playing 'vm-theperson' (language 'en')