[asterisk-users] Sip exten matching based on contact: sip header?

Grey Man greymanvoip at gmail.com
Tue Mar 25 00:21:59 CDT 2008


>On Tue, Mar 25, 2008 at 4:04 AM, Mike Fedyk <mike at reachme.com> wrote:
>
>  It seems that the sip channel matching is based only on source IP address
>  instead of also checking the contact: header as mentioned in the O'Reilly
>  book.
>
>  According to Asterisk 2nd edition it says about insecure "... If you set
>  insecure=invite, you'll determine which peer to match on by comparing the IP
>  address or hostname and port number to those provided in the contact field
>  of the SIP header with the host and port options in sip.conf.  If a match is
>  found, authentication will not be required on the initial INVITE, and the
>  call will be allowed."

Hi Mike,

I've never heard of Asterisk authenticating based on the Contact
header. The Contact header set by client side user agents will often
contain a private IP address and it's also possible it could contain a
hostname so authenticating based on it would be a tricky proposition.

My understanding of using insecure=invite was that ONLY the host and
port would be used for matching the INVITE requests to an Asterisk SIP
account entry rather than the username and secret. You could also use
insecure=port to specify that the port, username and secret would all
be ignored and only the host used when matching.

Regards,

Greyman.



More information about the asterisk-users mailing list