News:

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

Main Menu

Solved - 3 GV Accounts, 2 OBI110s, 1 Asterisk Server

Started by DocM, March 20, 2012, 05:31:52 PM

Previous topic - Next topic

DocM

I was wondering if I could get three GV Accounts (one on the first OBI and two on the second OBI) connected to my asterisk server. I was able to get the OBI with one GV account working by placing the GV account on SP1 and connecting to the asterisk server on SP2. Now I am wondering if I can somehow get the second OBI with two GV accounts to connect to my asterisk server. The only solution I came up with is attempting to send all calls from and to the second OBI's GV accounts via a Voice Gateway to the first OBI's SP2 asterisk connection. I am unclear how the Voice Gateway functions (like how to redirect calls sent through the Voice Gateway to SP2) so I am unable to implement my idea. I would be grateful for any help provided.

Thanks in advance for any help provided.

DocM

I also think I can send the calls through OBITALK Service but I'm worried that if 2 simultaneous calls made from/to the 2 GV on the second OBI, one of the calls will not connect or be disconnected.

Everton

Asterisk 1.8+ has Native GoogleTalk/Google Voice integration.  My question is why the need to setup GV on the OBi110?  Why not setup the OBi110 as a single extension and setup your Asterisk Server with multiple GV Trunks?  I have PBX In A Flash running Asterisk 1.8.5.0 and I have 8 GV Trunks from which to choose from.  I have this setup with a IP Phone (KT-TGP551T04) with 8 SIP Lines registered to the Asterisk Server (an HP Thin Client) as a extension.

DocM

#3
I kept on reading that GV on asterisk is unreliable. According to articles, OBI seems to have less problems and more stability with GV, unlike asterisk. My project would be a whole lot easier if I used asterisk's GV function.

klingon

You're correct.  GV on Asterisk is not very reliable as Google keeps changing and Asterisk is not able to keep up.  If you're using the guide from the following 2 links, I believe all you need to do is to set up multiple Trunks in Asterisk pointing to each of the Obi's IP address to register. I have not tried it myself but it shld work.

http://michigantelephone.wordpress.com/2011/02/06/how-to-use-the-obihai-obi100-or-obi110-voip-device-as-a-gateway-between-asteriskfreepbx-and-google-voice-andor-the-obitalk-network/

http://michigantelephone.wordpress.com/2011/02/12/how-to-use-the-obihai-obi100-or-obi110-voip-device-as-a-gateway-between-asteriskfreepbx-and-google-voice-andor-the-obitalk-network-%E2%80%94-part-2-using-the-phone-port-as-an-asterisk-extension/

DocM

I used that exact setup as described in those links on the first OBI (a GV on SP1 and Asterisk connection on SP2). However, I can't use it on the second OBI (2 GV accounts) without sacrificing one of the GV accounts.

I am at the moment, trying to set the InBoundCallRoute on the first OBI's SP2 to redirect specified calls to either the OBITALK Service or a Voice Gateway. However, even after reading the Voice Gateway description in the OBI Admin Guide, I am unable to understand how it functions. Is a voice gateway just used to bypass the authorization code asked by the OBITALK Service? As far as I can understand, the OBITALK Service isn't redirected to the AA if a number is sent along with the caller id, thus no authorization code is asked. If that's true, then whats the point of the Voice Gateway?

OBITALK Service's InboundCallRoute: {(111111111)>(xx.):sp1},{(111111111):aa},{ph}

QBZappy

DocM,

I think the gateways where originally intended to connect any OBi/OBiAPP to any OBi. OBihai was thinking "World Domination" when they designed this feature. IMO the plan was to create interconnected OBi's around the world, on either a small or big scale. Other uses for the gateway can be found for services which do not need to be registered. Plenty of examples on the forum.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

RonR

#7
DocM,

Try this for outbound calls to three Google Voice accounts across two OBi's:

OBi #1 (200111111) : SP1 = Google Voice / SP2 = SIP

Voice Services -> SP2 Service -> X_InboundCallRoute : {sip_userid>(Mtg1):tg1},{ph}

Voice Services -> Gateways and Trunk Groups -> Trunk Group1
TrunkList : sp1,vg1
DigitMap : (<1aaa>[2-9]xxxxxx|<1>[2-9]xxxxxxxxx|1xxxxxxxxxx|011xx.)

where aaa is your local area code.

Voice Services -> Gateways and Trunk Groups -> Voice Gateway1
AccessNumber : 200222222

OBi #2 (200222222) : SP1 = Google Voice / SP2 = Google Voice

Voice Services -> OBiTALK Service -> InboundCallRoute : {200111111>(Mtg1}:tg1},{ph}

Voice Services -> Gateways and Trunk Groups -> Trunk Group1
TrunkList : sp1,sp2
DigitMap : (<1aaa>[2-9]xxxxxx|<1>[2-9]xxxxxxxxx|1xxxxxxxxxx|011xx.)

where aaa is your local area code.


SIP calls to OBi #1 SP2 will use OBi #1 SP1 first, followed by OBi #2 SP1, followed by OBi #2 SP2.

MichiganTelephone

#8
Quote from: DocM on March 20, 2012, 05:31:52 PM
I was wondering if I could get three GV Accounts (one on the first OBI and two on the second OBI) connected to my asterisk server. I was able to get the OBI with one GV account working by placing the GV account on SP1 and connecting to the asterisk server on SP2. Now I am wondering if I can somehow get the second OBI with two GV accounts to connect to my asterisk server. The only solution I came up with is attempting to send all calls from and to the second OBI's GV accounts via a Voice Gateway to the first OBI's SP2 asterisk connection. I am unclear how the Voice Gateway functions (like how to redirect calls sent through the Voice Gateway to SP2) so I am unable to implement my idea. I would be grateful for any help provided.

Thanks in advance for any help provided.

Don't forget that every OBi device has a connection to the OBiTALK network, which can be thought of as a third service provider.  So you could (in theory, anyway) forward calls from one OBi device to the other via OBiTALK and then send them from there to your Asterisk server.

I really wish there were an OBiTALK client that ran under Linux and could act as a direct bridge between the OBiTALK network and Asterisk.  OR that you could set up a Voice Gateway to a SIP-based server even if all of your main service providers are set to Google Voice.

When the OBi202 is released it will be a BIG help in situations like this, since it has four Service Provider configurations and you'd only need to use one of them for the link to your Asterisk server, or maybe even none of them as long as at least one is connected to some SIP-based service (like a commercial VoIP provider) and all you care about is incoming calls, not outgoing - see How to divert incoming Google Voice calls from an Obihai VoIP device to an Asterisk server for additional processing (such as Caller ID lookup) which shows a way to use a Voice Gateway for your connection to Asterisk.

And for calls in the reverse direction (Asterisk to Obihai to Google Voice) see How to use the Obihai OBi100, OBi110, or OBi202 VoIP device as a gateway between Asterisk/F—PBX and Google Voice and/or the OBiTALK network (UPDATED).  But again, it won't work unless one of your Service Providers is configured for SIP, not Google Voice.
Inactive, no longer posting or responding to messages.  Goodbye and good luck.  Some of my old Obihai-related blog posts have been moved to http://tech.iprock.com - note this in NOT my blog; I have simply given the owner permission to repost some of my old stuff.

DocM

Thanks for all the great replies.

@QBZappy: World Domination LOL!

@RonR: Your setup was great. I tweaked it a bit so that the asterisk server could target what number to use:
On OBi110 #1 (200111111):
Voice Services > SP2 Service > X_InboundCallRoute: {>(801):ph},{>(*101(Msp1)):vg1},{>(*102(Msp2)):vg1},{sp1}
Voice Services > Gateway and Trunk Groups > Voice Gateway 1 > AccessNumber: 200222222

On OBi110 #2 (200222222):
Voice Services > OBiTalk Service > InboundCallRoute: {(200111111)>(<*101:>(Msp1)):sp1},{(200111111)>(<*102:>(Msp2)):sp2}

These work perfectly, so far.

However, I can't seem to receive incoming calls from OBi110 #2 and redirect them to OBi110 #1. I confirmed the GV lines are functioning (changed SP1 and SP2's X_InboundCallRoute to ph).

The following is what I've tried:
On OBi110 #1 (200111111):
Voice Services > OBiTalk Service > InboundCallRoute: {(200222222)>(xx.):ph}

On OBi110 #2 (200222222):
Voice Services > Gateway and Trunk Groups > Voice Gateway 1 > AccessNumber: 200111111
Voice Services > SP2 Service > X_InboundCallRoute: vg1

I tried replacing vg1 with numerous combinations (i.e. vg1(200111111) or vg1($1) or vg1(GV number)). Any time any call is made to the GV number, nothing shows up on the call logs. Not sure what to do here.

Btw, do you know whats the largest number that Voice Services > SP2 Service > MaxSessions can reach?

Thanks again for your help. Your example helped me understand Voice Gateways and Trunk Groups a bit more.

@MichiganTelephone: Its an honor to speak with you. Thanks for all the great detailed articles that helped me so far through my personal project. Without them, I doubt I would understand the obi as much as I do today. The OBi202 would have been perfect if it was available at the time of my purchase :( . Unfortunately, neither articles that you linked would be useful to me since I am using both SP1 and SP2 for GV accounts on my OBi110 #2.

RonR

Quote from: DocM on March 26, 2012, 06:08:06 PM
However, I can't seem to receive incoming calls from OBi110 #2 and redirect them to OBi110 #1. I confirmed the GV lines are functioning (changed SP1 and SP2's X_InboundCallRoute to ph).

The following is what I've tried:
On OBi110 #1 (200111111):
Voice Services > OBiTalk Service > InboundCallRoute: {(200222222)>(xx.):ph}

On OBi110 #2 (200222222):
Voice Services > Gateway and Trunk Groups > Voice Gateway 1 > AccessNumber: 200111111
Voice Services > SP2 Service > X_InboundCallRoute: vg1

I tried replacing vg1 with numerous combinations (i.e. vg1(200111111) or vg1($1) or vg1(GV number)). Any time any call is made to the GV number, nothing shows up on the call logs. Not sure what to do here.

There appears to be a nasty bug in the OBi.  When the source of the call sent across the OBiTALK Service is SP1 or SP2 (and possibly the LINE Port), the receiving OBi sees the callee as anonymous.  Consquently a '486 Busy Here' response is returned unless the callee is a ? (anonymous):

Voice Services > OBiTalk Service > InboundCallRoute: {200222222>?:ph}

The only work-around I can find is to not test the callee:

Voice Services > OBiTalk Service > InboundCallRoute: {200222222:ph}

Also, if you use a Voice Gateway, CallerID will not be passed.  To pass CallerID, use:

Voice Services > SP2 Service > X_InboundCallRoute: PP(ob200111111)

Quote from: DocM on March 26, 2012, 06:08:06 PM
Btw, do you know whats the largest number that Voice Services > SP2 Service > MaxSessions can reach?

I don't believe it makes sense to set MaxSessions higher than four as that's the maximum number of bridges the OBi is capable of.

DocM

Thanks RonR for all your help.

I decided to utilize the OBI110 #2's OBiTalk Service for incoming calls so I could pass the caller's number. I think this would achieve the same results as passing it through vg (except for the caller number). The only weakness I can think of for this solution is that if anybody manages to somehow spoof the obi number, they may be able to enter my asterisk system (but that is easy to secure within asterisk). These settings are working great for me.

The following is what I have done:
On OBi110 #2 (200222222):
Voice Services > SP1 Service > X_InboundCallRoute: {pp(ob200111111)}
Voice Services > SP2 Service > X_InboundCallRoute: {pp(ob200111111)}

On OBi110 #1 (200111111):
Voice Services > OBiTalk Service > InboundCallRoute: {(200222222)>(?|xx.):sp2(200111111)}

I have two more questions:
1) On the OBi110 #1's Voice Services > OBiTalk Service > InboundCallRoute, is {(200222222)>(?|xx.):sp2(200111111)} the same as {(200222222):sp2(200111111)} ?
2) If there is only a max of 4 sessions, does that mean if there are 6 simultaneous incoming calls (ie. 4 from OBi110 #2 to OBi110 #1 and 2 from OBi110 #1's SP1), 2 of the calls will possibly get a busy signal?

RonR

#12
Quote from: DocM on March 28, 2012, 09:27:46 AM
On OBi110 #1 (200111111):
Voice Services > OBiTalk Service > InboundCallRoute: {(200222222)>(?|xx.):sp2(200111111)}

I have two more questions:
1) On the OBi110 #1's Voice Services > OBiTalk Service > InboundCallRoute, is {(200222222)>(?|xx.):sp2(200111111)} the same as {(200222222):sp2(200111111)} ?

>(?|xx.) is not valid syntax.  A ? is not a DigitMap operator and does not belong inside parenthesis.  This is yet another bug that hasn't been corrected in over a year:

http://www.obitalk.com/forum/index.php?topic=347.msg2156#msg2156

Since the newly discovered bug precludes validating callee's in your usage, I'd just go with:

{200222222:sp2(200111111)}

Quote from: DocM on March 28, 2012, 09:27:46 AM
2) If there is only a max of 4 sessions, does that mean if there are 6 simultaneous incoming calls (ie. 4 from OBi110 #2 to OBi110 #1 and 2 from OBi110 #1's SP1), 2 of the calls will possibly get a busy signal?

I believe so.

DocM

Thanks again for the info, RonR.

I actually tested:
{((200222222)>(?|xx.)):sp2(200111111)}
{((200222222)>(?)):sp2(200111111)}
{(200222222):sp2(200111111)}

All three of them worked for me but I decided to play it safe and took your advice.

RonR

Quote from: DocM on March 28, 2012, 11:30:42 AM
I actually tested:
{((200222222)>(?|xx.)):sp2(200111111)}
{((200222222)>(?)):sp2(200111111)}
{(200222222):sp2(200111111)}

All three of them worked for me but I decided to play it safe and took your advice.

The first two work only because of the year-old bug in the OBi that still hasn't been fixed.

Also, you don't need the parenthesis around 200222222.