UPDATED: 5/19/2012
Be sure to use the very latest firmware. Earlier versions had a bug with the X_UseRefer option which have now been fixed!
Note that I've made a lot of changes to these instructions since I wrote them a few years ago, and so if you set-up your Obi 110 based upon these instructions before the date listed above, you should double check your settings now. The updates include ensuring that the Obi 110 can transfer calls correctly (and allow you to continue making and receiving calls), process calls more quickly (by knowing when you're done dialing without waiting for 3-5 seconds), and I now include an option to allow you to choose whether your 911 calls should be routed to your PBX or direct to your FXO line (by default with the Obi, they are routed to your FXO line - even if you don't have one).
-----------------------------
Here's how to set up an Obi 110 to act as both an FXS and an FXO for any FreePBX -based PBX (including the FreePBX Distro, AsteriskNOW, PBX In A Flash, Elastix, and Trixbox):
1. Set a static IP address for your Obi 110 device:
System Management:
Network Settings:
Internet Settings:
Addressing Type: Static
IPAddress: Pick an IP Address for your device
SubnetMask: 255.255.255.0
DefaultGateway: 192.168.1.1
DNSServer1: 8.8.8.8
DNSServer2: 8.8.4.4
2. Set-up the Obi 110 to act as an FXS Port (i.e., to make the PHONE port work as an extension on your PBX):
a. First, set-up an extension on your FreePBX just like you'd set-up any other extension. Make a note of the extension # and password, as you'll need them for step 2.b.
b. Once you've determined the IP Address of your FreePBX and your extension # and your extension password, you can configure the Obi 110 device as follows:
Service Providers:
ITSP Profile A:
General:
General:
DigitMap:
(911S0|1xxxxxxxxxxS0|011xx.S2|xx.S2|xS2|xxS2|*X.S2|(Mipd)|[^*#]@@.)
Note: The standard Obi 110 "DigitMap" will allow you to dial calls from your FXS Port that are 3 digits or longer, and will put the call through after three seconds. It will also automatically add "1" to the beginning if you dial an area code and telephone number.
These behaviors may be undesirable. Some people prefer to have calls go out after 2 seconds, or immediately. In addition, PBX users often want to be able to dial one and two digit extension numbers, or feature codes that begin with an asterisk. Finally, some telephone companies that require the dialing of area codes for local calls do not allow the calls to be prefixed with a "1".
The Digit Map above eliminates the prefixing of calls with a 1, forces calls to 911 and to 1+Area Code+Number to go out immediately, sends all other calls out after 2 seconds of inactivity, and allows the dialing of feature codes starting with asterisk and one and two-digit extensions.
Note that the "S0" and "S2" in the digit map reflect how long the Obi will wait after receiving a matching pattern before putting the call through. In the above-example, most calls will go through 2 seconds after dialing is completed, but a 1 + area code + number call will go through immediately without waiting for further digits. You can change the numbers after the S to whatever delay suits your needs. For example, if you change 011xx.S2 to 011xx.S5, then the device will wait 5 seconds before putting through a call that begins with 011. Obi will always put a call through immediately if you dial # when you are finished dialing.
Service Providers:
ITSP Profile A:
SIP:
SIP:
Proxy Server: IPAddressofYourPBX
X_UseRefer: Checked
X_MWISubscribe: Checked
Voice Services:
SP1 Service:
SP1 Service:
X_ServProvProfile: A
SIP Credentials:
AuthUserName: EXTENSION#
AuthPassword: EXTENSIONPASSWORD
Calling Features:
MaxSessions: 10
Note: You can change the above to something less than 10 if security is an issue. The default of 2, however, will block you from making any calls if you transfer a call using the "flash" hook feature until the persons on those calls hang up. Ten should be more than enough, but you can also increase it if you prefer.
MWI Enable: Checked
X_VMWIEnable: Checked
MessageWaiting: Unchecked, but undefaulted
Voice Services:
SP2 Service:
SP2 Service:
X_ServProvProfile: B
Note: The above is necessary to prevent SP2 service from attempting to utilize ITSP A. For some reason, even if SP2 is disabled, it will still attempt to subscribe to the MWI feature from Port 5061, causing error messages to show up in the Asterisk Logs.
Physical Interfaces:
Phone Port
Phone Port
OutboundCallRoute:
If you have a phone line plugged into the Line Port, then no changes are necessary. By default, the Obi will route 911 calls to the phone line and NOT to your PBX. If you want to change this behavior, then find the part of this entry that reads:
{(<#:>|911:li}
and change it to
{(<#:>|911:sp1}
or just delete {(<#:>|911:li} from the OutboundCallRoute altogether.
This will route 911 calls through the Asterisk PBX instead of routing it directly to the Line Port.
Primary Line: SP1 Service
Calling Features:
StarCodeProfile: None
User Settings:
Speed Dials:
Note: The information below, regarding speed dials, appears to no longer be necessary. Obi probably fixed this in a firmware update.
By default, the OBI 110 uses all two digit #s between 1 and 99 as speed dials. If you want to use two digit extension numbers and/or you want to use 70 as the transfer destination for parking lots and 71-79 as the way to pick-up parking lots, you'll need to create speed dial entries mapping each of these to themselves. In other words, in the area for speed dial 70, type in 70. In the area for speed dial 71, type in 71, and so on.
3. Set-up the Obi 110 as an FXO Port (i.e., to allow you to connect a phone line to the LINE port and then make and receive calls on it using your PBX):
Service Providers
ITSP Profile B
SIP
SIP
Proxy Server: YOURPBXIPADDRESS
X_SpoofCallerID: Checked
Note: It is not clear to me that the X_SpoofCallerID setting is necessary, but the phone I currently use does not have Caller ID so I can't test it.
X_AccessList: YOURPBXIPADDRESS
Voice Services
SP2 Service
SP2 Service
X-ServProvProfile: B
X_InboundCallRoute: LI
SIP Credentials:
AuthUserName: OBITRUNK1
AuthPassword: FXOPASSWORD
Note: the AuthUserName should NOT be your phone number. It must match with the trunk name used when you set-up the trunk in FreePBX.
Physical Interfaces
Line Port
Line Port
InboundCallRoute: SP2(2125551212)
Note: Change 2125551212 to the phone number of the line that will be attached to your LINE port.
RingDelay: 3500
This is how long the Obi 110 will allow the phone to ring before giving up on waiting for Caller ID. If the Obi 110 gets a Caller ID signal during this period, it immediately puts the call through. If you do not have Caller ID, you may wish to set this to 0.
DialDelay: 1000
Note: My POTS line can sometimes take longer to pull a dial tone because I have an alarm on it. You may not need to change this figure from the default.
DialDigitOnTime: 50
DialDigitOffTime: 50
Note: You don't need to change the above two settings either, but your calls will go out faster if you do.
PSTN Disconnect Detection:
SilenceTimeThreshold: 600
Note: The above increases the amount of time that the Obi will wait to disconnect a call if it hears silence. 600 equals ten minutes. You may not want to change the default.
Port Settings:
ACImpedance: 600
Note: You may need to change this to eliminate echo problems. Good luck!
ChannelTXGain: 0
ChannelRXGain: 5
Note: You don't need to change the above, but if you experience echo, you might want to reduce one or both of them.
4. Set-up a Trunk in FreePBX:
Now, you need to tell FreePBX how to make and receive calls from the Obi 110's connected line. You start by creating a trunk:
Trunk Name: Obitrunk1
Outbound Caller ID: 2125551212
Note: Change 2125551212 to whatever your outbound Caller ID actually is. This setting doesn't actually change your Caller ID, but it may be used in FreePBX's Call Detail Records.
Maximum Channels: Blank
Dialed Number Manipulation Rules:
18005558355+411|
Note: The Dialed Number Manipulation Rule above isn't necessary, but I use it to prevent users from dialing 411.
Trunk Name: OBITRUNK1
Note: The Trunk Name above (the second one in FreePBX) must match the AuthUserName that you entered when you set-up the FXO Port in the Obi 110.
Peer Details:
username=OBITRUNK1
secret=FXOPASSWORD
host=dynamic
type=friend
context=from-trunk
qualify=yes
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
Note: The "username" above must match the Trunk Name and the AuthUserName you entered when you set-up the FXO Port in the Obi 110.
Note: The secret you enter above must match the AuthPassword you entered when you set-up the FXO Port in the Obi 110. It does not need to be "FXOPASSWORD". You can select any password you like.
5. Set-up an inbound route in FreePBX
The Inbound Route in FreePBX tells FreePBX how to route calls that ring in to the Obi 110.
Description: Obi110
DID Number: 2125551212
NOTE: This must match the number you put in the Obi 110 FXO setup (above) inside the parenthesis in the InboundCallRoute after you entered SP2(. Normally, it should be the phone number of the line attached to the LINE port of the Obi 110.
CID name prefix: L1-
NOTE: You can put whatever you want in the above field. I like to have L1- to indicate that this call came in on Line 1.
Set Destination: Ring Group/Extension of Your Choice
6. Set-up an Outbound Route in FreePBX
81DialsPOTS
Route Name: 81DialsPOTS
Dial Patterns:
81|
81|1NXXNXXXXXX
81|NXXNXXXXXX
81|NXXXXXX
81|X11
Trunk Sequence: OBITRUNK1
Note: You can obviously set-up any outbound route you want. This route allows you to force calls to the Obi device by dialing 81. The very first line will allow you to get a dial-tone if you dial 81 by itself. If you don't want that ability, delete line that reads: 81|
If you want to make the dialing code something else, just change 81 wherever it appears to whatever you want it to be (i.e., 081).
Emergency
Route Name: EMERGENCY
Dial Patterns:
911
Trunk Sequence: OBITRUNK1
Note: This route forces emergeny calls, i.e. 911 calls, to go out over the Obi 110.