Friday, August 15, 2008

Sending DTMF tones inband part 1.

This is a problem that has me a bit stumped, I have come up with one working solution, unfortunately it does not quite meet my requirement.

The problem is this, Using CME, how does one send a string of DTMF tones inband via a PRI connection to the PSTN. Why would we want to do this? There are many occasions when interaction is required across the PSTN using just DTMF tones e.g. Logging in to vmail, logging into a providers call center, setting call diverts etc.

In the case that I was looking at I have been asked to provide a quickdial solution that would call a PSTN number, then when the call was connected, log into the service, and enter mobile phone number. This would in effect set the destination for the companies 1800 number.

The sequence of numbers and information sent to me was as follows (numbers etc changed for obvious reasons):

dial pstn number 555-5678
when asked enter pin "12345" then *
after listening to the instructions enter the destination number that the 1800 number will be diverted to 555-8888, then #
Wait for the digits to be read back, then enter 1 to accept.

The plan was that depending who was on call each week would have the 1800 number diverted to their phone. The client wanted users to be able to dial 150, 151, 152... etc to move the on call number between phones without having to manually doing the process.

At first look it seems like a pretty straight forward request, and something that I would imagine is pretty common. I am sure it would be very easy using IPCC, or CUE AA. Unfortunately the client is running straight CME, without CUE.

My next thought was TCL, so I had a quick search, hmmm, not much luck there. Then after having a discussion with a close friend we came up with a fiendish plan to use num-exp.

So here is what I did.

Firstly I wrote the DTMF sequence as it would be entered by the end user, using commas for pauses:
95555678,,,12345*,,,5558888#,,,,,1

The real trick of this solution comes from using "forward-digits extra inband" in the dial-peer configuration. What this does is uses the number that appears in the destination-pattern in the ISDN call setup, then forwards any extra digits "inband" (ie as DTMF tones).

Using these two things we can then configure a working solution:

! First Diversion
num-exp 150 5555678,,,12345*,,,5558888#,,1
! Second Diversion
num-exp 151 5555678,,,12345*,,,5558889#,,1
! Third Diversion
num-exp 152 5555678,,,12345*,,,5558890#,,1

dial-peer voice 10 pots
destination-pattern 5555678
forward-digits extra inband
port 0/2/0:23

That's it. Simple!

Now the problem is. It appears that dial-peers can only forward 32 digits, so though this does work for the solution above, it will not work if we even wanted to add one more comma/pause. It appears to me (unless someone has a better idea) that the only way to send DTMF tones will be to create a TCL script.

Time to learn a bit about TCL I guess. Look out for part 2 sometime in there near future where I do just that.

No comments: