Foniva Contact Center Software
Asterisk Experts Support

How does asterisk match sip users/peers in sip.conf

After setting up sip users or peers in sip.conf and making calls, you may wonder why asterisk either reject your call or send it to default context.

When asterisk receive new sip session, here is how it tries to see which user or peer in sip.conf the call belongs to:

1. Asterisk checks the SIP From: address username and matches against names of devices with type=user
The name is the text between square brackets [name]
2. Asterisk checks the IP address (and port number) that the INVITE
was sent from and matches against any devices with type=peer

Note that type=friend equals both user and peer.

So, you may want to run “sip set debug on” to see what the other end is sending in the From field.

You would then have to setup the right [name], the right host and defaultip.

Check also insecure field.

;insecure=port                  ; Allow matching of peer by IP address without matching port number
;insecure=invite                ; Do not require authentication of incoming INVITEs
;insecure=port,invite         ; (both)

Our sponsors

Asterisk Experts Support