Loopback Destinations (Inbound Routes) as internal transfers

Status
Not open for further replies.

dcitelecom

Member
Oct 20, 2021
139
3
18
61
My PBX has 11-digit Destinations (Inbound Routes) and 10-digit Extensions. If extension 1000 dials extension 5141234567 then the call is processed as an internal transfer. However, if extension 1000 dials Destination 15141234567 then the call is sent to an Outbound route and processed via an external gateway. Is there any way to avoid carrier charges and process these calls as internal transfers?
 

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Make sure your outbound route is last in the diaplans, order 901+, then the local_extension dialplan will capture the call from the 'user_exists' condition.
 

dcitelecom

Member
Oct 20, 2021
139
3
18
61
Thanks but that did not work. The 'user_exists' condition probably looks only at extensions, not inbound routes.
 

hfoster

Active Member
Jan 28, 2019
684
81
28
34
Oh sorry, yeh. Brainfart. They're in the public context.

If you can match the range with regex, you could probably transfer:
<action application="transfer" data="$1 XML public"/>

I can't think of any clever ways of doing it myself.
 

dcitelecom

Member
Oct 20, 2021
139
3
18
61
Yes. That's what I did but I was hoping there is a better way. I created an internal outbound route (order 50) with regex ^1(\d{10})$ that matches my 11-digit Destinations. Now every outbound call checks the internal route first and transfers the call internally if there is a match. It works quite well and the regex expression can be modified to match whatever number plan convention is used in the Destinations.
 
Status
Not open for further replies.