[asterisk-users] SIP: IP in the VIA-Header

Lukas Barth tinloaf at goerresonline.de
Sat Feb 2 15:09:57 CST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have these settings in my sip.conf:

[general]
nat=yes
canreinvite=no
externip = tinloaf.dyndns.org
localnet=192.168.0.0/255.255.0.0

(if you need the complete sip.conf i can put in on some webserver)

Now I use my asterisk on a NATed box with the IP 192.168.1.100 as an
outbound proxy for a SIP-Softphone in the same network (running on
192.168.1.3). Asterisk relays all SIP messages, but I would expect it to
include my public IP (tinloaf.dyndns.org) in the VIA-headers.

This is how outgoing packets look like (The lines starting with U or #
are from ngrep):

=============================================

U 2008/02/02 22:05:48.730998 192.168.1.100:5060 -> 69.90.155.70:5060
INVITE sip:613 at fwd.pulver.com SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bK79892063;rport.
From: "Lukas Barth" <sip:tinloaf at 192.168.1.100>;tag=as2c94d5ce.
To: <sip:613 at fwd.pulver.com>.
Contact: <sip:tinloaf at 192.168.1.100:5060>.
Call-ID: 5a92984b42fb0b9e5930b5a0100f0efa at 192.168.1.100.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Date: Sat, 02 Feb 2008 21:05:48 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Content-Type: application/sdp.
Content-Length: 264.
.
v=0.
o=root 16173 16173 IN IP4 192.168.1.100.
s=session.
c=IN IP4 192.168.1.100.
t=0 0.
m=audio 9120 RTP/AVP 3 0 8 101.
a=rtpmap:3 GSM/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.

#
U 2008/02/02 22:05:48.912033 69.90.155.70:5060 -> 192.168.1.100:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP
192.168.1.100:5060;branch=z9hG4bK79892063;rport=5060;received=90.134.116.93.
From: "Lukas Barth" <sip:tinloaf at 192.168.1.100>;tag=as2c94d5ce.
To: <sip:613 at fwd.pulver.com>.
Call-ID: 5a92984b42fb0b9e5930b5a0100f0efa at 192.168.1.100.
CSeq: 102 INVITE.
Content-Length: 0.
.


===============================================

Now how can i tell asterisk to put my public IP (in this case
90.134.116.93) into the VIA-field?

Kind regards,

Lukas Barth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHpNwjgsbFi6ZpoGERAgK1AJ0YJ9cb16QET3lQF+pzfTyELLQOyACdG0rj
IvrqJqaGOVtVNT5ZAt4WgW8=
=KYTQ
-----END PGP SIGNATURE-----



More information about the asterisk-users mailing list