[asterisk-users] Configuring Asterisk behind a SIP Proxy

Brad Johnson bjohnson at ecessa.com
Thu Jun 18 09:21:12 CDT 2009


We are trying to configure Asterisk (version 1.6.1.0) with some SIP 
phones behind a SIP Proxy/NAT device. The phones register properly to 
Asterisk, and to get Asterisk to register properly to the external SIP 
registrar we added this to the general section of sip.conf (the address 
of the Asterisk system on the LAN is 192.168.30.5):

outboundproxy=192.168.30.10
register => myname:mysecret at my.provider.com/100

The problem we are facing is that it appears that the outboundproxy 
value is being treated globally by Asterisk so it sends all SIP traffic, 
including traffic to the phones, to the proxy. The behavior we want is 
that all outbound traffic is sent to the proxy, but inbound SIP traffic 
to the phones should be sent direct to the phones.
The result we see is that an inbound Invite is received by Asterisk and 
then the Invite for the phone is sent by Asterisk to the outbound proxy. 
This causes much confusion.
Can anyone please tell me how to configure Asterisk properly for working 
behind a SIP Proxy?
Below you will find our configuration.

Thanks,
Brad

Here is the channel for our SIP provider:

[my_provider]
type=peer
host=my.provider.com
username=100-phone
secret=mysecret
context=incoming
canreinvite=no
qualify=300
insecure=port,invite

Here is a sample phone entry in sip.conf:

[100_phone]
type=friend
username=100-phone
secret=100secret
host=dynamic
context=internal

Here is the relevant part of extensions.conf:

[incoming]
exten => 100,1,Dial(SIP/100_phone,30)
exten => 100,n,Hangup()

[internal]
exten => _X.,1,Dial(SIP/my_provider/${EXTEN})






More information about the asterisk-users mailing list