Dialing with Pauses - A Solution

(1/4) > >>

azrobert:
Here is my solution for dialing with pauses.

Get a free developer's account at Tropo.com here:
https://www.tropo.com/home.jsp

Sign into your Tropo account.

Click "Your Hosted Files"
Click "New File"
File Name: aaaaa.rb   (aaaaa is any name you want)
Cut and Paste the following into the File Text window:

num = $currentCall.callerID.to_s
num = num.gsub("\*","p")
dial1 = num[0,10]
L1 = num.length
dial2 = num[11,L1-11]
say "Calling Now"
transfer ["+1" + dial1 + ";postd=" + dial2 + ";pause=3000ms"], {
  :callerID => "4801234567",
  :timeout => 30 }

Click "Create File"
Click "Your Applications"
Click "Create New Application"
Click "Tropo Scripting"
Application Name is the same as the File Name you created above.
Click "Use a Hosted File"
Click "Map an Existing Hosted File"
Click "Map" to the right of your File Name.
Click "Create Application"
Wait until the app is created
Note the Number assigned to the app.

In the your OBi.

Add the following after the beginning parenthesis in your Phone Port DigitMap:
xxxxxxxxxx*XX.|

Add the following to the beginning of your Phone Port OutboundCallRoute:
{(<9991234567@sip.tropo.com;ui=>xxxxxxxxxx*XX.):sp2},

9991234567 is the number assigned to your Tropo app.
This assumes SP2 is defined as SIP.

That's it.

Dialing 4805551212*111*2222 on your OBi phone:
Tropo will call 4805551212 pause 3 seconds after the call is answered, dial 111, another pause and dial 2222
I ignore the first "*" because there is an automatic pause after tropo dials the number.
See my reply to myself.

azrobert:
I didn't want to clutter up my post with too many explanations, so I'm replying to myself.

I tested the app by calling my PSTN line. When I answered the call there was about a 3 second pause before I heard the first 3 DTMF tones, but only about a 1 second pause before I heard the next 4 DTMF tones.  I set the pause time to 3000 milliseconds.  Apparently this only applies to the first pause. If you want a longer wait on subsequent pauses, just include multiple asterisks.

When the Tropo app gets control you hear "Calling Now".  After that you hear silence until the app finishes. You can setup a ring back tone while the app is in control.

The app is written in the Ruby programming language and is very basic without any error testing. This was just a challenge for myself and I probably will never use it, so I'm not going to spend any more time on it. If I need this function I will just do it on my handset. Obviously, anyone who wants to change or add to the code is free to do so. If you come up with an improvement please post for others. I did try to route the call from Tropo back to the OBi and have the OBi complete the call, but I couldn't get it to work.

Tropo is free for development. I don't know when they consider your app production, so Tropo might cut you off if you have a high level of activity on your app.

azrobert:
I have an updated version of my app.
Here are the changes:

I added some error checking. Before if the call didn't complete the phone went silent. Now you are notified of the problem.

In the new version Tropo does not bridge the call. The call is transferred back to the OBi and the OBi bridges the call.  In my previous testing I had Tropo send the call directly to the OBi via URI. The OBi would bridge the call, but I had no audio. I found routing the call through another SIP provider that was registered on SP2 fixed the audio problem. I'm using PBXes, but any SIP provider that accepts URI calls will work. If you don't have an SIP provider, SIP2SIP.INFO is a free service.

Here is the sequence of events:

The OBi sends Tropo the dial string.
Tropo transfers the call to PBXes with the CallerID = "9" plus 1st 10 digits of the dialed string.
When the OBi receives the call on SP2, it uses the CallerID minus the "9" to bridge the call out SP1.
After the call is connected, Tropo completes the call after the specified pause.

To implement:

Add the following to the beginning of the SP2 Service X_InboundCallRoute:

{(<9:1>xxxxxxxxxx):sp1($1)},

Replace the previous Tropo App with the following:

num = $currentCall.callerID.to_s
num = num.gsub("\*","p")
dial1 = num[0,10]
L1 = num.length
dial2 = num[11,L1-11]
say "Calling Now"
transfer ["user@www2.pbxes.com;postd=" + dial2 + ";pause=3000ms"], 
  {:callerID => "9"  + dial1,
  :timeout => 30,
  :onTimeout => lambda { |event| 
        say "Sorry, nobody answered. Goodbye."},
  :onCallFailure => lambda { |event| 
        say "Line is busy, invalid dialed number or similar error occurred. Goodbye."},
  :onError => lambda { |event|
        say "An error occurred. Please try again."}}


Disclaimer:
I did a minimal amount of testing, so no guarantee the above is bug free.

N7AS:
Iknow this is an old thread, but I wanted to know how to add pauses to numbers dialed out of my OBi2182. I want to use the VoiceMail button on the phone to check my VoiceMail. It seems that Tropo.com is not accepting any new accounts.

Now the question is, how do we do it?

azrobert:
Quote from: N7AS on April 07, 2019, 07:20:30 pm

Now the question is, how do we do it?


Do you own an OBi110?

Edit:
See:
http://www.obitalk.com/forum/index.php?topic=10186.0

You should be able to do this with your 2182 and an OBi110.

Navigation

[0] Message Index

[#] Next page