December 13, 2017, 12:48:35 pm *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: 1 [2] 3
  Print  
Author Topic: Using the Obi 110 as an FXO and FXS Port for FreePBX  (Read 1115850 times)
Ad_Hominem
Jr. Member
**
Posts: 33


« Reply #20 on: April 06, 2012, 09:55:40 pm »

I think you may have missed step 2.a. in my instructions.  The FXS port isn't routed to the trunk.  It is routed to an extension in FreePBX.

In fairness to you, step 2.a. used to be just be the first sentence in Step 2.  I've broken down step 2 into a. and b. to clarify that you have to create an extension in your PBX before you set-up the Obi to act as an FXS on it.

I learned about the S# option from Obi support.  I really like being able to dial x11 or 1xxxxxxxxxx and have the call go out immediately, and it increases the wife acceptance factor as well...


Ad_Hominem, your digitmap rocks. I never knew about S functions.

My personal system is a combination of your tutorial and MichiganTelephones. Everything works except for the CDR Sad and flash... Cry

One thing that has confused me for the longest time is how your setup would distinguish between calls from the trunk and calls made via the FXS port without customizing your context? I would think calls made from the FXS port needs to be routed to from-internal and instead of from-trunk.
« Last Edit: April 06, 2012, 09:57:34 pm by Ad_Hominem » Logged
Ad_Hominem
Jr. Member
**
Posts: 33


« Reply #21 on: April 06, 2012, 10:05:52 pm »

It appears that the X_UseRefer option should solve the call transfer issue.  When enabled, the Obi should transfer Call #1 to Call #2.  However, instead, the Obi creates a Call #3 (to the identical destination as Call #2), refers call #1 to Call #3, and then drops call #2.  This is not how SIP Refer should work (at least, it isn't how my Aastra phones do it).

I've reported the bug to Obi.

Michigan- since you're an official beta tester, you might wish to do the same.
Logged
MichiganTelephone
OBi110 Beta Testers
***
Posts: 484


« Reply #22 on: April 09, 2012, 08:03:20 am »

UPDATE:  It seems that the way OBI handles X_UseRefer is a bug.  One of you beta testers should bring it to their attention.  I've sent an email to Obi support to alert them to the issue.

I have also, but for some reason they can't duplicate the behavior on their setup.  That may mean that there is a bug in the way Asterisk handles REFER packets in some cases.  Unfortunately it is far too common for Asterisk to change its behavior in significant ways between versions.  I just got bit by this — I discovered that using my new method the correct caller number was not being shown in the CDR records (it was showing the trunk name instead), even though it was being delivered to the phone.  Turns out that in Asterisk 1.8 and later the number used in the CDR records is apparently CALLERID(ani) rather than CALLERID(num), which is a change from previous versions — and even though someone provided a patch to fix it, the Asterisk folks won't do that because, well, just because.  I had to update my instructions to take this into account.

Unfortunately I am not a SIP expert so I have no way to tell what's really causing the problem here.  As I noted, I do not have the issue when using the Zoiper softphone.  I'm not sure what they are doing differently.  I just wish developers would realize that sometimes you have to yield a bit and not be so pedantic about standards if you want your equipment to work in the real world.  It does no good to say "I'm following the standards properly" if something that you (or your customers) want to connect to is not.  But all that said, absent any evidence to the contrary, I'd be much more inclined to believe the problem is with Asterisk than with the Obihai, since Asterisk commonly breaks things from version to version (one of the reasons I keep hoping that one of the GUI's for FreeSWITCH will actually become usable at some point—I am soooo sick of Asterisk's quirks).

Since these effects are a bit kludgy and unintended, I recommend that you use the new method of allowing the OBI to handle the transfer and increasing the maximum number of channels it can handle at once using the MaxSessions option in the Service Provider configuration.  I've updated my instructions, above, to change this setting to 10, which is an arbitrary number that should meet most people's needs.

Yep, that works, and it's an acceptable solution if your device is on a fast local network and your Asterisk server is on the same network.  It's not such a great solution if the device is at a remote location and they have limited or usage-capped bandwidth.  I only wish Obihai could duplicate this issue on their test server so they could see what you and I are seeing.  EDIT:  They've got the problem mostly resolved in beta firmware — see my second post after this one.
« Last Edit: April 09, 2012, 10:54:58 am by MichiganTelephone » Logged

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.
MichiganTelephone
OBi110 Beta Testers
***
Posts: 484


« Reply #23 on: April 09, 2012, 08:09:54 am »

Ad_Hominem, your digitmap rocks. I never knew about S functions.

My personal system is a combination of your tutorial and MichiganTelephones. Everything works except for the CDR Sad and flash... Cry

See my previous post — your CDR issue is likely the same one that bit me.  The solution is that in the [custom-from-Obihai] context, right after the first line, which should be...
exten => _X!,1,Set(CALLERID(num)=${CUT(EXTEN,/,2)})
...insert this line:
exten => _X!,n,Set(CALLERID(ani)=${CALLERID(num)})

Hopefully that will fix your CDR issue.  It took me THREE HOURS to figure this out, and all because Asterisk changed something in Asterisk 1.8 and refuses to fix it even though a user graciously provided a patch!  So this is really a workaround that should not be necessary, but it does appear to solve the problem.
Logged

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.
MichiganTelephone
OBi110 Beta Testers
***
Posts: 484


« Reply #24 on: April 09, 2012, 10:53:02 am »

UPDATE:  Obihai support IS working on the X_UseRefer issue — they just pushed out a beta firmware for me to test on my OBi202, which appears to fix the problem as long as you don't use *98 to transfer.  In other words, if you flash, dial the number you want to transfer the call to, and when ringing commences you hang up, it works.  If you flash, dial the number you want to transfer the call to, wait for the called party to answer, maybe talk a bit to explain why you are transferring the call, and then hang up, it works.  If you flash, dial the number you want to transfer the call to, wait for the called party to answer, flash again to have a three-way call, and then hang up, the original caller gets transferred to the other party on the three way call but my OBi202 drops out of the conversation.  Smiley  Smiley  Smiley

The only way it does NOT work is if you flash, dial *98 and the number you want to transfer the call to. If you do that, the call disconnects.  My suspicion is that the OBi may be dropping out of the call before Asterisk has a chance to complete the transfer, based on what I've seen on the Asterisk CLI, but I might be wrong about that.  Anyway, I've let Obihai Support know that they have the problem mostly solved, and I suspect they might want to take a stab at fixing the *98 issue, but even if they don't, this is a huge improvement and hopefully it will make its way into the general firmware updates at some point in the near future.  Thanks to Obihai Support for looking into this, and with any luck this will be completely resolved by the time the OBi202's start shipping (which I am told should happen next week).  Of course, I would hope the fix will also be included with the next OBi1x0 firmware release as well.
Logged

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.
Ad_Hominem
Jr. Member
**
Posts: 33


« Reply #25 on: May 15, 2012, 05:47:46 pm »

Note: Obi has released an updated firmware that corrects the X_UseRefer bug.  So, I've added a section encouraging users to update to the latest firmware and I've also added back the instruction to enable X_UseRefer.
Logged
loonsailor
Newbie
*
Posts: 1


« Reply #26 on: September 21, 2012, 04:52:31 pm »

Thanks very much for providing this guide.  I've followed it, but not with complete success.  My obi110 (firmware 1.3.0 build 2721) works fine as an asterisk trunk but only works partially as an extension.  I can call the extension, and it works fine, but I have limited dialing ability from the phone on the obi110 FXS port.  From it, I can dial out using the 1xxxxxxxxxx dial plan, but that's all I can do.  I can't call another asterisk extension (three digits on my system), or use *codes, or use different trunks that I've set up with an asterisk prefix.  Furthermore, when I do dial an outgoing call using 1..., it doesn't show up in my freepbx call log.

I've tried the digitmap suggested here, and the default, but neither allows me to dial another extension.  When I try, I get about a 5 second pause, one single ring, another long pause, then a voice message that the number I just dialed is invalid.  I'm not sure whether that message comes from the obi, or asterisk, or the trunk.

Any ideas?

Thanks, in advance, for any help.
Logged
zapattack
Full Member
***
Posts: 96


« Reply #27 on: October 03, 2012, 04:08:40 pm »

You have just described the exact same failure that my new 110 exhibits when dialing specific numbers
on the PSTN.
6043252011 is a 1000Hz test tone that answers and sends tone immediately in my local switch.
6043252091 is a 2-way test line that answers after about 1 second and sends a brief tone.
Neither line sends Ring Back Tone before connecting using #604325xxxx.

However, if I dial **86043252011 on the 110, I get a pause, 1 ring and then a PSTN time-out recording,
so the 110 has not successfuly connected.
But, if I dial **86043252091 I get a single Obi ring followed by connection to the test line.
Why is the 110 inserting a ring and why does it not connect immediately to either line?
Using updated software with no digit map modifications.
The only difference between the 2 numbers is speed of answer supervision.
****Answer. On the Line Port page there is a Detect Outbound Connect Method. If set to 'Assume connected after a short delay' it introduces the one ring. Detect Polarity Reversal, Detectect Speech, or None have no tone. Also note: on the ObiTalk Dashboard Expert configuration, the Assume option is missing.
« Last Edit: October 03, 2012, 11:42:42 pm by zapattack » Logged
greenhornet
Newbie
*
Posts: 3


« Reply #28 on: March 05, 2013, 12:26:43 pm »

Any Ideas on why my caller ID would not be working on this setup?  I can see caller ID on a phone connected to the phone port as well as on the obi call history portal.  I know it's being passed and OBI is seeing it.  I replaced a dead SPA3000 with the OBI and previously had caller ID working this way.  FreePBX had no problems showing it.  I have tried adjusting the ring delay.  Not that it matters, since i can see the ID on an attached phone.
Logged
greenhornet
Newbie
*
Posts: 3


« Reply #29 on: March 19, 2013, 02:18:10 pm »

No one has any caller ID suggestions?  OBI support referred me to the forums on this problem.  Their words, "Please post your question in our forum.  Other members who has done this can help you in there."
Logged
philc
Newbie
*
Posts: 5


« Reply #30 on: March 27, 2013, 08:55:11 pm »

Any Ideas on why my caller ID would not be working on this setup?  I can see caller ID on a phone connected to the phone port as well as on the obi call history portal.  I know it's being passed and OBI is seeing it.  I replaced a dead SPA3000 with the OBI and previously had caller ID working this way.  FreePBX had no problems showing it.  I have tried adjusting the ring delay.  Not that it matters, since i can see the ID on an attached phone.

I'm assuming you followed the directions for setting this up using the OP's method?  I can say that using his setup I have personally successfully got my Cisco SPA525G phone up and running with full caller ID (name & number).

Have you looked at the FreePBX logs?  I can see Caller ID information for incoming calls clearly laid out in the logs.  You may need to increase the FreePBX verbosity if you don't see enough info.

The challenge with these setups is the number of moving parts; specifically the OBI device, FreePBX, and the phone.  Determining where the failure is occurring is very helpful.  You have at least somewhat ruled out the OBI device.  Next stop is getting your arms around FreePBX operation.

Good luck,

Phil
Logged
philc
Newbie
*
Posts: 5


« Reply #31 on: March 27, 2013, 10:03:28 pm »

As I mentioned in my previous post, I have had great success setting up a Cisco SPA525G phone with an OBI 110 and FreePBX.  I considered the various methods suggested by Michigan Telephone as well, but in the end decided to go with Ad Hominem's approach.  Although I liked the cleanliness of using the Custom Trunk in MT's prescription, my desire to preserve caller ID name information I am receiving from my POTS line was a key requirement.

Once you get the hang of configuring FreePBX the ease and control of using prefixed "codes" (Step 6) really shines.  I even went one step further and added a dial rule ("222" in my case) to allow for tapping into an active POTS line on the OBI device FXO.  This was accomplished by adding another prefix ("87" in my case) to the 222 causing 87222 to be issued to the OBI device.  I then added  "{>(<87222:>):li}" to the X_InboundCallRoute in the SP2 service parameter.  The FreePBX logs were very useful in showing how the numbers get added and stripped along the way.  This is with the added dimension of running FreePBX in VirtualBox on Windows 7 (I used that to great effect when "moving" FreePBX to a different machine.  I didn't even need to change the FreePBX network configuration since the MAC address came along with Virtual Box...same IP address, etc.).

Fwiw, I went one step further and hooked up 2 OBI 110's in this fashion which was simply a repeat of the basic configuration.  As a result, I have 2 POTS lines and 2 GV lines all accessible on my 5 line phone (yes, 1 line is empty).  Pretty sweet I would say.

So all in all a big thank you to Ad Hominem, Michigan Telephone, and others for allowing me to get this to work!  The collective insight provided really made this possible.

I do have one remaining issue that I have not been able to overcome yet.  I cannot get Call Waiting (much less CW ID) to function.  Specifically, I can hear the beep when someone is calling while I'm on the line (no surprise since that is Switch generated), but I can't seem to identify a method to send a hook flash signal through FreePBX to OBI.  There doesn't even appear to be a button the Cisco phone for this purpose.  Any ideas on how I might solve this would be appreciated.

Thanks,

Phil
Logged
zapattack
Full Member
***
Posts: 96


« Reply #32 on: April 01, 2013, 10:54:54 pm »

SPA525 will probably present a Soft Key to transfer to second call.
Check the screen.
Logged
Mattak
Newbie
*
Posts: 1


« Reply #33 on: April 11, 2013, 06:57:49 am »

Thank you so much for this guide! It is exactly what I wanted to use the Obi 110 for!

I'm having a few other issues though. I wonder if you guys can help?

1: It seems like there is a small issue with the Obi hanging up a call through PSTN.

If I make a call into the Obi from my mobile it rings and I can answer through where ever I have routed the call through asterisk. If I then hang up the call locally the call goes silent on the mobile but it still shows as connected. If I then try to dial out locally I just get connected to the same call and I hear asterisk trying to dial numbers in my mobile.

The strange thing is that on the Obi110 web page, after hanging up locally, the line port status shows as "On Hook" and call status shows 0 active calls.

It seems like the Obi110 or asterisk is failing to tell the PSTN that the call has ended and I would be relying on the incoming caller to hangup to end the call.

Any ideas?


2: I am unsure which settings to fiddle with to change the timings. Currently it takes 3 rings on my mobile before anything shows up in asterisk and a local phone starts ringing. It also seems to take a long time (around 9 seconds) to actually dial out from an analogue phone connected to the Obi110 to asterisk then back out the Obi110 to the PSTN.


3: I am in London in the UK and was wondering if anyone knows if there is a page that shows all the local tone settings and other defaults that are specific for the UK.


Thanks in advance! Keep up the great work!

Mattak

Logged
jaabello1
Newbie
*
Posts: 1


« Reply #34 on: March 06, 2014, 06:16:18 pm »

Hi,

I have set up the OBI110 according to this explanation and it worked, but I want to know if i can use the OBI110 POTS to forward a call from an asterisk extension to an external number.

I mean, I route the inbound call from the PSTN line to asterisk, there, an IVR answers the phone, and if the extension doesn't answer, I want to forward the call to an external number, but using the OBI110 as the trunk.

Is it possible?

I'm getting this error "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34"

thanks
Logged
drgeoff
Hero Member & Beta Tester
*****
Posts: 2713


« Reply #35 on: March 08, 2014, 03:35:35 pm »

1.  If you mean an incoming PSTN call (on the OBi110 LINE port) being forwarded to an external number going out on the same OBi110 LINE port, then no that isn't possible.  A PSTN line doesn't support that, nor does the OBi110.

2.  If you mean an incoming PSTN  call (on the OBi110 LINEport) being forwarded to an external number going out via the OBi110 to an ITSP or the OBiTALK network, then yes that should be possible in principle (but maybe not with the described configuration?).  But is there a good reason for not going out directly from Asterisk to the ITSP?
« Last Edit: March 08, 2014, 03:48:33 pm by drgeoff » Logged
ptsnandgv
Newbie
*
Posts: 5


« Reply #36 on: March 11, 2014, 04:54:03 pm »

I'm having this issue from above:

2: I am unsure which settings to fiddle with to change the timings. Currently it takes 3 rings on my mobile before anything shows up in asterisk and a local phone starts ringing. It also seems to take a long time (around 9 seconds) to actually dial out from an analogue phone connected to the Obi110 to asterisk then back out the Obi110 to the PSTN.


I can see the Call 'connect' on the mobile, the timer starts, I still hear extra rings, these rings are now being routed to FreePBX.

If I navigate to OBI while I am calling from mole, I can see it register on the OBI..it seems like the OBI is waiting for CID information before it processes the call into the PBX (or putting it into the 'second' line)...
Logged
Ad_Hominem
Jr. Member
**
Posts: 33


« Reply #37 on: August 15, 2014, 10:24:01 pm »

Sorry it took me so long to reply to this message.  Obi is apparently not notifying me of updates to this thread.

Q1:  The behavior you describe is a normal feature of an analog telephone line when handling an incoming call.  If you receive an incoming telephone call on an analog phone line (from anywhere) and you then hang-up, it takes between 10 and 15 seconds before the phone company will disconnect the call.  If the caller hangs-up, the call will disconnect almost immediately.  This delay does NOT apply if you place a call from an analog line to someone else.  It only occurs on incoming calls.

This same problem would occur if you hooked up a standard telephone to your phone line, received a call, and then hung-up.  If you pick up 5-10 seconds later, the call will still be there.  That's just the way analog phone lines work.

Q2:  I suspect you don't have Caller ID on your phone line.  If that's the case, you need to modify the settings per the instructions to shorten the delay period where the system waits for CallerID.  Change RingDelay=3500 to RingDelay=0.  If that doesn't work, try 1, or 100..

Q3:  For the Obi, I don't.  For Asterisk, that's in indications.conf.  The tones you hear are generated in many different places, depending upon whether the call has answered. 

Thank you so much for this guide! It is exactly what I wanted to use the Obi 110 for!


I'm having a few other issues though. I wonder if you guys can help?

1: It seems like there is a small issue with the Obi hanging up a call through PSTN.

If I make a call into the Obi from my mobile it rings and I can answer through where ever I have routed the call through asterisk. If I then hang up the call locally the call goes silent on the mobile but it still shows as connected. If I then try to dial out locally I just get connected to the same call and I hear asterisk trying to dial numbers in my mobile.

The strange thing is that on the Obi110 web page, after hanging up locally, the line port status shows as "On Hook" and call status shows 0 active calls.

It seems like the Obi110 or asterisk is failing to tell the PSTN that the call has ended and I would be relying on the incoming caller to hangup to end the call.

Any ideas?


2: I am unsure which settings to fiddle with to change the timings. Currently it takes 3 rings on my mobile before anything shows up in asterisk and a local phone starts ringing. It also seems to take a long time (around 9 seconds) to actually dial out from an analogue phone connected to the Obi110 to asterisk then back out the Obi110 to the PSTN.


3: I am in London in the UK and was wondering if anyone knows if there is a page that shows all the local tone settings and other defaults that are specific for the UK.


Thanks in advance! Keep up the great work!

Mattak


« Last Edit: August 15, 2014, 10:27:30 pm by Ad_Hominem » Logged
Ad_Hominem
Jr. Member
**
Posts: 33


« Reply #38 on: August 15, 2014, 10:36:17 pm »

Asterisk and FreePBX don't have any support for handling call waiting on analog phone lines.

I do have one remaining issue that I have not been able to overcome yet.  I cannot get Call Waiting (much less CW ID) to function.  Specifically, I can hear the beep when someone is calling while I'm on the line (no surprise since that is Switch generated), but I can't seem to identify a method to send a hook flash signal through FreePBX to OBI.  There doesn't even appear to be a button the Cisco phone for this purpose.  Any ideas on how I might solve this would be appreciated.

Thanks,

Phil
Logged
David_s5
Newbie
*
Posts: 3


« Reply #39 on: September 18, 2014, 12:41:01 pm »

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
 ...

I just wanted to thank you for this post! There are so many overly complicated setup descriptions out on the web. Some ones that I have found are labyrinths!  The author is referring the reader form on post to another instead of just listing the clear cut steps as you have done herein BRAVO!

THANK YOU AGAIN!
Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC