My version of Asterisk is 1.6.0.1 - connected to the outside world via a PRI T1, using a RedFone 2 x T1 device.
We require a 5 digit code for our callers to get outgoing long distance. This is provided by our Telco.
If I call a long distance number from a Snom 300 phone or a softphone on the desktop - I get a ‘tone’ - after which I enter 5 digits & the call is connected.
For our fax machine - I’m trying to send the code automatically whenever a long distance call is placed.
I have the dialplan recognising the outgoing caller ID of the fax machine, then dialing the number, followed by the codes - using this…
exten => 1,1,Dial(dahdi/G1/${EXTEN},D(12345))
I’ve tried adding w in the D() for pauses - I’ve tried adding ww and the codes on the end of the dialled number - like this
exten => 1,1,Dial(dahdi/G1/${EXTEN}wwww12345)
I’ve tried a macro in the dial command to wait few seconds, then send the digits.
Nothing seems to work. The telco just seems to ignore the codes sent from Asterisk. Dial it from a phone (hard or soft), enter the codes, works fine.
Advice or troubleshooting tips would be very welcome.
I dont know any easy way to do anything after dial, including sending DTMFs.
But I think you can send DTMFs through AMI.
Or just dial DTMFs from FAX…
I “solved” similar problem with call file and callback to additional script, which sends DTMFs.
With AMI script, call file and whisper - you can open additional channel and send DTMFs. I dont know what can do SPA3102 - but you can check and try…
PS
When you dial some number through SIP phone, digits are sent only after timeout, or # or something else. This mean - if SPA sends 12321,12345 - then there is good possibility whole number to go at once…
And may be you could see if there is some FAX application around which will give you more ideas.
You should be able to parse out the long distance code with the dialplan, and then send the second part using SendDTMF. I don’t have a T1/E1 here, to try it.
It cant be done.
You have Dial()
Then remote party answers and waits for digit, but you continue to be in Dial.
SendDTMF will come after Dial and it mean - when call finished some way or another.
Although I haven’t tried it, as we don’t have a need for such tactics, you can run a macro on the called party, when they answer. I’m fairly sure that if you don’t indicate otherwise, you will be connected to them, when the macro completes.
For some circuit switched trunks, you can include a pause in the dialling sequence. I suspect you may not be able to do this where comon channel signalling is in use.
That’s a special case, although it maybe applies to your network. Normally there is no outbound speech path in a progress state, so the digits would need to be sent using the common channel signalling, but you have presumably already sent the final address message.
To answer the question as to whether it has been implemented, you need to look at the relevant SVN change log, however I think it was committed after the release of 1.6.0, so, as it is a feature request, I don’t think it will ever go into a 1.6.0.x release.