News:

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

Main Menu

OBI100 SIP URI call problem

Started by DavidNewton01, April 26, 2013, 11:44:52 PM

Previous topic - Next topic

DavidNewton01

I use an OBI100 as a regular ATA to register two sip servers. I have been using SIP URI call directly to the OBI100 for some time from sip devices or from CallCentric DID without problem. But recently, the SIP URI call does not work anymore. In "Call Status" page, the SP1 state shows as "unknown" while Phone state shows as "Connected" after the phone is picked up with one-way audio (incoming ok, no outgoing audio), if the call is from Callcentric or other sip devices. But if the call is from an asterisk server, then the call is ok (Both SP1 and Phone states show as "connected" in the call status page). There is no problem for this OBI100 to have calls from its registered SIP servers. I have forwarded the sip port and the rtp port range to this ATA in the DD-wrt router. Anyone has idea about this problem? Thanks in advance.

DavidNewton01

Since nobody replied this topic yet, I would like to make my question simpler: what could cause this situation: in the call status page in OBI100, while the Phone State shows "Connected", the SP1 State shows "Unknown"? Hope someone here can have some idea. Thanks.

hwittenb

Quote from: DavidNewton01 on April 27, 2013, 08:01:39 PM
Since nobody replied this topic yet, I would like to make my question simpler: what could cause this situation: in the call status page in OBI100, while the Phone State shows "Connected", the SP1 State shows "Unknown"?
To answer your question, incomplete sip signalling.  I assume you are trying to forward the call to a direct ip sip uri on the OBi.  The OBi is sloppy when it comes to direct ip calling.

I tried forwarding a CallCentric DID to my OBi110 using direct ip sip uri.  I call the DID number.  The OBi phone rings.  I answer.  If you look at Call Status on the OBi it shows the Phone State connected and it shows the SP2 State as unknown.  There is no audio.

A wireshark trace shows the incoming Sip INVITE and the OBi responding with a Sip 200 OK when the call is answered.  The OBi sends repeated Sip 200 OK requests but the OBi does not receive the necessary an ACK response from CallCentric.  In this case there is no audio because the rtp voice stream is not started.  Looking at the Sip 200 OK message sent to CallCentric, the Contact: field in the message header contains my local network ip address instead of the external ip address.  I believe that is the problem, CallCentric trying to send the ACK to a local network address.

If I change SP2 so that it is registered to the voip provider setup under SP2, and the ITSP Profile setting X_DiscoverPublicAddress is checked (the default) then the OBi puts the external ip address in the Contact: field in the Sip 200 OK message and it all works as it should.  It needs both of the settings I mentioned.

In your case you had one-way audio so it is not identical to this case.  The problem, though, is probably similiar.  Could be a miscommunication of the rtp port to send the rtp stream. 

DavidNewton01

Quote from: hwittenb on April 27, 2013, 09:42:13 PM

I tried forwarding a CallCentric DID to my OBi110 using direct ip sip uri.  I call the DID number.  The OBi phone rings.  I answer.  If you look at Call Status on the OBi it shows the Phone State connected and it shows the SP2 State as unknown.  There is no audio.

If I change SP2 so that it is registered to the voip provider setup under SP2, and the ITSP Profile setting X_DiscoverPublicAddress is checked (the default) then the OBi puts the external ip address in the Contact: field in the Sip 200 OK message and it all works as it should.  It needs both of the settings I mentioned.


Thanks a lot for this important information. Your problem is basically the same as mine. The strange thing is that this setup worked very well before, and then suddenly stopped working. For my case, SP1 is registered to an local asterisk server using local IP. X_discoverPublicAddress is the default (checked). Probably the local register server IP address caused the problem. 

hwittenb

To get a better idea of what is happening you should run the syslog on your OBi.  With that you can look at the sip signalling.  OBihai has instructions on how to do that and a syslog download link here:
http://www.obitalk.com/forum/index.php?action=printpage;topic=707.0

DavidNewton01

Quote from: hwittenb on April 28, 2013, 07:09:24 AM
To get a better idea of what is happening you should run the syslog on your OBi.  With that you can look at the sip signalling.  OBihai has instructions on how to do that and a syslog download link here:
http://www.obitalk.com/forum/index.php?action=printpage;topic=707.0

Thanks a lot. I will follow your suggestion to get the call log. BTW, I found that if I change the SP1 register server and proxy server from my local server to any external server, then the SIP URI call can go through. I am not sure if this a bug or it is supposed to be. From the help for URI box below AuthUserName and AuthPassword, it seems that the domain is related to proxy server.

hwittenb

Quote from: DavidNewton01 on April 30, 2013, 07:04:47 AM

BTW, I found that if I change the SP1 register server and proxy server from my local server to any external server, then the SIP URI call can go through. I am not sure if this a bug or it is supposed to be.

You found one of the undocumented secrets.

DavidNewton01

#7
Quote from: hwittenb on April 30, 2013, 07:38:18 AM

You found one of the undocumented secrets.

Probably not many people use local proxy/registar server, so this problem does not have impact. But I still believe this is a bug. It seems that the URI box under the AuthPassword is basically ignored, it doesn't matter what input in this box. I  have tested another OBI100 and have the same result.

BTW, thanks a lot for pointing the right direction for me.

azrobert

#8
Quote from: DavidNewton01 on April 30, 2013, 07:52:47 AM

Probably not many people use local proxy/registar server, so this problem does not have impact.  

Is the local proxy server that is causing your problems an Asterisk server?

I've been testing URI calling to free 800# termination providers and I'm having the same problem.
I'm testing Future9, Denetron, IPKall, Sipbroker and CallWithUs.
My test shows the cause of the problem is Asterisk whether local or remote.
I have the same problem when SPx is register to a local PBX in a Flash or PBXes.org.
The exception to the problem is CallWithUs ALWAYS works.

I found this fixes the problem:
Services Providers -> ITSP Profile A/B -> SIP
X_DiscoverPublicAddress: Unchecked
X_PublicIPAddress: xx.xx.xx.xx:5061      (xx.xx.xx.xx = your external modem address)

hwittenb,

I found that when the 800# provider is defined directly on the SPx trunk it works.

Concerning OBi to OBi uri calling. When the called OBi is registered to an Asterisk server the call works with the default X_DiscoverPublicAddress or with a non-Asterisk provider and the following settings:
X_DiscoverPublicAddress: Unchecked
X_PublicIPAddress: 192.168.1.100:5061      (your local OBi address)

It looks like the OBi doesn't know when to use the internal or external addresses.

Can you comment on CallwithUs and the OBi to OBi calling.

Thanks

DavidNewton01

#9
Quote from: azrobert on April 30, 2013, 04:00:29 PM
Is the local proxy server that is causing your problems an Asterisk server?

Thanks a lot for sharing your experience. Yes, the local proxy server my SP1 registered is an asterisk server. But the external server which makes the URI works is also an asterisk server, this is different from your observation. I have tested CallCentric, direct call from a SPA3000, and direct call from LinPhone in Ubuntu without registration. They all behave the same. Same as your test for CallWithUS, The SIP URI call from another asterisk server always work too.

DavidNewton01

To help others who may want to use OBI device to receive SIP URI calls, here I would like to summarize my tests on this issue. I use SP1 as example:

1. SP1 registered to external SIP servers: SIP URI calls do not have problem. Unlike azrobert's experience, the external asterisk server is ok for me. I tried an external asterisk server and Sipsorcery.

2. SP1 registered to a local asterisk server:

    a. With default setting (X_DiscoverPublicAddress: checked), SIP URI calls do not work for CallCentric, SPA3000, Linphone and another OBI device, but are ok if the calls are from another asterisk server.

    b. As azrobert found out, with X_DiscoverPublicAddress unchecked and X_PublicIPAddress filled with external IP address, SIP URI calls work fine. This solution does not work for dynamic external IP.

As workaround for me, I have my SP1 registered to local server and SP2 registered to an external server, and forward the SIP URI calls to SP2 sip port.

As observed by hwittenb and azrobert, the problem is caused by OBI handling external IP wrong. It seems that the main problem is in x_DiscoverPublicAddress which can not detect the right external IP when it is registered to local IP address. Another problem is that the URI box under AuthPassword may not properly programmed. Hopefully OBI can fix these bugs in future firmware.