[Asterisk-Dev] Patch to support an "outgoing proxy" on SIP register

Olle E. Johansson oej at edvina.net
Sun Aug 29 23:34:31 MST 2004


Dietmar Zlabinger wrote:

> Hi,
> 
> the sip-channel-module of asterisk supports sending register requests
> to a host different from the realm used in the SIP-message:
> 
> "register => user[:secret[:authuser]]@host[:port][/extension]"
> 
> But when I tried this syntax I failed to register at my SIP provider,
> so I traced the messages sent out and found that "host" is used
> in the SIP-uri (and not "REGISTER sip:authuser SIP/2.0") and that "user at authuser"
> is used when authenticating (and not
> "Authorization: Digest username="user", realm="authuser""),
> therefore I modified the chan_sip.c so that I could register successfully,
> I believe that the modifications I did are required to register using an
> "outgoing proxy".
> 
> Please give me feedback if you believe that my modifications are of
> general interest and if they should be included into the asterisk code.

Though your patch might solve the immediate problem you have, it's not
a beautiful patch. The @host part above is really @domain and should be
looked up in DNS SRV records to find a host if no port number is provided.
If a port number is provided, it should be treated as a host name and
looked up for a DNS A record.

Outbound proxy should not be confused with the domain part. Outbound proxy
should propably be configured in the matching [user] entry for this
service.

I have working support for outbound proxies in chan_sip2. However, this support
only supports one outbound proxy for all hosts outside the localnet, like when
you are using an Intertex IX66 or SIProxd as a SIP outbound proxy in a firewall solution.
I have to add support for configuring outbound proxies on a [user] based level, like when
you want to use Broadvoice or FreeWorldDialup's outbound proxies for their services.

/Olle



More information about the asterisk-dev mailing list