Hi!

> Using INVITE request as basis request -
> [email protected] Found peer client _202' <---
> Which is incorrect, it should be client_201. 
>
> The IP and port for client_201 and client _202 are the same.

In short: Asterisk matches by IP address and assigns the INIVTE to the last 
entry in sip.conf 
with that IP.


In more detail: When Asterisk receives an incoming SIP call, the SIP Channel 
Module

    * first tries to find a [user] section matching the caller name (From: 
username),
    * then tries to find a [peer] section matching the caller's IP address.
    * If no matching user or peer is found, the call is sent to the context 
defined in the [general] 
section of sip.conf. 

Source: http://www.voip-info.org/wiki/view/Asterisk+SIP+channels


"As of Asterisk 1.2, there is no reason to actually use 'user' entries
any more at all; you can use 'type=peer' for everything and the behavior
will be much more consistent.

All configuration options supported under 'type=user' are also
supported under 'type=peer'.

The difference between friend and peer is the same as defining _both_ a
user and peer, since that is what 'type=friend' does internally.

The only benefit of type=user is when you _want_ to match on username
regardless of IP the calls originate from. If the peer is registering to
you, you don't need it. If they are on a fixed IP, you don't need it.
'type=peer' is _never_ matched on username for incoming calls, only
matched on IP address/port number (unless you use insecure=port or higher)." 

Source: http://www.voip-info.org/wiki/view/Asterisk+SIP+user+vs+peer


Philipp


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to