how to setup variable-based inbound numbers
I am trying to allow my box to accept any inbound DID and route to a queue, here is what someone told me to do but I don't know where to put it? I was thinking of doing a custom extention but how would I tell it to use any 10 digit number.
Exten => _XXXXXXXXXX,1,Answer()
Exten => _XXXXXXXXXX,n,Wait(2)
Exten => _XXXXXXXXXX,n,Queue(test|t)
Any DID that comes in that doesn't have a specific INBOUND route assigned to it in FreePBX should execute this code and route to your queue. (please test)
Open up etc/asterisk/extensions_custom.conf
Goto the bottom and paste in the following code:
[ext-did-catchall-custom]
exten => _X.,1,Goto(ext-queues,XXXX,1
Modify XXXX to point to the queue number you have programmed in.
Save changes
reload the config
asterisk -rx reload
test
let us know how it works out.
In FreePBX, there is a catch all that looks for invalid/unconfigured DIDs. Normally it just rejects the call.
By default, FreePBX incorporates custom contexts that allow you to add your own code in to work with FreePBX, but not have it overwritten by FreePBX when you do updates.
The above code simply takes advantage of this feature, and allows FreePBX to verify if the DID is in the system as it normally would, and if it isn't (meaning not programmed in the GUI) it will execute that final line, allowing you to send the call anywhere you want.
Its more useful if you have a lot of DID #s that you want to route. If you only have a few, then its just as easy to put them into the INBOUND route section of FreePBX and point them to the appropriate queue.
start a live log
asterisk -cvvvvvr
make a test call and post the log changes...we'll see if there is something in there
I did notice one thing, there should have been a ) at the end of that statement.
exten => _X.,1,Goto(ext-queues,XXXX,1)
must have not copy/pasted it properly when i first posted it.

Member Since:
2006-07-31