Conditional Calling - Calls to operator


#1

I have several locations that want to be able to dial zero and have the call the front office. Each location has its own callerID so I can find a way to route the call to the correct Operator.
I am planning on creating ring groups for each location but then add a macro that essentially checks that if someone dials zero (0) and the caller ID is matched then the call is directed to a particular ring group.

This is what I have thought of but does not work. I am not experience I am adding this to the extensions_custom.conf file:

[macro-Operator]
;;User dialing zero is redirected to Operator A
exten => s,1,GotoIf($["${OUTNUM}"=“0” & “${CALLERID(number)}”=“XXXXXXXXXX”]?2:4)
exten => s,2,Dial(“Local/7151@from-internal”)
exten => s,3,MacroExit()
;;User dialing zero is redirected to Operator B
exten => s,4,GotoIf($["${OUTNUM}"=“0” & “${CALLERID(number)}”=“YYYYYYYYYY”]?5)
exten => s,5,Dial(SIP/7152)
exten => s,6,MacroExit()

Is this possible? Any help or pointers are appreciated. Thank you.


#2

What doesn’t work?
Provide Asterisk logs/ CLI output to see what was happening when a call was made.


#3

I will get the logs but basically when zero is dialed the ring group is never dialed.


#4

I will get the logs but basically when zero is dialed the ring group is never dialed.


#5

What is a ring group? Asterisk has no such concept. FreePBX does, but is not supported here.


#6

He mentioned extensions_custom, he’s using FreePBX.

https://community.freepbx.org would probably be a better place for @ljrendon to ask his question.


#7

Even when you say ring group is never dialed, we need call logs to figure out the issue/s. However as other members said if you are using FreePBX, better ask question on their forum


#8

Thank you everyone for being so willing to help. I will ask this question in FreePBX forum as you indicated as that is what I am using. Thank you everyone.


#9

You only have the macro who do the conditional evaluation, but you dont have any extension entry that call your macro when 0 is dialed