DID to Group?

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,909
Reaction score
9
How would I set a range of inbound DID to go out a Group? What I would like to do is DID = 780410|xxxx to g0/xxxx

Basically this is the same as an outbound route but instead of using an internal extension I want to use the DID of the incoming call. Trying to create a tandem from one incoming T1 trunk to an outgoing T1 trunk.
 
I know you can use a pattern for the DID (such as _780410xxxx to match your example) coming into an inbound route, but once the destination has been selected, the DID is pretty much discarded for purposes of call flow. The normal way to do this (and I know it's a pain, but you only have to do it once) is to set up an inbound route for each DID, then you can send that to a Misc. Destination which can be the digits you'd dial to call an extension on the other system from your system. Then you'd have to have an outbound route and trunk to handle those calls.

The alternative would be to write a small bit of dialplan in etc/asterisk/extensions_custom.conf. For example, you might be able to get away with something this simple, though I haven't tested it:
Code:
[from-trunk-custom]
exten => _780410xxxx,1,Goto(from-did-direct,${EXTEN:6},1)
exten => _X!,n,Goto(from-trunk,${EXTEN},1)
If it doesn't work try using from-internal in place of from-did-direct (I'm just shooting in the dark here).

The idea being that you'd change your trunk context statement to point to from-trunk-custom, send the call to the above dial plan fragment, and it would remap the incoming call to an outgoing call, stripping off the first six digits of the DID (the second line is just a fallover, in case a call comes in with a DID that doesn't match your pattern). You'd still need the outbound route and trunk. I don't know if this would even work, let alone preserve the caller's CallerID information, but it might be worth a shot.

Note there may be security issues in doing this that I'm not aware of - can't think of any, but that doesn't mean there aren't any.
 
You could probably do this completely in FreePBX. First set up your ring group that you want these calls to go to. If the ring group has to call outside numbers, enter them in the extension list of the ring group with a "#" (no quotes) following them.

Then set up an inbound route with a matching pattern like this:

_780410XXXX

and point it to the ring group.
 
Just to make it interesting, I have 8x T1 lines coming into my PiaF. I'm simulating the PSTN for a Cisco Call Manager Express (CCME) lab (1st part of VoIP course). After Cisco, we introduce PiaF and then merge the two systems.

Anyways, I have 8 CCME pbx:

Group 1 - 780410xxxx
Group 2 - 780420xxxx
Group 3 - 780430xxxx
Group 4 - 780440xxxx
Group 5 - 780450xxxx
Group 6 - 780460xxxx
Group 7 - 780470xxxx
Group 8 - 780480xxxx

With PiaF having 780490xxxx.

I have 8 outbound routes, that pass just the 4 digit extension:

780410|xxxx to g1
780420|xxxx to g2
780430|xxxx to g3
780440|xxxx to g4
780450|xxxx to g5
780460|xxxx to g6
780470|xxxx to g7
780480|xxxx to g8

I can call from any group to PiaF and from Piaf to any group but not tandem through PiaF from group 1 to group 2....

For example, from CCME1 (780410xxxx) using g1, I would like to call CCME2 (780420xxxx) on g2.
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top