[Asterisk-Users] This should be easy: What happens when the Calling Party hangs up

Julian Lyndon-Smith asterisk at dotr.com
Mon Jun 5 11:10:45 MST 2006


svn trunk 31497

For the life of me, I can't get this :) I want to be able to catch the 
situation where the calling party hangs up *before* the call is 
connected to the called party. My dialplan is thus:

macro DialExternal(exten) {
Dial(Zap/G3/${exten},120,g,M(connected));
         goto DialResult|r${HANGUPCAUSE}|1;
         Hangup();
};

But the goto dialresult is not executed:

Executing [from-sip:1] Macro("SIP/7XX-b403", "DialExternal|xxxxxx") in 
new stack
     -- Executing [macro-DialExternal:1] Dial("SIP/7XX-b403", 
"Zap/G3/07803034440|120|g|M(connected^jmls at mike^706)") in new stack
     -- Requested transfer capability: 0x00 - SPEECH
     -- Called G3/XXXXXX
     -- Zap/10-1 is proceeding passing it to SIP/7XX-b403
     -- Zap/10-1 is ringing
     -- Hungup 'Zap/10-1'
   == Spawn extension (macro-DialExternal, s, 1) exited non-zero on 
'SIP/7XX-b403' in macro 'DialExternal'
   == Spawn extension (macro-DialExternal, s, 1) exited non-zero on 
'SIP/7XX-b403'

What do I need to put where ? I can catch all connected, calling party 
hangups and bad numbers etc

Julian




More information about the asterisk-users mailing list