Jump to content

PBX sends SIP INVITE to private IP (192.168....)


Recommended Posts

Posted

I have a user with a yealink T20P. He can make outgoing calls but he never receives incoming calls. If you call his DID you get a long silence. So I took a SIP trace and I see this:

U 2017/06/06 13:33:48.390550 <PBX_IP>:5060 -> 192.168.1.40:5060
INVITE sip:707@192.168.1.40 SIP/2.0.
Via: SIP/2.0/UDP <PBX_IP>:5060;branch=...
From: "Nick Demou" <sip:XXXXX@XXXXXX>;tag=...
To: "XXXXX " <sip:+3XXXXX@XXXX>.

Note at the 1st line that PBX is sending the INVITE to the private IP of the user (192.168.1.40). Here's a REGISTER from the phone:

U 2017/06/06 13:11:07.564288 87.203.195.160:3092 -> <PBX_IP>:5060
REGISTER sip:DOMAIN:5060 SIP/2.0.
Via: SIP/2.0/UDP 87.203.195.160:3092;branch=z9hG4bK1624166643.
From: "XXXX" <sip:707@DOMAIN>;tag=3302671109.
To: "XXXX" <sip:707@DOMAIN>.
Call-ID: 3133434105@192.168.1.40.
CSeq: 12 REGISTER.
Contact: <sip:707@192.168.1.40>.
Authorization: Digest username="707", realm="DOMAIN", nonce="eb2cd5a3be226b436a84e3c7c35ea1f8", ur
i="sip:DOMAIN:5060", response="715336ac4195b8d694e73c12978c42a3", algorithm=MD5.
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, M
ESSAGE.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.73.193.50.
Expires: 3600.
Allow-Events: talk,hold,conference,refer,check-sync.
Content-Length: 0.

The work around I found is to switch the SIP Phone to use TCP instead of UDP. I'm posting this however because I find it a very strange behaviour. Why would the PBX ignore the public IP that it receives the REGISTER from and use an RFC1918 private IP? Is there any setting I could set to tell the PBX that it should never try to route traffic to private IPs (e.g. a list of private networks that are reachable)?

Posted

IMHO you should use TCP or better TLS anyway. UDP was a mistake in the SIP RFC for registered devices.

 

If you should still want to use UDP make sure than you automatically provision the phones. That will make sure that you don't set any "STUN" server which causes a lot of confusion and problems like these. If is still a problem, you somehow tricked the SBC. Take a look at the REGISTER message and what IP address the PBX has "seen" (Rx) for that packet. It should be the public IP address of the phone. If there is is the private IP address there is a major problem in the IP routing level.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...