News:

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

Main Menu

Setup Asterisk (FreePBX) with Obi to use the AA features of the Obi

Started by QBZappy, January 27, 2011, 09:02:10 AM

Previous topic - Next topic

QBZappy

I have setup the following between an Asterisk (FreePBX) and Obi: This is my setup

Obi Setup
1) Obi to Asterisk as an extension (easy to setup) Used unit web access page to setup
ITSP InboundCallRoute={(x.5141111111|x.5142222222|102|112):aa},{ph} <- note the {ph}
(Used unit web access page in Setup Wizard section)
(note 1234567 replacing real tel numbers) Extension numbers= 102, 112
Phone PrimaryLine= Trunk Group 1
Attendant PrimaryLine= Trunk Group 1

Asterisk setup
2) Peered Asterisk to Obi (Asterisk knowledge required)
Setup Obi trunk: My setup on Asterisk using FreePBX

Trunk Name: Obi_Trunk_Peer (Give this trunk a unique name)

PEER Details:
host=172.16.240.201 (Obi lan IP address)
username= (leave blank)
secret= (leave blank)
type=peer

EDIT: Config also works without Register String.
Register String: admin:1234@Obi_Trunk_Peer  
(Note use the same Trunk name you used to setup the Peer details as per above)

example: username:password@switch.voipprovider.com


Setup outbound Obi_Out_Route (Dial plan prefix=9 dial pattern=514NXXXXXX)

Obi behavior with this setup is as follows:
AA intercepts call with options 1,2,3 when call comes from telephones numbers 5141111111, 5142222222, or from extensions 102, 112. The phone attached to the unit rings if you continue the call. All working great.

Need to do the following:
I will be shipping out an Obi unit out of country. I can not know what numbers the users will be using in advance. Therefore I can not populate the numbers in the ITSP InboundCallRoute. My approach was to setup call to Asterisk and use prefix 9 to dial out to Obi trunk.

I can not seem to get this to work. I am not understanding something. If I leave the {ph} in the last part of the "ITSP InboundCallRoute" as per above settings, the extension rings, If I replace it with SP1 Asterisk picks up, IVR speaks then it gives me "extension not available".

Can you suggest an improvement or alternate approach to call into Obi unit through Asterisk using an unknown number, or is the "circle of trust" concept the foundation of this.

Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

MichiganTelephone

If all else fails I'm going to try to figure this out myself in the next few days, but since Marcelo Rodriguez at Voxilla says they are working on it (specifically, "Coming soon in this series: A detailed guide to connecting OBi to Asterisk/FreePBX") I'd also keep an eye on their site. That said, I see one glaring thing wrong in your approach, and that's how you're doing your FreePBX trunk.  You should not need the username or secret lines at all (nor the register string down below) but you do need a context statement, else your incoming calls have no place to go.  And it does need to go in the PEER details.  Typically the string is context=from-trunk but in this case you want to make it context=from-trunk-sip-Obi_Trunk_Peer (using -sip-your_trunk_name at the end) so that the Maximum Channels setting will be honored (and you do want to set the Maximum Channels to 1, since you can only have one call at a time on the Line port).

Don't forget that you'll also need to create an Inbound Route or FreePBX will drop your calls on the floor, unless you have Anonymous Inbound SIP calling enabled.  That's not a good idea for security reasons, but you can do it temporarily (in the FreePBX General settings) to see if that's your issue.  If it is, watch the CLI as a call comes in, and it will likely tell you what you should be using as a DID in the Inbound Route (so you can turn off Anonymous Inbound SIP).

As for the ITSP InboundCallRoute, I am not really sure what you are attempting to do there but I believe that you could use x. and it would match on anything (which makes me wonder why you have x. followed by a number, but maybe I'm not quite getting the OBi syntax).  So, for example, a pattern like 514XXXXXXX would match on any 514 number, but so would 514X. the difference being the latter would match if the number were four digits or longer starting with 514, whereas the former would require the number to be ten digits long starting with 514).  Check the documentation to be sure: http://www.obihai.com/docs/OBiDeviceAdminGuide.pdf

Also, you did see this post, right? http://www.obitalk.com/forum/index.php?topic=57.0

That is for use with raw Asterisk (not FreePBX per se) but the configuration of the OBi110 should be the same unless you are trying to do something special.  Just as a wild guess, I'd suspect that in step 6 of that document, where it says "6.   Set LINE Port - InboundCallRoute = SP1(2000)", what you'd really want to use there instead of 2000 is the actual phone number associated with the line, and then use that exact same number as the DID in your Inbound Route in FreePBX.  But for the moment consider that a wild guess — just something to try.

I hope this helps, at least somewhat.  If you make any headway please come back and tell us what worked (or what didn't) so we can all benefit.
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.

QBZappy

Thanks MichiganTelephone for your help. I've read many of your other comments all over the place over the last few years. Obitalk forum is indeed lucky to have your interest. I feel honored by your help.

Quote from: MichiganTelephone on January 27, 2011, 10:30:48 AM
If all else fails I'm going to try to figure this out myself in the next few days, but since Marcelo Rodriguez at Voxilla says they are working on it (specifically, "Coming soon in this series: A detailed guide to connecting OBi to Asterisk/FreePBX") I'd also keep an eye on their site. That said, I see one glaring thing wrong in your approach, and that's how you're doing your FreePBX trunk.  You should not need the username or secret lines at all (nor the register string down below) but you do need a context statement, else your incoming calls have no place to go.  And it does need to go in the PEER details.  Typically the string is context=from-trunk but in this case you want to make it context=from-trunk-sip-Obi_Trunk_Peer (using -sip-your_trunk_name at the end) so that the Maximum Channels setting will be honored (and you do want to set the Maximum Channels to 1, since you can only have one call at a time on the Line port).

Reply:
I tweaked the Peer details with your suggestion. Note that I am not using Line port. I am only using the SIP accounts. SP1 and SP2. At the moment using the Trunk Groups feature

Don't forget that you'll also need to create an Inbound Route or FreePBX will drop your calls on the floor, unless you have Anonymous Inbound SIP calling enabled.  That's not a good idea for security reasons, but you can do it temporarily (in the FreePBX General settings) to see if that's your issue.  If it is, watch the CLI as a call comes in, and it will likely tell you what you should be using as a DID in the Inbound Route (so you can turn off Anonymous Inbound SIP).

Reply
I have an inbound route for any DID or CID. Routing to Obi unit is not a problem. Under current setup this part works.

As for the ITSP InboundCallRoute, I am not really sure what you are attempting to do there but I believe that you could use x. and it would match on anything (which makes me wonder why you have x. followed by a number, but maybe I'm not quite getting the OBi syntax).  So, for example, a pattern like 514XXXXXXX would match on any 514 number, but so would 514X. the difference being the latter would match if the number were four digits or longer starting with 514, whereas the former would require the number to be ten digits long starting with 514).  Check the documentation to be sure: http://www.obihai.com/docs/OBiDeviceAdminGuide.pdf

Reply:
Got it from page 94 of Admin manual. Just a more inclusive way of catching the CID. Both methods work. Not sure which is more efficient.

Also, you did see this post, right? http://www.obitalk.com/forum/index.php?topic=57.0

Reply:
Not intending to use line port in this use senario

That is for use with raw Asterisk (not FreePBX per se) but the configuration of the OBi110 should be the same unless you are trying to do something special.  Just as a wild guess, I'd suspect that in step 6 of that document, where it says "6.   Set LINE Port - InboundCallRoute = SP1(2000)", what you'd really want to use there instead of 2000 is the actual phone number associated with the line, and then use that exact same number as the DID in your Inbound Route in FreePBX.  But for the moment consider that a wild guess — just something to try.

Reply:
Not really trying to make automatic CB.

I hope this helps, at least somewhat.  If you make any headway please come back and tell us what worked (or what didn't) so we can all benefit.


What I am trying to accomplish is dial to Asterisk from an unknown number, dial Asterisk extension to get Obi AA in order to dial option#1,2, or 3 and choose an option. I want to use it like a DISA with Google Voice. I can get this to work with a known CID.

I'm thinking now calling a dead Asterisk extension with "Follow me" setting going to Obi extension. I'm not certain if the CID will be the extension number which is doing the forwarding. If it is then I can have an extension hard coded into the Obi "ITSP InboundCallRoute".

I wanted to avoid all the trouble of setting up Google voice in Asterisk. It seems like I am doing more work this way. Anyway it's fun trying to figure things out.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

MichiganTelephone

??? Okay, I guess I totally misunderstood what you're trying to do... well, actually, I didn't understand what you are trying to do and am not sure I get it even now. So, let me ask a few questions to see if I can wrap my head around this:

Are you planning on using the Line port on the OBi110 at all?  If so, what do you want to have happen with calls that come in on the Line port?  And, do you ever want to make outgoing calls using the Line port?

What I am hearing you say is that you want to bring calls in on your Asterisk server (from what?  Extensions? SIP or IAX2 trunks?) and then send them to the OBi110 so it can send them on to Google Voice.  And while I suppose that's possible, I just can't imagine why you'd want to do it that way, when Asterisk is capable of talking to Google Voice directly — UNLESS maybe you're running a pre-1.8.2 version of Asterisk and don't want to upgrade. Is that perhaps the case?

I get that you want outgoing calls from your Asterisk box to go to the OBi110 and hit its auto attendant.  But as fine a device as the OBi110 is, I don't understand what its auto-attendant can do that FreePBX cannot do.  From what you've said, you'll have to forgive me for having the impression that you don't plan on using either the Line OR the Phone ports on the OBi110.  I'm sure that's not the case, but I guess what I'm saying is either I'm dense as a brick today (which is entirely possible) or you're not breaking this down enough that I can "get" what you're doing (let alone why).

In any case, as I said in my previous message, in the OBi110 you should be able to use a pattern that will accept calls from any number matching the pattern.  If you replace your current hardcoded numbers with a proper match pattern I would think you'd be all set, assuming it currently works the way you want when you call from one of those numbers.

Sorry I can't be of more help (but it sounds like you're having fun working with the device!).  :)
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.

QBZappy

Best way I can think of describing usage is as follows:

1) Phone port is to be used to make and receive calls from unit overseas. This part is easy to program into Obi has unit registration number which is known in advance. If we have a sip account there it can be integrated into the ITSP InboundCallRoute otherwise into the OBiTALK InboundCallRoute. Internet connection is certain to be available.

2) Line port not important at the moment as I'm not certain if there will be a POTS line available.

Usage scenario:
Telephone call from outside the physical location where the Obi unit is located overseas. For example a pay phone, or some other telephone not connected to the Obi.

Desired behavior:
Asterisk is available all the time via a payphone for example. Call an extension on the Asterisk, we reach Obi AA with options# 1,2,3. Basically DISA service off the Obi instead of Asterisk.

You are correct in saying FreePBX can handle Google voice more easily once it is setup. I went on this path thinking it would be easier to set this up than setting up Google voice in the Asterisk. The Obi with Asterisk is an interesting combination. I am not ready to give up at the moment. Still thinking about calling a dead Asterisk extension which forwards to Obi Asterisk extension. If CID of forwarded extension flows through the call, I can then hard code it into the iITSP InboundCallRoute. I will check on this.

I can see the possibility of using the Obi by itself. This might simplify things. However the Obi will not process unknown CID numbers. Without the Obi IVR kicking in first we can not even press a secret code to activate the Obi AA. I think it is designed with "the circle of trust" concept in mind. This implies that known Obi units or telephone numbers are to be entered in the web portal or some InboundCallRoute on the unit itself.

I wonder if the Obi has ability to listen in on DTMF tones over the call precessing? I'm not sure that is even possible. Then I could dial secret code to activate AA.

ShermanObi can you clarify some of these points?

Thks for the followup.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

obiliving

QBZappy,

It seems there is a conflict on what you want, or I have misunderstood your intention.

You want one particular unknown CID caller to go to aa, and yet other callers to go the ph?
By unknown CID I assume you mean it has a caller-id number, just not known to you.

The problem I have is how to tell which caller to go to aa and which caller to go the ph, since they are all unspecified.

If you truly want any caller number to go to aa, then just specify {aa}
in the InboundCallRoute (i.e., everyone is in your circle of trust), and don't include
{ph} in the route. Will they work for you?

Sorry if I misunderstood your intention. Please clarify.

ShermanObi

Would this work? ...

Use the following for ITSP InboundCallRoute={aa},{ph}

The OBi Attendant would pick up all the calls (after the AA answer delay timeout) and the payphone caller can then access the AA menu and make a new call (option 2) to an Asterisk extension, OBi No. (**9 or speed dial).  You would just need to be careful here because all inbound calls would get the AA and unless there is a PIN, everyone could use option 2 or 3 to make a new call.

Note sure I understand the part about listening in for the tones and then switching to AA.

QBZappy


Obiliving,

That's just it. Obi AA IVR must screen all the calls in order to precess them.

I could make this work if:

1) I can figure out how to call forward using the "Follow me" feature of Asterisk and pass an extension number to the call forwarded extension. The reason for this is that the first call will show CID of the telephone number calling. The first extension dialed can be "Forwarded", hopefully passing the extension number. Can someone help me with this part?

Ex: Call Asterisk, dial ext 703, this will be forwarded unconditionally to ext 704, which can be hard coded in the ITSP InboundCallRoute to go to AA.
or
2) If the Obi could be configured to answer all calls silently we could have it AA all calls. The admin of the unit could instruct users what to dial in if they wanted to dial Option 1,2,3 during this silent interval. Short pause then if no entry goto Option 1 to continue this call. Timing of these pauses would have to give impression that call flow is not interrupted. I don't suppose this unit will ever have the ability to upload a recorded message to control the IVR. This could introduce the impression of a nested IVR feature if Asterisk was in front controlling the first part of the call process.

I remember when answering machines were common. I had to setup a fax machine, telephone, and answering machine in a small office with only one POTS line. Answering machine picked up first. I had to make certain there was silence in the beginning of the message so that the fax machine could intercept an incoming fax. If not a fax then call would then be picked up by someone or go to the answering machine.

In any event whether Asterisk is in the middle or Obi is stand alone, this DISA feature could be implemented. The unit already has DISA in its current state. Option#2, and callback Option#3 as a bonus. I haven't seen any other ATA with this feature.

There is always the solution of setting up a dedicated Obi to AA all calls. Takes away flexibility of the unit.

ShermanObi,
Your suggestion might be the way to go. Wanted to setup a more seamless call flow without listening to Obi IVR on every call.

Tks for your feedback.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

MichiganTelephone

#8
Regarding #1, maybe this would help you — it's an unsupported third-party module for FreePBX:

http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/set-callerid
QuoteSet CallerID

Adds the ability to change the CallerID within a call flow.

Set CallerID allows you to change the caller id of the call and then continue on to the desired destination. For example, you may want to change the caller id from "John Doe" to "Sales: John Doe". Please note, the text you enter is what the callerid is changed to. To append to the current callerid, use the proper asterisk variables, such as "${CALLERID(name)}" for the currently set callerid name and "${CALLERID(num)}" for the currently set callerid number.

The latest release can be found at:
http://www.freepbx.org/trac/browser/contributed_modules/release

Be sure to get the most recent version.  So basically what you do is install this module, create a CallerID instance where you force the CallerID name and number to be whatever you want, and then in your inbound route you can direct calls to your Caller ID instance (it should appear in the destination list).  If you need to access it from someplace in the call flow that doesn't support destinations directly (such as Follow-Me) I suppose you could assign the CallerID instance an "extension" number using Misc. Applications (it says you can assign "Feature Codes" but a feature code can be any number, it does not have to be a *xx code or something like that).  So your call flow might look like:

Inbound route --> CallerID instance --> OBi110 Extension

or perhaps

Inbound Route --> IVR --> Selected Caller ID instance --> OBi110 Extension

The latter would let you use a FreePBX IVR which could then be used to select one out of several Caller ID instances, each of which would send a particular (but different) CallerID to the OBi110 (which the OBi110 could use for additional processing).

I think, if I am understanding you, this would eliminate the need to try and set up a fake extension.

If you've never downloaded a third-party module before, the trick is to click on the first .tgz link you see (don't right-click yet) and it will take you to another page (example: http://www.freepbx.org/trac/browser/contributed_modules/release/setcid-2.8.2.tgz ).  On that page you will see a link that says "Download in other formats: Original Format." Right click on the "Original Format" link and download the file to your system.  Edit the filename so that it ends in .tgz (strip off the "?format=raw") and then go into Module Admin in FreePBX and click on "Upload Module" and go from there.
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.

QBZappy

Just a follow up.

Managed to pass CID from one extension to another using FreePBX. In the FreePBX Follow me setting for an extension there is a setting for "CID Name Prefix:". When we dial an extension which forwards to another extention internally the CID Name Prefix: we use is passed on the receiving caller ID device. However AA did not process the call. I made a trace of the call and noticed the SIP header did not have the prefix.

I'm giving up.

Would have been interesting to have something I have come to call my "Stealth circle of friends" feature on the Obi.

Still the best ATA I've ever bought. I recommend this one.

Note that ShermanObi has setup a how to for automatic callback using the "ITSP InboundCallRoute". You can also add extra processing to the inbound calling. In addition to his example I added the following underlined section:

{(<**2>(5145551212|5145551234)):aa($1)},{102|112|703|704|):aa},{ph}
                                                            ------------------------------
Which adds a few choice internal extensions from an Asterisk box and a peered Grandstream 5024 PBX into the mix, giving them the ability to Google voice out some toll free calls. Calls from 5145551212, and 5145551234 calling in must and hang up before the AA picks up if you want a callback on the CID which made the call. The callback offers Options 1,2,3. It's one short ring before AA picks up. If you don't hangup you are offered the AA with the 3 Options giving you another chance to choose option 3 for you to dial the number to call you back.

The second part after the comma offers internal extensions 102,112,703,704 the AA offering the 3 Options, all other calls ring the attached phone (phone port).

This callback feature is reason enough to use this product for the cell phone users who have unlimited incoming air time.

Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.