[asterisk-dev] Outboundproxy Settings

Aaron Clauson aaron.clauson at blueface.ie
Sat Sep 2 14:06:47 MST 2006


Hi All,

I've been using a SIP Proxy with Asterisk (1.2.10 and realtime) for a while
and it's possible I've missed a setting somewhere but I have not been able
to determine how it's possible to get the outboundproxy settings to work
with Dial(SIP/${EXTEN}@user) commands.

The problem is when you use Dial comands in the form Dial(SIP/${EXTEN}@user)
there does not seem to be a way to get the request to go through a proxy
with the correct URI.

As an example if an Asterisk SIP account exists with settings of:

Host = 192.168.10.1
Port = 5061
OutboundProxy = 192.168.11.1
OutboundProxyPort = 5060
FullContact = sip:user at 192.168.10.1:5061

The SIP channel code seems to parse out the OutboundProxyPort but then never
uses it which I think is the core of the problem (again I could have missed
something)

Dial(SIP/user) would generate INVITE sip:user at 192.168.10.1:5061 and send it
to 192.168.11.1:5061 (<outboundproxy>:<port>)

Dial(SIP/${EXTEN}@user) would generate INVITE sip:${EXTEN}@192.168.10.1 and
send it to 192.168.11.1:5061 (<outboundproxy>:<port>)

If Asterisk used the outboundproxyport then that would fix this particular
problem.

Another potential issue is the fact that the SIP URI's are generated in
different ways. For example if the FullContact field had a parameter or was
a hostname then the Dial(SIP/${EXTEN}@user) would generate an incorrect URI.
Would it be better to just replace the user portion of the FullContact field
when Dial(SIP/${EXTEN}@user) is used rather then generate the SIP URI from
the Host field?

An example:
Host = 192.168.10.1
FullContact = sip:user at sip.somewhere.com;sendme=quick

Dial(SIP/user) would generate INVITE sip:user at sip.somewhere.com;sendme=quick
Dial(SIP/${EXTEN}@user) would generate INVITE sip:${EXTEN}@192.168.10.1 

Possibly it would be better if:
Dial(SIP/${EXTEN}@user) would generate INVITE
sip:${EXTEN}@sip.somewhere.com;sendme=quick

Regards,

Aaron




More information about the asterisk-dev mailing list