Combine PSTN access code with a pause and local PSTN number

I have a Grandstream HT488.
The FXO is connected to the PSTN line. The FXS is connected to an analog phone.
The WAN is connected to the switch. The WAN is assigned the ip address

On this HT488, the default PSTN access code is *00
From the analog phone if I want to dial a local number 765-4321 then
I dial *007654321 and it works immediately every time.

The Asterisk system is on the same LAN with the ip address

The HT488 is the only analog interface to the Asterisk system.

The HT488 is configured to ‘Forward to VoIP’ so that
’Calls are unconditionally forwarded to the specified VoIP phone number for all incoming PSTN calls.'
So my incoming PSTN calls are forwarded to a specific extension (nnn) on the Asterisk system.

So far all this works:

  1. All incoming PSTN calls do arrive at the Asterisk nnn extension.
  2. Unanswered calls go to the voicemail for extension nnn.
  3. There is little or no echo.
  4. There is almost no noise.

The outbound calls from any of the extensions are a bit challenging.
The default 9 to get an outside line is still there in freePBX.
It uses the one and only (HT488) SIP trunk.

Besides the above analog phone from any extension, if I want to dial the same local number 765-4321 then
first I have to dial 9*00 to get to the HT488’s dial tone
(wait a little bit)
then I enter the number 7654321

Simply dialing 9*007654321 does not work.

Question - How do I combine the “9*00” and the “7654321” strings?
Such that there is a bit of a pause in the middle
to accomodate the HT488’s dialtone.
I would like to put the unified string as a Contact in my X-Lite.

First I am not sure how trixbox handles things so this is mostly asterisk-centric…

you can make an exten (contact?) as _9X. (9 with any number(s) after it), which then dials *00${EXTEN} on the sip thing… I would do this slightly differently however.

As well as having all FXO incoming calls set to forward to VoIP, have all FXS calls (outgoing calls) also forward to *. Set * up so it will send those back to the FXO adapter. Then remove the *00 requirement. Thus ALL calls go through *, and there is no *00 to dial, just 9 (always) to get an outside line…

for calling out via a zap interface, you can put several ‘w’ in between - each causes 1/2 second or so delay? dunno if that works in general tho. can’t hurt to give it a try…