[Asterisk-Users] Remote SIP client HACK JOB

Ryan Courtnage ryan at voxbox.ca
Wed Jun 30 09:31:48 MST 2004


I couldn't be happier with the simplicity of this - but it's a hack!

Hi all, 

I'm currently using a SIP client (BT101) to connect via DSL to a remote 
instance of Asterisk.

- Asterisk has a private IP behind my OFFICE router. 
- The SIP client has a private IP behind my HOME router.

I'm doing this _without_ the use of STUN or proxy servers.

Here's how it works:

- Asterisk's firewall forwards 5060 udp and 10000-20000 udp to *
- The SIP client's firewall forwards 5060 udp and 10000-20000 udp to the SIP 
client
- sip.conf contains NAT=YES for this particular client
- The SIP client has no special settings, just the external IP of Asterisk's 
firewall for the SIP Server.

I couldn't be happier with the simplicity of this ... however, here is the 
HACK JOB I need to perform to get the external SIP client's audio to work:

When I first start up Asterisk, I need the following In SIP.CONF's [genera] 
section:
 - bindaddr = 0.0.0.0

This allows all my internal office phones to work, and also allows me to dial 
to/from my external client.  However, the external client will hear/send no 
audio.

To allow the external client to hear/send audio, I have to change sip.conf ...
 - bindaddr = <EXTERNAL IP>
... followed by issuing a "RELOAD" at the * CLI.

It's a total hack, cause if I try to START/RESTART Asterisk with 
"bindaddr=<EXTERNAL IP>", neither the internal or external clients will work, 
and I'll just see a bunch of this on the console:

Jun 30 15:51:28 WARNING[-1275102288]: chan_sip.c:590 __sip_xmit: sip_xmit of 
0x80f680c (len 465) to 66.18.203.117 returned -1: Bad file descriptor


My question is ... "Is there a better way to do this, without the use of STUN 
or proxy servers?"

Thanks
-- 
..................................
Ryan Courtnage
Coalescent Systems Inc
403.244.8089
www.voxbox.ca



More information about the asterisk-users mailing list