[asterisk-users] Macro Goofiness

Peder @ NetworkOblivion peder at networkoblivion.com
Tue Jul 10 14:52:02 CDT 2007


I am trying to use a macro to screen calls by calling several different 
phones at the same time in different groups.  Find me will not work and 
queues will not work either.  Trust me, I've tried them both and they 
don't work like they should.  Here is what I have:

A call comes into 6084 and does the following (in default context):

exten => 6084,1,NoOp(test)
exten => 6084,2,SetMusicOnHold(default)
exten => 6084,3,Dial(LOCAL/office,40,m)
exten => 6084,4,Voicemail(6084|u)
exten => 6084,5,Hangup


That calls the following, also in default context:

exten => office,1,Dial(SIP/6080,30,M(screen))
exten => office,2,Hangup


That calls the screening macro:

[macro-screen]
exten => s,1,Wait(1)
exten => s,2,Background(testmessage)
exten => s,3,WaitExten(5)
exten => s,4,NoOp(${MACRO_RESULT})
exten => h,1,Set(MACRO_RESULT=CONTINUE)
exten => h,2,NoOp(${MACRO_RESULT})
exten => i,1,Set(MACRO_RESULT=CONTINUE)
exten => i,2,NoOp(${MACRO_RESULT})
exten => t,1,Set(MACRO_RESULT=CONTINUE)
exten => t,2,NoOp(${MACRO_RESULT})
exten => 1,1,NoOp(Caller accepted)
exten => 2,1,NoOp(Pressed 2)


A call comes in, plays music on hold and calls the 6080 phone.  It plays 
the message and waits for a key.  According to everything I've read, if 
I do anything but hit "1", it should fall through and NOT bridge the 
call, which should make the call go to voicemail.  What happens is that 
no matter what I do, it does bridge the call.  If I hit "1", "2", "7" or 
just wait, the call is bridged together.  I've seen several samples that 
are the same as this and say it should work.  I can't figure it out. 
I've tried it on 1.4.7 and 1.4.5 and both have the same issue.

Any ideas?  If I hit a key during the WaitExten, I do NOT see the NoOp 
in line 4.  It's like anything just pauses execution and bridges the 
call.  Thanks for any tips (except people that tell me to use find 
me/follow me, that won't work).

Peder




More information about the asterisk-users mailing list