[Asterisk-Users] asterisk knows best? softphones

Eric "Skippy" Hope ehope at intrex.net
Fri Jul 29 13:27:06 MST 2005


Hi all,

I'm trying to set up a vpn so we can access our asterisk server from the 
outside.  We're using OpenVPN and the vpn portion seems to work 
beautifully.  The problem come in when trying to use a sip softphone 
over the vpn.  The softphones are able to register and the sip session 
works fine for dialing in and out until the call is established.  Then 
-- no sound.

Looking at packet traces, what seems to be happening is that the 
softphones are dealing with the sip invites over private ips of the vpn, 
but when they send the sip 200 to accept the call, they are directing 
the voice traffic to their _public_ ip.  Needless to say, this doesn't work.

The packets look like (with ips replaced to protect the innocent little 
machines):
-------------------
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 
public.asterisk.ip.addr:5060;branch=z9hG4bK26157414;rport;received=priv.asterisk.ip.addr
From: "Tech" <sip:100 at public.asterisk.ip.addr>;tag=as353ed737
To: <sip:143 at priv.client.ip.addr:5060>;tag=3772325084
Contact: <sip:143 at priv.client.ip.addr:5060>
Call-ID: 34b745fa12f29b542360765253aaa037 at public.asterisk.ip.addr
CSeq: 102 INVITE
Content-Type: application/sdp
Server: X-Lite release 1103m
Content-Length: 294

v=0
o=143 8264473 8266947 IN IP4 public.client.ip.addr
s=X-Lite
c=IN IP4 public.client.ip.addr
t=0 0
m=audio 8000 RTP/AVP 0 8 3 98 97 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
-----------------------------

The problem seems to stem from the "c=IN IP4 public.client.ip.addr" line 
and/or the "o=143 8264473 8266947 IN IP4 public.client.ip.addr" line.  
We've tried a bunch of things including messing with the nat settings in 
asterisk and with using a stund server.

Its happening with 2 different clients, Firefly and Xlite.

Is there any way to have asterisk ignore what the client is telling it 
in this case?

Eric



More information about the asterisk-users mailing list