News:

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

Main Menu

How to initiate a call on a PC and have OBi phone pickup/Cut-Paste phone numbers

Started by azrobert, October 23, 2016, 08:30:05 PM

Previous topic - Next topic

azrobert

This function is available on GV, but I don't think it has been available for other service providers. I used the Auto Attendant callback feature to accomplish this function. You would call the OBi with a softphone after dialing the outbound number and hang up after 1 ring. The AA will ring the OBi phone port. You will hear the AA prompt when you pickup. You then enter "1" and the AA will place an outbound call using the number dialed by the softphone.

Install a softphone on your PC
I used Phonerlite
Use the OBi IP address and SPx port number as the Phonerlite proxy
I used 1234567 as the userid

Route calls from the softphone to the Auto Attendant with following rule in the SPx inbound route:
{1234567:aa($2)}

Note: I'm passing the outbound number ($2) to the AA instead of the callerid ($1)

Replace the AA digit map with the following:
(0<$1>)

Replace the AA outbound route with the following:
{(<0:>1xxxxxxxxxx|<0:1>xxxxxxxxxx|<0+:>1xxxxxxxxxx):sp1},{ph}

On the callback only the outbound route is processed.
The number will not have a zero prefix, so the call will be routed to the phone port.

On the callout the AA will send a zero to the digit map and it will be suffixed with the outbound number, so the call will be routed to SP1.

Now you can browse the internet and copy phone numbers and paste them into the softphone.
The OBi will automatically remove blanks, hyphens and parentheses around area codes, so the 3 rules I have in the outbound route should cover all numbers found on the internet.

This will also work with a smartphone, but you need a softphone that will accept a paste.

drgeoff

Clever.

A couple of small points:

1.  The softphone must be able to dial without registration.

2.  "all numbers found on the internet" should read "all the USA and Canada numbers found on the internet."

azrobert

I changed the dialing procedure. After the AA prompt just enter "1". I had enter "2" then "0#". When you enter "1" the AA will send a "0" to the digit map, so there is no change to the setup.

To make the post short and easy to read I didn't include a detailed setup for the softphone or the OBi.  There are several examples on the forum.

QuoteClever.
Thank you

Quote1.  The softphone must be able to dial without registration.
Only if you have a device that doesn't support the X_Proxy function. If you have an OBi2xx you also need an open SP trunk.

Quote2.  "all numbers found on the internet" should read "all the USA and Canada numbers found on the internet."
Correct, but the outbound route can easily be changed to include other countries.

ianobi

Very neat coding!

Going back to your first idea using Option 2 of AA. Maybe it would be possible to keep all the original functions of the AA and also add this facility.

It would be a bit more clunky, but after the first AA announcement, maybe dial 29#. This would barge through the second announcement and send the digit 9 to the AA DigitMap where it would be used the way you are now using digit 0.

Maybe needs a bit more thought than I have given it. Ideas lead to ideas which lead to ideas ...   :)

azrobert

ianobi,
I think you can keep the original functions. Dialing a "9" would be considered a speed dial. You can solve this problem by defining the speed dial as a "9". I assume the call should be sent to the phone port if the number is not prefixed, so you would have to include a 2nd prefix to know when to route the call to the phone port. You can add a "8" prefix with this inbound route: "{1234567:aa(8$2)}". You would need to strip it off when routing to the phone port. You need to use a digit(s) as a prefix because the OBi will strip off any special character.

I don't use the AA for anything else plus I screwed with this enough, so you are welcome to try to get it working with the other functions.

ianobi

Long dark winter evenings loom ahead of us here in the UK - so maybe I will give this some time  ;)

I'm busy for the next few days, but your excellent idea deserves looking into as an "extra facility" to add to all the existing functions of the AA. I'll see what I can come up with in a few days time.

drgeoff

Quote from: ianobi on October 24, 2016, 10:47:32 AM
Long dark winter evenings loom ahead of us here in the UK - so maybe I will give this some time  ;)

I'm busy for the next few days, but your excellent idea deserves looking into as an "extra facility" to add to all the existing functions of the AA. I'll see what I can come up with in a few days time.
I'll be interested.

I currently use the AA for callback to a couple of mobiles.  The callback is over a VG with the SIP credentials of a FreedomPop SIM.  The other leg of the call goes out (as do calls from the phone on the OBi110) on various routes depending on the day and destination. eg

UK landlines at weekends - SP1 to Asterisk PBX then back to SP2 on the 110 and thence to the BT PSTN line.  (Need Asterisk for the weekday/weekend switch)

999 etc, 0800 numbers - directly to the BT PSTN line on the 110.

UK numbers not already covered by above two cases - SP1 to Asterisk PBX to SIP trunk with a second set of FreedomPop SIM credentials.

An OBi100 in Japan - Obitalk network

USA and Canada numbers - SP1 to Asterisk to GoogleVoice

Other international destinations (mainly Japan) - SP1 to Asterisk to Localphone

Skype - SP1 to Asterisk to ippi gateway

The FreedomPop SIMs each give 200 free minutes per month with no ongoing charge.  Outgoing service seems fine the way I use the credentials on OBi VG and Asterisk.  Using the SIMs in 3G phones as intended by FP has not been a totally satisfactory experience for telephony but OK for free 400 Mbytes data per month.

ianobi

Edit - scroll down to Reply #9 for a better method.

This is my version as promised keeping all of the original functions of the AA and adding the facility to initiate a call from a PC. This is 99% based on azrobert's idea and other info he has provided. I'll copy his explanation format:

You would call the OBi with a softphone after dialing the outbound number and hang up after 1 ring. The AA will ring the OBi phone port. You will hear the AA prompt when you pickup. You then enter "200#" and the AA will place an outbound call using the number dialed by the softphone.

Install a softphone on your PC
I used Phonerlite
Use the OBi IP address and SPx port number as the Phonerlite proxy
I used 1234567 as the userid

Route calls from the softphone to the Auto Attendant with following rule in the SPx inbound route:
{1234567>(<**6>xx.):aa($2)}

Note: I'm prepending **6 to the number to make it distinctive before AA captures it in $2.

I have used OBi110 AA DigitMap and OutboundCallRoute in this example. It was tested on a working OBi110.

Modify the AA digit map as follows:
([1-9]x?*(Mpli)|[1-9]|[1-9][0-9]|<00:**7$1>|0|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Modify the AA outbound route as follows:
{([1-9]x?*(Mpli)):pp},{(0|**6xx.):ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(<**7**6:>(Mpli))|(<**7:>(Mpli))|(Mpli):pli}

On the callback only the outbound route is processed.
The number has a **6 prefix, so the call will be routed to the phone port by rule {(0|**6xx.):ph}

On the callout the AA will send a "00" to the digit map. "00" will be replaced by the outbound number already prefixed with **6 (now held in $1) and that will be further prefixed with **7. The outbound number will be routed to pli using the first part of this rule {(<**7**6:>(Mpli))|(<**7:>(Mpli))|(Mpli):pli}

I have chosen to route the calls to the Primary Line, but that can be changed to any route you wish.

It is a bit clunky having to dial 200# at the AA prompt, but it does work! I'm open to any ideas for improvements.


azrobert

I really like just dialing "1" after the AA prompt, so here's an alternate solution:

Add to the SPx inbound route:
{18005551212:aa($1)},{1234567:aa(AAA$2)},

Modify AA digit map:
([1-9]x?*(Mpli)|[1-9]|[1-9][0-9]|<00:$1>|0<$1>|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Modify AA outbound route:
{(AAA@@.):ph},{(<0AAA:>(Mpli)):pli},{([1-9]x?*(Mpli)):pp},{018005551212:ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}
OR
{(AAA@@.):ph},{(<0AAA:>(Mpli)):pli},{([1-9]x?*(Mpli)):pp},{(0xx.):ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

The 1st rule in the inbound route is for the standard features. The 2nd rule is for my added feature.

After dialing 1 the resulting zero will be suffixed. When using the standard features the zero will be suffixed with the callerid of the inbound call. The only way I could tell that you entered just a zero or trying to call a number that begins with a zero (like 011......) is to also check for the callerid. Change 18005551212 to your callerid in the inbound and outbound routes. If multiple callerids are routed to the AA then you must check for all of them. If you don't call numbers beginning with zero then you can use the 2nd outbound route. This checks for a number beginning with zero, no need to check for callerid.

ianobi

QuoteI really like just dialing "1" after the AA prompt
I agree!

The "0" is a big issue for us in the UK and some other countries as almost all numbers start with a "0". Let's get rid of the pesky "0" as far as possible in this context. I think you have got us 99.99% of the way. How about this solution:

Add to the SPx inbound route:
{01234567891:aa($1)},{1234567:aa(AAA$2)},

Modify AA digit map:
([1-9]x?*(Mpli)|[1-9]|[1-9][0-9]|<00:$1>|<0:BBB$1>|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))

Modify AA outbound route:
{(AAA@@.):ph},{(<BBBAAA:>(Mpli)):pli},{([1-9]x?*(Mpli)):pp},{(BBBxx.):ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

It seems to work fine in all the "normal" and "call from PC" scenarios that I have tried.

azrobert

I was just about to post another solution and then I saw your post. Mine checks for international outbound calls before the check for the phone port. It will only work if the callerid of the inbound call doesn't begin with zero, so it might only work in N. America. I like your solution better!

azrobert

The following is an alternate method using starcode "*69". ianobi gave me the idea.

Dial a number and call the OBi2xx with a softphone, let it ring once and hang up. From the phone attached to the OBi2xx dial "*69".

OBi2xx

Voice Services -> SPn Service -> X_InboundCallRoute: {(<1234567:$2>):ph}

Physical Interfaces -> Phone1 Port -> CallReturnDigitMaps: (@@.)

SoftPhone:

Proxy: xx.xx.xx.xx:506x  (IP address and port number of SPn)
UserID: 1234567

When testing I was getting the "No Call Route Available" error after dialing the star code. I changed the CallReturnDigitMaps to "(@@.)" as a diagnostic tool to see what is being passed by the *69 star code and to my surprise it worked. I don't understand why this works and assume it's a bug.

It appears the OBi1xx has a bug and the above configuration didn't work on my OBi110/2886. The substitution to $2 doesn't work properly. I have an OBi1032, but didn't test it.

azrobert

Here is a solution for an OBi1xx:

Voice Services -> SP2 Service -> X_InboundCallRoute: {1234567:sp2(0@127.0.0.1:5060;ui=$2)}

Physical Interfaces -> Phone1 Port -> CallReturnDigitMaps: (@@.)

SoftPhone:

Proxy: xx.xx.xx.xx:5061  (IP address and port number of SP2)
UserID: 1234567

Same dialing instructions as the OBi2xx. Both SP1 and SP2 must be defined as SIP. 127.0.0.1 is a loopback. What I'm doing is routing the call out SP2 and looping it back to SP1. At the same time I'm changing the CID from 1234567 to the outbound number contained in $2.

In previous testing the OBi200 would allow a loopback to the same trunk, but the OBi110 wouldn't. I assume this is still the case and didn't try it on my OBi110.

ianobi

QuoteOBi2xx

Voice Services -> SPn Service -> X_InboundCallRoute: {(<1234567:$2>):ph}

Physical Interfaces -> Phone1 Port -> CallReturnDigitMaps: (@@.)

I like this solution - it's simple to implement. I checked and it does also work with an OBi1032.


QuoteWhen testing I was getting the "No Call Route Available" error after dialing the star code. I changed the CallReturnDigitMaps to "(@@.)" as a diagnostic tool to see what is being passed by the *69 star code and to my surprise it worked. I don't understand why this works and assume it's a bug.

I don't think this is a bug, but CallReturnDigitMaps do make this solution quite difficult. For example, if the call comes in on sp2, when you dial *69 the default CallReturnDigitMaps add **2 to the original number then send **2number through the Phone Port DigitMap and PhonePort OutboundCallRoute, so attempting to return the call on the same sp as it came in on. Of course, you may not wish to send the call return back on the same sp it came in on, or the relevant digitmaps might not be designed for that format of number anyhow. Using your solution of @@. simply routes all call returns to the Primary Line, which is probably what most users would like to do. Using this *69 method could involve some complicated CallReturnDigitMaps to ensure returned calls route how you would like.


QuoteIt appears the OBi1xx has a bug and the above configuration didn't work on my OBi110/2886. The substitution to $2 doesn't work properly.

I agree. My testing seems to show that the $2 does not work anywhere to the left of the colon in the OBi110 InboundCallRoute.


I think that your solution (with my small modification) detailed in Reply 9 is the best answer. The Auto Attendant works exactly the same in all OBi devices, so it's a universal answer. Also the simple hitting of the "1" key to initiate the call return is very user friendly.

It's been interesting ...   well to some of us   :)