how to setup variable-based inbound numbers

mannin32
Posts: 55
Member Since:
2006-07-31

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)



dickson
Posts: 1424
Member Since:
2006-06-02
Any DID that comes in that

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.



mannin32
Posts: 55
Member Since:
2006-07-31
Okay I just added that and I

Okay I just added that and I am wondering how is this going to run if I don't tell it to execute from a specified point? I am going to test it but I am waiting for a DID to be pointed to my server.



dickson
Posts: 1424
Member Since:
2006-06-02
In FreePBX, there is a catch

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.



mannin32
Posts: 55
Member Since:
2006-07-31
didn't work "all circuts are

didn't work "all circuts are busy"
tried changing it to _XXXXXXXXXX and still didn't work, any ideas?



dickson
Posts: 1424
Member Since:
2006-06-02
start a live log

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.



mannin32
Posts: 55
Member Since:
2006-07-31
hey i fixed that and tested

hey i fixed that and tested still didn't work do you have any other sugestions? I sent you a PM with my email.



jmullinix
Posts: 836
Member Since:
2006-06-04
Maybe I am missing something

Maybe I am missing something here, but why not create an Any/Any inbound route in FreePBX and point it to the queue? Just add a new route and don't put any match information in the DID or the CID fields. Then point it to your queue.

--

John

In search of Dundi Peers in Lake Wales, FL and Baltimore, MD.
http://www.cohutta.com
1-706-632-3343 - E164 friendly (Use your friendly ENUM trunk today.)
Dial Plan helper http://www.cohutta.com/npanxx.php



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.