I have my FreePBX system connected to a legacy analog PBX, when I go off hook it returns a dial tone to FreePBX, todial any of its extensions (I believe this is referred to as DISA). My outbound routes and trunks in FreePBX are configured so that if I dial an extension on the analog PBX, it correctly routes my call to the PBX, but all I hear back is the dial tone. I then must manually re-dial the called extension, but I am hoping this can be automated.
I am wondering if there is a way that once dial tone is returned from the analog system, Asterisk/FreePBX can repeat the dialed extension to the analog PBX so it can complete the call.
Please describe the setup in more detail, including make/model of the legacy PBX and the type of port (extension or trunk) the HT is connected to. It sounds like you are connected to a trunk port on the legacy box (often called CO line port), since that is consistent with using the FXS port of the HT. However, you said
but with the above settings the HT would send ringing voltage to the legacy trunk, which would respond by going off hook to answer the call, then play the DISA dial tone. With this setup, you could use a Custom trunk with the D option to send DTMF to the legacy system. See the D option in https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial
Alternatively, if the legacy box has a spare extension port that supports ‘single line telephones’ (a standard analog phone could be connected there), you could connect the HT’s FXO port to that. When the FXO goes off hook, the legacy machine would send regular dial tone (not DISA) and the called number would be sent by the HT as DTMF, which would connect to the desired extension.
Either of these schemes allow only one call at a time between the systems; you might want to implement both so you could have two concurrent calls.
@Stewart1 you have described the setup exactly. The analog system is a Dukane STARCall.
I think we’re barking up the right tree with the D option, but how do I get the dialed Dukane extension into the D option. I’ve tried D(DIALEDPEERNUMBER) but that didn’t work. I also tried D(204) where 204 is one of the extensions on the Dukane system, and that did work, but all calls were routed to extension 204 as expected.
If no luck, paste the Asterisk log for a failed call at pastebin.freepbx.org and post the link here.
If you are too new to post links, post the last 8 hex characters of the link.
I looked at the generated dialplan and it appears that FreePBX is already using variable interpolation so it won’t interpolate twice, but there is a special kludge for that. Try: D($OUTNUM$)
If the digits are sent before the Dukane is listening, try D(w$OUTNUM$)
I did this differently, using a Custom Trunk. Here is an attempt to translate for your system:
Change the Asterisk Trunk Dial Options for the STARCall trunk back to System.
Create a new Custom Trunk, call it STARCall2. Leave the General tab at defaults.
On the custom Settings tab, set Custom Dial String to SIP/STARCall/1234,300,D(ww$OUTNUM$)
You may need to replace 1234 with the username for the HT’s FXS port.
Then change the Outbound Route to send calls intended for the STARCall to the STARCall2 trunk.
If you still have trouble, paste another log.