There are two offices. Office A runs Asterisk / FreePBX while office B runs a closed system with auto attendant.
The guys at office A would like to be able to dial office B extensions as if they were local.
Program the office A extensions in this way:
- Local extension picks up
- Remote office number is called
- When the remote office picks up
- DTMF key presses are sent to select the right extension
- Call is connected
First I attempted to program this into freePBX through the GUI, but I wasn’t having any luck because the default macros were not letting me craft the dial command in such a way that it sends the key presses after the call is placed. Although it would have been nice to have everything in the GUI, the FreePBX GUI method seems to be a dead end. I ended up relying on good old /etc/asterisk/extensions_custom.conf configuration file, and I just created my own extensions there.
exten => 102,1,Dial(SIP/v-outbound/4031112222,30,rD(ww11))
exten => 103,1,Dial(SIP/v-outbound/4032223333,30,rD(ww12))
[ext-local] sets the right context so that these extensions are picked up as if they were local. You could also put these into other contexts like [ivr-1] etc.
D tells the Dial command to send DTMF button presses after the remote end picks up
w tells the Dial command to wait 0.5 seconds