Assuming you have 2 FreePBX servers across two location that are connected via a trunk and the trunk dialling does work fine. Meaning you can already call SiteA and SiteB and vice-versa.
SiteA: Extensions 1000 and on
SiteB: Extensions 2000 and on
With the default IVR context in FreePBX it’s limited to local numbers only (in this case SiteA extensions). Imagine if you had a PRI line coming into Site A and the IVR direct dial would then need to reach extensions on Site B, this will by default will not work.
Here’s how to “extend” the IVR dialling to other locations. NOTE, we assume the outbound route doesn’t have a prefix to dial intersite between Site A or Site B.
1) nano /etc/asterisk/extensions_custom.conf
2) Enter the following codes (here’s Site A IVR trying to reach site B)
[from-did-direct-ivr-custom]
exten => _2XXX,1,ExecIf($[“${BLKVM_OVERRIDE}” != “”]?Noop(Deleting: ${BLKVM_OVERRIDE}: ${DB_DELETE(${BLKVM_OVERRIDE})}))
exten => _2XXX,n,Set(__NODEST=)
exten => _2XXX,n,Goto(from-internal,${EXTEN},1)
#NOTE each line should start with exten like below, on single lines
3) Save the file and reload the dialplan
asterisk –rx “dialplan reload”
Lets say you use prefix 7 to dial site B from site A followed by the extension number. Just edit the part and as an example below;
exten => _2XXX,n,Goto(from-internal,7${EXTEN},1)
Where 7 prefixes automatically is entered before the extension number.
Have fun!
4 Comments
Comments are closed.
hello,
thank you, it work for me, but after user end the phone the line can not hangup automatically, is there any command to solve my probem.
thank you,
surya
Hello
I didn't have the problem when i implemented this.
However, you can add at the bottom of that dialplan
exten => _2XXX,n,Hangup()
thanks a lot, had this problem and this solved it for me!
didnt have the hangup problem.
thanks again!
Thank you! Excellent solution!