Predial Hook destroys Wake-Up Calls

I’m using the code listed in this topic:

[macro-dialout-one-predial-hook]
exten => s,1,NoOp(Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf)
exten => s,n,ExecIf($["${CALLERID(num)}"="${CONNECTEDLINE(num)}"]?Hangup())
exten => s,n,MacroExit

But it seems to destroy the wake-up calls:

-- Executing [s@macro-dialout-one-predial-hook:1] NoOp("Local/331@originate-skipvm-00000039;2", "Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf") in new stack
-- Executing [s@macro-dialout-one-predial-hook:2] ExecIf("Local/331@originate-skipvm-00000039;2", "1?Hangup()") in new stack

I don’t understand why it’s executing this line. The caller id is entirely different and set to the default *68.

Do a DumpChan() to find out what unique data wake up calls has and send to MacroExit.

Something like this:

[macro-dialout-one-predial-hook]
exten => s,1,NoOp(Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf)
exten => s,n,Gotoif($["${whatever_wake-up}"="something"]?done)
exten => s,n,ExecIf($["${CALLERID(num)}"="${CONNECTEDLINE(num)}"]?Hangup())
exten => s,(done)n,MacroExit
1 Like

Thank you, that was a great idea. The problem is obvious:

CallerIDNum=        *68
CallerIDName=       Wake Up Calls
ConnectedLineIDNum= *68
ConnectedLineIDName=Wake Up Calls

It seems I have to check if it’s a wake up call, too. Does anyone have an explanation for why both are the same?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.