News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Dialing with Pauses - A Solution

Started by azrobert, February 18, 2013, 05:38:31 AM

Previous topic - Next topic

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?

Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

azrobert

#4
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.

N7AS

Quote from: azrobert on April 08, 2019, 06:55:26 AM
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.

I do have an OBi110, but can't remember where it is.
I don't want this to involve other devices. I will just stay with manually entering a * and my 4 digit pin. That works for me.
Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

ianobi


SteveInWA

Use ianobi's described solution.  I do, and it works for me on my 2182s.  I programmed this on the phone's softkeys for speed dials.

N7AS

#8
On my OBi2182
IP Phone > Programmable Keys > Key 7 Message Status

I tried xxxxxxxxxx;send=AS*U"Enter Password"syyyyU"

xxxxxxxxxx = phone number

*= Need to hit * to get into VoiceMail

yyyy is a password (4 digit numerical pin)

Does not work as I still have to enter * and it prompts for a password  "Password"

What am I missing?


Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

SteveInWA

This string calls my Google Voice number, waits a bit, and then enters the password.  There are no hard stops or visual prompts involved; it's just a matter of timing:

GGGGGGGGGG;Send=AssPPPPPP#

Replace the "Gs" with the number to call, and the Ps with your passcode.

N7AS

Quote from: SteveInWA on April 08, 2019, 11:52:51 AM
This string calls my Google Voice number, waits a bit, and then enters the password.  There are no hard stops or visual prompts involved; it's just a matter of timing:

GGGGGGGGGG;Send=AssPPPPPP#

Replace the "Gs" with the number to call, and the Ps with your passcode.

I tried
GGGGGGGGGG;Send=As*;Send=AsPPPP#

Added an * as I have to enter a * to get into the VoiceMail system.

That did not work.

Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

SteveInWA

Quote from: N7AS on April 08, 2019, 12:23:50 PM
Quote from: SteveInWA on April 08, 2019, 11:52:51 AM
This string calls my Google Voice number, waits a bit, and then enters the password.  There are no hard stops or visual prompts involved; it's just a matter of timing:

GGGGGGGGGG;Send=AssPPPPPP#

Replace the "Gs" with the number to call, and the Ps with your passcode.

I tried
GGGGGGGGGG;Send=As*;Send=AsPPPP#

Added an * as I have to enter a * to get into the VoiceMail system.

That did not work.



Try GGGGGGGGGG;Send=*AssPPPPPP#

or

GGGGGGGGGG;Send=Ass*PPPPPP#

BTW, I also programmed the dedicated voicemail button on my 2182s to call Callcentric voicemail:

*123#;Send=Ass*PPPPPP#

N7AS

I tried both of those and neither of them worked.

I can just put my number in the field and as soon as it is answered, I enter an * and it immediately prompts me for the 4 digit pin. I enter that and it brings immediately to my VoiceMail.

That works, but I wanted to automate the whole thing.

The * is not passed in the string you provided. If it was, it should work.

Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

SteveInWA

All I can tell you is that it works for me.

N7AS

When you re using your method, it's for GoogleVoice. I called one of my GV numbers from SP2 and it wants the pin and a #.

My SP1 account is with future-nine and requires me to enter an * and then my 4 digit pin.
I guess I will just live with entering it manually.

Thanks for trying...
Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

ianobi

As Steve suggested, I think this is a matter of timing. After the call is answered the "send" function operates exactly as you pressing buttons on your dial pad - dtmf tones and pauses are sent as if you were manually dialling.

I tested this: 12345678901;send=AS*S1234 by sending it to a Phonerlite on my pc. After answering the call there is a 3 second pause then a * another 3 second pause then digits 1234. I can clearly hear the dtmf tones for * and 1234. Confirmed by checking the Phonelite debugging feature. So maybe you need a pause while the system is prompting you.

Experimneting with the length of pauses may speed up the whole thing once you have it working.



N7AS

@ianobi,

I tried your suggestion, but it won't work. I even shortened up the pauses and still not working. It's like no digits were sent.
I am using Future9 as my provider on SP1 which is Asterisk based. I don't think that is the problem.
When I call manually, when it answers, I hit * and immediately says password and I enter it and goes directly into the VoiceMail system.


Grant N7AS
Prescott Valley, AZ
https://www.n7as.com

A journeyman electrician sent his apprentice with a 5-gallon bucket and was told to put the ends of the service drop in the bucket and fill it with volts. He was there all day.

ianobi

I'm out of ideas. We need someone else who has an OBi IP phone and who use Future9 to try these ideas for a comparison.

Hopefully this thread has been helpful for others who own OBi IP phones.