News:

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

Main Menu

Trying to use OBI202 as a Proxy to GV from Freeswitch

Started by ubergoober, June 06, 2018, 08:24:18 PM

Previous topic - Next topic

ubergoober

I'm attempting to adapt the instructions for letting an IP phone proxy thru the OBi202 device to make outgoing calls via Google Voice.  Unsuccessfully. 

I've seen other instructions for freepbx and the two variations for the 100/110 devices.

Here's how I'm configured:

OBi202 in Bridge Mode, connected to router via the LAN port.

ITSP Profile D/General -> Signaling Protocol: SIP

ITSP Profile D/SIP -> ProxyServer: IP Address of FreeSwitch Server
ITSP Profile D/SIP -> ProxyServerPort: 5080
ITSP Profile D/SIP -> Registrar Server: blank
ITSP Profile D/SIP -> OutboundProxyPort: 5080

Voice Services/SP4 -> X-ServProvProfile: D
Voice Services/SP4 -> X_InboundCallRoute: {17935>(Msp1):sp1}
Voice Services/SP4 -> X_RegistrarEnalbe: blank
Voice Services/SP4 -> X_UserAgentPort: 5080
Voice Services/SP4 -> X_Proxy: checked
Voice Services/SP4 -> AuthUserName: 17935
Voice Services/SP4 -> AuthPassword: matches Freeswitch Gateway Password
Voice Services/SP4 -> URI: 17935@IP Address of Freeswitch Server

My gateway does register, but only after putting the number of the obi device@pnn.obihai.com in the realm field of my freeswitch gateway.

When I offer a call to the OBI, SNGREP shows an invite, 401 unauthorized, ack, invite (sdp), 100 trying and finishes up with 486 Busy Here.

RTP shows it's attempting PCMU/8000, so I don't expect a codec issue. 

Wondering what else is required for the OBI to want to route this call via SPi.

I'm sure somebody smarter than me must have done this before.  Thanks in advance of any help.

Tom

restamp

I've got several OBis serving as ITSPs for FreePBX Asterisk servers, and am in the process of documenting what I've done, but it's going to take a few days since I'm tied up with other things at the moment.  I'm not familiar with FreeSwitch, but a couple comments:

I presume your FreeSwitch is external to your local LAN and that it has a static IP address.   OTOH, the OBi is behind a NAT on the LAN, right?  Here's the catch:  If the OBis external IP is a dynamic one, which is most likely the case, *it* has to register with server and not the (more traditional) other way around.

Why do you need a URI?

That said, it looks like you've got the two talking and SIP almost working.  I presume SP1 is GV and SP4 is SIP.  What's with the {17935>(Msp1):sp1}?  Just for grins, what happens if you just set X_InboundCallRoute to simply {sp1}, uncheck X_Proxy, and get rid of the URI?  If that works, set the GV X_InboundCallRoute to {sp4(17935)} (or whatever number you have assigned to your GV trunk) and see if you can call in.

I hope to get my notes to the point where I can put them online by next week.  They are based on Asterisk, but if you haven't gotten things up and running by then, they may help give you some ideas.

Good luck.

ubergoober

Restamp.  Good advice.  Your suggests have resulted in a successful call. 

The Freeswitch server is in the same network here at home behind the firewall.  The URI is something I tried based on a confluence page on the freeswitch website referencing obi1x0 devices.  It turns out to be a red herring.  I'll report back to this thread if my experience is in any way unreliable.

Thank you!
Tom

ubergoober

I spoke too soon.  The phone selected a line I had not expected.  My calls fail with a 480 temporarily unavailable.

restamp

If your freeswitch and OBi are on the same LAN, there is really no need for Registration and/or Authentication. Hard code the IPs and rely on them for authentication, it's really much simpler.  Give the OBi a static IP and follow the instructions here:

https://www.dslreports.com/forum/r31954649-

(Also check X_SpoofCallerID in the SIP ITSP Profile.)

This is the stuff I'm cleaning up to document, but this worked for me as is.  I have no idea how to translate the Peer Details to FreeSwitch-speak, but you probably do.  Also make sure the Freeswitch offers ulaw (and opus, too, if it has it).

Good luck.

ubergoober

I have it working now.  Registered or not, I was still getting the 486 busy.  I took your advice on setting the inbound call route on SP4 to {sp}.

What was really missing was in the google voice portion on SP1. It's inbound call route field needed the addition of {sp4(authusername@freeswitchIPADDRESS):sp}, before the pre-existing contents, which were {ph1,ph2}.  This part I took from the obihai 20x admin guide page 118.

I plan on writing up my configuration and posting it on the fusionpbx forums, on the Freeswitch confluence pages and I'll reply back to this thread with a link to those pages.

Thanks for contributing, Restamp.

Tom


ubergoober

Although I'm able to place a call outbound, I'm getting mixed results depending on how long it takes for the far end to answer the call.  For instance, if I call a voicemail system at work that picks up on the first ring, I receive a 200 OK from the OBI and all is well.

However, if I call my own work extension that takes five rings before it forwards to voicemail, I exceed 30 or 32 seconds and the OBI returns a 503, at which time Freeswitch presents me with fast busy tone.

I have combed through as many settings as I can stand, so I e-mailed OBI support.  Not bothering to explain why, they blame it on Google Voice. 

When I call the same number with one of the handsets connected to the OBI phone ports, there is no timeout behavior at 30-32 seconds.  The phone continues to ring and is answered by voicemail.  It's only when I use a SIP client that I encounter the 503 which is sent by the OBI.  My reasoning is there's something about the proxy function that times out at 30-32 seconds, but whether or not there's a setting to control it or what that setting is called, I cannot tell.

So, I replied asking them to re-examine their answer.  Maybe it won't change, but I always mistrust quick no answers when I have no means of gauging the knowledge level of the first responder.

Also, the way I think about this is that Asterisk users appear to be successful using the OBI as a proxy. Why would it not work with Freeswitch?  Admittedly the settings differ.

What do you think?



azrobert

The SIP protocol has several timers. The only one I'm familiar with is TimerB, but I don't think it applies to your problem. I'm sure there is documentation on the Web for these timers or you can just increase all the timers that are set to 32 seconds.

The timers on the OBi are found here:
Service Providers -> ITSP Profile x SIP

ubergoober

Time permitting, I'm investigating the timers.  

Obihai support is so wonderful and helpful.  They completely ignored my e-mail, and when I resubmitted my request to them via their web form, they maintained that very high level of responsiveness that I as a paid support customer have come to expect.

Can I get my $10 back?  Seriously, Obihai.  At least tell me you've checked your facts and stand by your answer rather than ignoring a paying customer.  It might keep me from nagging a Polycom product manager I know.

ubergoober

I've investigated the SIP timers using this article:

https://andrewjprokop.wordpress.com/2013/07/02/understanding-sip-timers-part-i/

I know Andrew.  He's a pretty smart guy and his articles on SIP are worth reading.  Unfortunately, having gained some insight and getting very excited, I'm finding that changing the timers on the SIP profile B doesn't have any effect.  The obi still generates the 503 response, ending the call attempt.


statman

I am experiencing this exact same issue at 24 seconds and have yet to find a resolution.  Was anyone able to resolve this?  Consistently, after 24 seconds Asterisk receives a SIP 503 back from my OBI200.

ubergoober

No, I have not solved it.  I have little time to go after it for now, but I will be back.  Don't expect ANY help from OBI support on this.  They are worthless.  For instance, when I had difficulty with the time of day on my obi1062 being wrong, they tried to tell me it was because I was plugged into a POE switch.  When I pushed back, their "Solution" was to initiate a warranty replacement.  I did a factory reset on the phone, which fixed the problem.  I got the same type of helplessness from them when I made inquiries about this topic.  Again, worthless.

keouchao

Having the same problem, and found a solution from Robert Stampfli (link https://cboh.org/voip/obi/OBi_As_ITSP.html ).

You need to enable X_EarlyICEEnablein from Obi web interface ITSP Provile -> General ->. following is from Robert's write up.

.. to enable X_EarlyICEEnableIn, and without this feature being enabled unanswered outbound calls will generate an error 503 after approximately 22 seconds of unanswered ringing,..


ubergoober


ubergoober