[resolved] sending DTMF to remote PBX

G’day all,
I am trying to get my asterisk box to dial an extension on a remote PBX.
I can’t seem to get things working.

What I want.
users dials 3XX and my asterisk box calls the remote PBX, waits for an answer then sends the extension as DTMF to the remote PBX.

The problem is if I use dial(12334466,timeout,D(${ARG1}))
it seems to play the DTMF as soon as the zap channel is rining not when its been answered.

If i use
dial then

It never seems to send the dtmf, how do I specify a channel for senddtmf?

any ideas greatly appreciated

if you know how long the PBX takes to answer, can you add in 'w’aits to your DTMF string, so that the DTMF is delayed long enough ?

I tried that and it didn;t seem to work but, it turns out I wasn;t waiting long enough.

It needs 16seconds!

is it expecting some kind of signal that you can send to reduce the wait ? 16 seconds from off-hook to dialtone doesn’t sound right … surely the users of the PBX would have throttled you by now ?

the problem with pots channels is that unless you have ‘answer supervision’ (almost none do) then it is impossible to tell when ringing stops and call is answered. Thus your only real option is to wait for the pbx to pick up after a known interval…
using a PRI or VoIP (sip/iax2) line this problem does not occur, it correctly informs asterisk when the remote party answers.

If you use Waitforsilence(4250,1) you will basically get answer supervision on a pots line if you are calling the US as the silence between rings is 4 secs. In other coutnries, the delay is shorter which I wish was the case for me.