News:

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

Main Menu

Direct IP call: connected but packets not received

Started by Toulousaing, May 25, 2013, 10:05:15 AM

Previous topic - Next topic

Toulousaing

Hi,
hope you're doing well.

I'm trying to make simple direct IP call call from device A (static public IP) to device B (static public IP).

The device A gets connected to device B, but packets sent by A are not received by B. Both devices are running behind a NAT and I redirected all needed ports 5060 to 5063 (UDP+TCP) and 10000 to 20000 (UDP+TCP).

The symptom is that device B rings but when other person picks up, he doesn't hear anything, neither do I. I can see that devices are connected to each other with G711U codec, but packets sent by one party is not received other party (RTP Packet Count: tx=320;rx=0).

My configuration is the same on both ends:
ITSP profile B general > all default
ITSP profile B RTP > LocalPortMin : 10000
ITSP profile B RTP >  LocalPortMax : 20000
ITSP profile B SIP > ProxyServer: 127.0.0.1
SP2 Service > SP2 Service > Enable: checked
SP2 Service > SP2 Service > X_ServProvProfile: B
SP2 Service > SP2 Service > X_CodecProfile: B
SP2 Service > SP2 Service > X_InboundCallRoute: aa
SP2 Service > SP2 Service > X_RegisterEnable: unchecked
SP2 Service > SIP Credentials > AuthUserName: aaaa

And I set in phone digitmap a shortcut to dial sp2(bbbb@bb.bb.bb.bb:5061) where bbbb is the AuthUserName of device B, and bb.bb.bb.bb is the public IP of device B.

Maybe it's due to device A sending to local IP of device B, and vice versa. Here is what I get:
State                connected
Peer Number       bbbb@bb.bb.bb.bb:5061
Peer RTP Address 192.168.0.13:10006
Local RTP Address 192.168.1.11:10000

192.168.0.13 is the local IP of device B, maybe it should be bb.bb.bb.bb?
Could you please help me?

Cheers  :)

RFord

Try setting up a STUN Server (for example, stun.ideasip.com; Port 3478)and also forward the RTP Port range (16600 - 16998) on your Router to your OBi Device.

Toulousaing

Thanks for your answer.
Actually I'd like to avoid any need for third party, direct IP without STUN server should be possible as reported by other users.
Also, I port forwarded from 10000 to 20000, which includes the ranges you mentionned.

Aside from this, I managed to have the correct Peer RTP Address by setting my public adress in
ITSP Profile B SIP > X_PublicIPAddress
But I still have the same issue: no packets received on both ends.

azrobert

You can try 2 methods.

ITSP profile B SIP
X_DiscoverPublicAddress: unchecked
X_PublicIPAddress: aa.aa.aa.aa   (your local public IP addr)

OR

Using your current config.
ITSP profile B SIP
ProxyServer: bb.bb.bb.bb (device b public IP addr)
ProxyServerPort: 5061

Then call:
sp2(bbbb)

RFord

I haven't done this on the OBi ATA, but have done IP dialing using the following recommended settings on a SPA3102.  Not sure how the following would translate to the OBi ATA:

Quote
Here's a more general set of steps to properly set up a PAP2/SPAxxxx type ATA behind a NAT router, that should work under just about any conditions.

Browse to the ATA's advanced, admin level web configuration. Under the SIP tab:

1) Record the port number specified by RTP Port Min.
2) Record the port number specified by RTP Port Max.
3) Set Handle VIA received to yes.
4) Set Handle VIA rport to yes.
5) Set Insert VIA received to yes.
6) Set Insert VIA rport to yes.
7) Set Substitute VIA Addr to yes.
8 )  Set Resp to Src Port to yes.
9) Set STUN Enable to yes.
10) Set STUN Server to your choice for STUN server, eg "stun.voxalot.com".
11) Set Ext RTP Port Min to match the value recorded in step 1). May be omitted depending on router's NAT implementation.

Under the Line 1/2 tab:

12) Set NAT Mapping Enable to yes.
13) Optionally, set NAT Keep Alive Enable to yes. Isn't really necessary with ports forwarded.
14) Make a note of the value of field SIP Port.
15) Set Ext SIP Port to the value from step 14). May be omitted depending on router's NAT implementation.
16) Set Ans Call Without Reg to yes.

In your router's setup:

17) Forward the port number from step 14) for UDP, from your router to the ATA.
18) Forward the range of port numbers defined by the values from steps 1) and 2) for UDP, from your router to the ATA.

Finally, in G5's setup, make sure that the SIP forwarding goes to the same port number as recorded in step 14).

azrobert

OBiTalk uses port 10000.
I don't know if this will cause a conflict with RPT port 10000.

Toulousaing

Quote from: azrobert on May 25, 2013, 11:07:04 AM
You can try 2 methods.

ITSP profile B SIP
X_DiscoverPublicAddress: unchecked
X_PublicIPAddress: aa.aa.aa.aa   (your local public IP addr)

OR

Using your current config.
ITSP profile B SIP
ProxyServer: bb.bb.bb.bb (device b public IP addr)
ProxyServerPort: 5061

Then call:
sp2(bbbb)


Hi azrobert, thanks!

both solutions solve the Peer RTP IP issue, however packets are still lost, i.e. both ends are connected, both are transmitting but none is receiving...
Do you have any clue?

Toulousaing

Quote from: azrobert on May 25, 2013, 11:17:28 AM
OBiTalk uses port 10000.
I don't know if this will cause a conflict with RPT port 10000.

I just tried another range for my Profile B RTP ports: 16000 to 20000
Again no voice on both sides.

Toulousaing

#8
Quote from: RFord on May 25, 2013, 11:07:36 AM
I haven't done this on the OBi ATA, but have done IP dialing using the following recommended settings on a SPA3102.  Not sure how the following would translate to the OBi ATA:

Your list is nice, either I implemented or it's not needed in my case. But steps 3 to 8 are strange:
3) Set Handle VIA received to yes.
4) Set Handle VIA rport to yes.
5) Set Insert VIA received to yes.
6) Set Insert VIA rport to yes.
7) Set Substitute VIA Addr to yes.
8 )  Set Resp to Src Port to yes.

I'll try to figure out what it is and how to do it.
Cheers

azrobert

I'm out of ideas. The OBi sucks when using direct URI calling.

Would you consider using a 3rd party service?

Get an account at SIP2SIP.info.
Register like this.
ITSP B:
Proxy Server: sip2sip.info
X_DnsSrvAutoPrefix: checked

SP2 Service:
AuthUserName: Your sip2sip userid
AuthPassword: PW

Then call: sp2(Sip2SipUID)

I believe you only need one account at SIP2SIP.
Both OBi's would register to and call the same account


Shale


Just a few ideas ...

1. Change the (Voice Services)SPn Service->X_UserAgentPort ports for each SPn  to not be the same port as used on the other end. This one may  be that may be naive or ignorant, but it won't hurt.

2. Connect each OBi to its modem with no router in place. Try again. If success, look to router settings. If you are unable to do that, put each OBi into the DMZ for testing.

hwittenb

Azrobert is right when he says the OBi has problems when using direct URI calling.

You are trying to call between two external ip addresses, correct?

I biggest problem I have seen is the OBi's inconsistency in determining whether to send an external or an internal ip address in the sip signalling.

I just tried a direct ip incoming test call to my OBi110 from IPKall which, of course, has an external ip address.  It had no audio.  The problem was the OBi's response (the sip 200 OK) to the incoming sip INVITE said the contact address was a local network ip address (i.e. 192.168.1.120).  This was in spite of my setup using a STUN server and in spite of my setup with X_DiscoverExternalIPAddress checked.  Direct ip calling has a problem when this happens.

An additional test with STUN disabled did not make any difference.

The problem was I had SP2 setup to not register.  When I changed SP2 to register the OBi responded with its external ip address and the audio started up correctly. Of course if you say SP2 needs to Register, you need to register with some server.  I had SP2 setup to register to a voip provider. 

When I tried setting up the proxy as 127.0.0.1, with Register, and the Register fails, it doesn't work either, and it doesn't work with Register No.  However when I tried setting my external ip address under X_PublicIPAddress in the ITSP profile, as Azrobert suggested, with the proxy as 127.0.0.1 and set not to Register, the incoming direct ip call works because the sip signalling used the external ip address.

Another problem you can encounter is that some routers, as part of their NAT scheme, will change port numbers when communicating with an external ip address.  This will also cause problems if your router is doing this.  Using a STUN server will usually detect and correct this problem.  I would try using a STUN server as suggested.  The OBi doesn't have all the flexible settings that RFord listed for his SPA, but they do the ones they think are necessary.

Toulousaing

#12
Thanks all! But I'll not be at home today, so I can't try anything before tomorrow.

But my main requirement was to avoid any 3rd party, whether STUN or SIP service. Indeed, in a second phase, device B will be located in environment B where the ISP blocks SIP ports and may be tempted to block IP/Ports of STUN servers as well. (Now I'm testing in an environment A where ISP is not blocking anything.)
If this is not possible, do you know another ATA which offers solid direct URI service and works well with dynamic DNS proxy (in the second phase, the device B will have dynamic IP)?
Now the "weak" point of environment B is that I'll be using dyn DNS services, they might try to block their IPs but there are plenty of them. Also I think dyn DNS uses TCP port 80 to send my public IP, so hopefully they won't block TCP port 80  ;)

azrobert

#13
I successfully called my OBi110 with softphone Phonerlite using DYNDNS.
The OBi110 and Phonerlite were on the same LAN, but this should work with two LANs.

I have a Grandstream HT386 ATA. This thing is so old it's not supported anymore.
I got the HT386 to call my OBi110 with the same setup as Phonerlite.

I hope this info will help. At minimum you should be able to do some testing with Phonerlite to see if the ISP will block your call.

I love my two OBi's but as I said in my previous post:
The OBi SUCKS big time when it comes to direct URI calling.

giqcass

Did you port forward 5061?  I like afraid.org for dyn dns. 

This is why. 

QuoteThis hack will let your OBi update Dynamic DNS.  It isn't perfect but it works very well.  It's as simple as calling a url to update the DNS at afraid.org.  I believe it would be a simple task to add this feature to the OBi firmware directly.  So please add this OBiHai.  Pretty please.  Until then here you go.

Set up a Dynamic DNS host at http://freedns.afraid.org/
Go to the Dynamic DNS tab.
Copy the "direct" update url link.
Open your Obi admin page.
Click the System management page.
Click Auto Provisioning.
Under "ITSP Provisioning" Change the following.
Method = Periodically
Interval = This setting must be greater then 400 so not to over use resources.  I use 3667.
ConfigURL = Paste the update link you got from afraid.org

Press Submit at the bottom of the page.  Restart you OBi. 
Long live our new ObiLords!

Toulousaing

Quote from: azrobert on May 26, 2013, 08:59:45 AM
I successfully called my OBi110 with softphone Phonerlite using DYNDNS.
The OBi110 and Phonerlite were on the same LAN, but this should work with two LANs.

I have a Grandstream HT386 ATA. This thing is so old it's not supported anymore.
I got the HT386 to call my OBi110 with the same setup as Phonerlite.

I hope this info will help. At minimum you should be able to do some testing with Phonerlite to see if the ISP will block your call.

I love my two OBi's but as I said in my previous post:
The OBi SUCKS big time when it comes to direct URI calling.


Ok it'd be really a pity because OBi is great and distance-manageable, I don't want to use an outdated ATA unless I really have to. Something close to what OBi offers would be nice (distance-manageable + very configurable).
Concerning the tests, I already have an available OBi110 with auto attendant on the other end, so shouldn't be a problem even if there is no physical person who can answer.
Now my problem is at phase 1: get a working configuration without that annoying ISP
And then I'll go to phase 2: get a working configuration with that ISP (who is blocking IPs/Ports).
Finally, about dynamic DNS, it's not the biggest issue as I can have a computer running on same LAN with dyndns running on it.

Toulousaing

Quote from: giqcass on May 26, 2013, 09:28:10 AM
Did you port forward 5061?  I like afraid.org for dyn dns. 

This is why. 

QuoteThis hack will let your OBi update Dynamic DNS.  It isn't perfect but it works very well.  It's as simple as calling a url to update the DNS at afraid.org.  I believe it would be a simple task to add this feature to the OBi firmware directly.  So please add this OBiHai.  Pretty please.  Until then here you go.

Set up a Dynamic DNS host at http://freedns.afraid.org/
Go to the Dynamic DNS tab.
Copy the "direct" update url link.
Open your Obi admin page.
Click the System management page.
Click Auto Provisioning.
Under "ITSP Provisioning" Change the following.
Method = Periodically
Interval = This setting must be greater then 400 so not to over use resources.  I use 3667.
ConfigURL = Paste the update link you got from afraid.org

Press Submit at the bottom of the page.  Restart you OBi. 

Thanks a lot giqcass, your solution sounds very interesting, I'm eager to test it.
However, I'm now still stuck at phase 1.
And yes I forwarded port 5061, otherwise two devices wouldn't be connected (already experienced ;)).

QBZappy

#17
Quote from: Toulousaing on May 26, 2013, 11:21:17 AM
I already have an available OBi110 with auto attendant on the other end,

I may have missed something, but why don't you just call using the OBiTALK service. You mentioned that you don't want to use any 3rd party services, you may not have realized that the OBiTALK service (3rd party) is already involved. Use it to call the other obi.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

azrobert

#18
Quote from: giqcass on May 26, 2013, 09:28:10 AM
I like afraid.org for dyn dns.  

giqcass,

afraid.org works perfectly!

I was thinking about getting another dynamic DNS service.
Free DYNDNS accounts are now required to log in once a month to stay active. I'm keeping my DYNDNS account until I get tired of signing in.

Currently my router updates my DYNDNS account and my afraid.org account is updated by my OBi110.

Thanks for the info.

Toulousaing

Quote from: QBZappy on May 26, 2013, 02:44:20 PM
Quote from: Toulousaing on May 26, 2013, 11:21:17 AM
I already have an available OBi110 with auto attendant on the other end,

I may have missed something, but why don't you just call using the OBiTALK service. You mentioned that you don't want to use any 3rd party services, you may not have realized that the OBiTALK service (3rd party) is already involved. Use it to call the other obi.

Is OBiTALK already involved in my direct IP call?
As far as I know, answer is no. Could you please explain how OBiTALK is involved?

Why do I need direct IP call?
This would be my backup line if my ISP blocks the OBiTALK service. And this is easy as OBiTALK seems to use always the same IP (54.241.xxx.x) + port (10500) when establishing connection between the 2 ends.