[asterisk-dev] SIP Address port remove suggestion

Brian Candler B.Candler at pobox.com
Tue Oct 17 05:47:42 MST 2006


On Tue, Oct 17, 2006 at 11:13:48AM +0100, Alexandre Almeida wrote:
> [xxyy]
> username=123456
> type=peer
> secret=1423241
> port=5070
> outboundproxy=my.proxy.com
> host=gateway.server.com
> 
> 
> when dialing a number like this 00123456789:
> 
> asterisk make this,
> 
> SIP:+1234567890 at gateway.server.com:5070
> 
> but what i need is,
> 
> SIP:+1234567890 at gateway.server.com
> 
> asterisk put the port on the SIP address, any idea on how to remove the
> port from the sip address..

Hmm, depends what do you mean when you write "port=5070". You might want:

(1) The INVITE to be sent to my.proxy.com port 5070, and the INVITE to
    be for sip:+123 at gateway.server.com (implied: the proxy should use DNS
    to resolve the domain to IP and port, and default to UDP port 5060)

(2) The INVITE to be sent to my.proxy.com port 5060, and the INVITE to
    be for sip+123 at gateway.server.com:5070

I'm not sure what Asterisk actually does in this case. But it would seem
reasonable to want to be able to set outboundproxy host address and port
independently of the target SIP URI domain and port.

Perhaps if ast_get_ip_or_srv() were able to parse x.x.x.x:p (i.e. IP and
port), then you could write outboundproxy=my.proxy.com:5070 - but I don't
think you can do that today.

Regards,

Brian.


More information about the asterisk-dev mailing list