Re: Via in register header contains WAN IP and not local interface IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just a quick follow up to this. I have been unable to make a pjsua configuration that produces the desired effect. Notably, asterisk is able to do it with the following configuration:

[general]
register => ((user))@((proxy-domain)):((secret)):((user))@((outbound-proxy-domain))
[client]
type=peer
username=((user))
secret=((secret))
fromdomain=((proxy-domain))
canreinvite=no
insecure=invite,port
quality=yes
nat=yes
context=from-client
host=((outbound-proxy-domain))
This generates the correct header which I need:

Reliably Transmitting (no NAT) to ((outbound-proxy-ip)):5060:
REGISTER sip:((proxy-domain)) SIP/2.0
Via: SIP/2.0/UDP ((local-interface-ip)):5060;branch=z9hG4bK6ea9d1ca
Max-Forwards: 70
From: <sip:((user))@((proxy-domain))>;tag=as26ad95e6
To: <sip:((user))@((proxy-domain))>
Call-ID: 2bef742a59f080a91d1aa1fa593a1f0b@127.0.0.1
CSeq: 146 REGISTER
Supported: replaces, timer
User-Agent: Asterisk PBX 13.14.1~dfsg-2+deb9u3
Authorization: Digest username="((user))", realm="((proxy-domain))", algorithm=MD5, uri="sip:((proxy-domain))", nonce="1016ec87561750af9a62cb626313dbaf", response="de5a39e2cb0e1a32308a4f7ffb574225"
Expires: 120
Contact: <sip:s@((local-interface-ip)):5060>
Content-Length: 0
I'm not sure how to reproduce the config with pjsua, so I guess for now I'll just use asterisk as a proxy between the two.

Michael A. Leonetti
As warm as green tea

On 9/19/19 4:06 PM, Michael A. Leonetti wrote:
I've integrated pjsua2 into my program and I'm trying to connect to a PBX. It sends the REGISTER header, and I'm told by the company that they are seeing my register but the packets are not coming back. Here is the register modified to obfuscate the addresses. This REGISTER is timing out.

2019-09-19, 15:51:27.505544: <debug> [PJSIP]   pjsua_core.c TX 545 bytes Request msg REGISTER/cseq=4309 (tdta0x71404c24) to UDP ((outbound-proxy-ip)):5060:
REGISTER sip:((proxy-domain)) SIP/2.0
Via: SIP/2.0/UDP ((wan-ip)):5060;rport;branch=z9hG4bKPjBzK6Ie4Q2vvcFjA.lUMbYHQ.jRlTr9Ho
Route: <sip:((outbound-proxy-domain));lr>
Max-Forwards: 70
From: <sip:((user))@((proxy-domain))>;tag=nbpEpzQOTSAM0Qt15CPaHxLELuBLUIXw
To: <sip:((user))@((proxy-domain))>
Call-ID: NEYeaj0jMAMf8E9AhfynG23bvLK7HqBt
CSeq: 4309 REGISTER
Contact: <sip:((user))@((local-interface-ip)):56080;ob>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length:  0
I was told that the register header is correct EXCEPT the Via contains the WAN IP instead of the local interface IP. If the Via contained the local interface IP instead of the WAN IP it would would.

Can I force Via to use the local interface IP instead or am I missing a bigger picture here?

Thanks.


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux