Possible to use OBi110 to as an FXO port on an Asterisk server?
MichiganTelephone:
Just an update… early this morning I posted this:
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)
I believe that for many people this will be a better approach, as it is easier to set up and lets you configure your Asterisk extension in the normal manner. It uses a Voice Gateway to send calls from the OBi device to Asterisk (rather than a Service Provider) and it has a slightly different way of sending outgoing calls from Asterisk to the OBi device as well. It's basically the method I would have used a year ago if I'd known then what I know now about Obihai devices (note I still don't claim to be any kind of expert, just that I know more now than I did back then). I think that perhaps some folks to didn't like my original method or found flaws in my implementation might like this one a lot better.
Ad_Hominem:
REVISED (too many times to count)
--------------------
I just had an idea that I think will work, that will allow the trifecta without setting up any custom dialplans in FreePBX, and preserving all Caller ID information. It would allow using a single Obi 110 to provide an FXO using Line Port, an FXS using Phone port, and Google Voice, at the same time!
Here are my general thoughts. I'm going to have to experiment to get it to work, but I think it can be made to work.
I'm essentially using your new method, EXCEPT that instead of sending calls from GV/FXO back through a Voice Gateway, I'm just going to send them back through a context=from-internal trunk, and instead of setting up inbound routes, I'm going to set up Ring Groups that acheive the same effect as inbound routes. To avoid confusion, I'll use fictional DID's for GV and the FXO, but only FreePBX and Obi will know about them.
1. SP1 would connect to Google Voice in the way I described in my older instructions above. All incoming calls to Google Voice would be routed to SP2 using SP1's X_InboundCallRoute (as described in my article above), except that instead of using my actual GV # as the DID inside SP2(xxx), I'll use a fake DID, i.e. SP2(801).
2. SP2 would connect to a FreePBX Trunk that has context=from-internal.
SP2 would route inbound calls, i.e. calls from FreePBX/Asterisk according to the dialed digits, i.e. 001xxx would go to Google Voice, 002xxx would go to the LINE PORT, and whatever extension number you decide to assign to the extension number would go to the PHONE port. This would be done using the X_InboundCallRoute for SP2 similar to what I posted previously.
i.e.
{>(<001:>x.):sp1}, {>(<002:>x.):li}, {>(50):ph}
The above **should** route calls from FreePBX to SP1 (i.e., Google Voice) if they are prefixed with 001, to the LINE port if they are prefixed with 002, and to the phone port if the number dialed is 50. It would strip the 001 and 002, but not the 50.
3. The Line Port would route outgoing calls to SP2 with a DID Number, just like it does in my other set of instructions for using the Obi 110 as an FXO. This would mean that calls to the FXO port would come into FreePBX as if the extension dialed the DID Number listed. Instead of using a real DID, I'd create a fake one, i.e. 802.
4. The Phone Port would route outgoing calls to SP2 with the dialed number, just as it does in my other set of instructions for using the Obi 110 as an FXS.
In addition, the Phone Port OutboundCallRoute will be modified to send a Caller ID reflecting the extension number we've decided to assign to this particular extension on the Phone Port.
i.e.,
Change the first part of the outbound call route on the Phone Port as follows:
{([1-9]x?*(Mpli)):pp(50>)}
This will cause calls going out on the Phone Port to the Primary Line (in this case to SP2) to have 50 show up as their Caller ID.
5. A Ring Group or Misc. Application would be set up in FreePBX to match the DID transmitted by the LINE Port and the DID transmitted by GV. This is necessary because you are using an extension with a context=from-internal, so inbound routes won't work. This isn't a huge deal, however, as Ring Groups/Misc. Application can both route calls with all the very same options as an Inbound Route.
6. Since the Obi will process any SIP URI calls, just create a separate SIP URI trunk (as you have proposed in your new instructions) for outbound calls using SIP/$OUTNUM@192.168.1.xx:PORTNUMBEROFSP2.
The outbound routes would be set-up similar to what I've set up in my initial Google Voice guide, prefixing calls that you want to go to Google voice with 001 and prefixing calls to the FXO with 002, or whatever prefixes you want. As noted above, you'd program the X_InboundCallRoute for SP2 to strip these prefixes and send the call to the correct destination, i.e. SP1 for Google Voice, LI for FXO calls, and PH for calls to the particular extension. You'd also want an outbound route for the extension #, in this case, 50, that would route to the SIP URI Trunk as well.
This method could also easily be expanded to allow use of the ObiTalk service as well. Just use SP2(803) for the ObiTalk's X_InboundCallRoute, create a Ring Group/Misc. App for 803 in FreePBX, modify SP2's X_InboundCallRoute to set-up a prefix for OB calls (i.e. 003), and then set-up your OB routes in FreePBX to prefix OB calls with 003 and send them to the SIP URI Trunk that delivers calls to SP2.
I'm going to look into whether there's a way to combine all three (FXO, FXS, and GV) using the Voice Gateway method you've suggested when I have a chance. It should be easy enough to change option 2 to an extension, route the Phone Port through SP2, send FXO and GV through the Voice Gateway as you've proposed, and use SIP URI Dialing to send calls out to the FXO and GV, using the prefixes as I've proposed.
jchonig:
Thanks to MichiganTelephone I am the proud owner of an Obi100 to use with my Asterisk system. It arrived today and so far I have it working as an Asterisk extension and for outbound Google Voice calls.
One variation on MichiganTelephone's instructions were to use an X_InboundCallRoute of:
{>(<+:>x.):sp1},{ph}
So that any calls from Asterisk prefixed with a + will be routed to Google Voice with the + stripped. This will allow me to make international calls via Google Voice.
Expanding this to ObiTalk I would probably add {>(<***9:>x.):pp}, but I have not gotten that far.
MichiganTelephone:
Quote from: jchonig on April 03, 2012, 07:02:43 pm
One variation on MichiganTelephone's instructions were to use an X_InboundCallRoute of:
{>(<+:>x.):sp1},{ph}
So that any calls from Asterisk prefixed with a + will be routed to Google Voice with the + stripped. This will allow me to make international calls via Google Voice.
Hey, why didn't I think of that? :-[ I modified my instructions to use this. Goes to show that there's always a better way to do something! Thanks very much jchonig (and I did give you credit near the bottom of the article)!
OOPS… After further testing I discovered this does not work reliably for me, and I don't know why (perhaps the "replacement" syntax that works in an OutboundCallRoute doesn't have the same effect in an InboundCallRoute? Anyway, since I never make international calls, I don't have a huge interest in figuring it out). So, I now recommend using this if you want to be able to send international calls through your OBi:
{>(011x.|1xxxxxxxxxx):spx},{ph}
Change spx to whichever of sp1, sp2, etc. you use for Google Voice.
That way, if you send an 11 digit call where the first digit is a "1" or if you send an international call that starts with "011" to the OBi it will put it through to Google Voice. You can prepend the "1" (to 10 digit U.S.A./Canada numbers) and/or "011" (to international numbers that don't have it) in your trunk's "Dialed Number Manipulation Rules" if necessary.
twinclouds:
I know this is an old thread. I tried to get some of the "how-to" cited in the posts but cannot not find any. Can someone tell me where to find these. Essentially, I just want to use obi110 as a gateway for asterisk "Allow use of the FXO port for inbound and outbound calls." I am able to set it up on freepbx. However, I really want to use plain asterisk but cannot find any step by step instructions. Are there still some available? Please let me know. Thanks in advance.
Navigation
[0] Message Index
[#] Next page
[*] Previous page