[asterisk-users] SIP trunk between two Asterisk servers [SOLVED]

Philipp von Klitzing klitzing at pool.informatik.rwth-aachen.de
Fri May 14 05:02:05 CDT 2010


Hi!

> Issue solved.
> Looks like all I was missing was one parameter:
> "fromuser="

That's interesting - could be related to this:
http://lists.digium.com/pipermail/asterisk-dev/2006-November/024842.html

You were probably caught be the fact that you are using extension numbers 
also as SIP user names for your phones (here: 3666). This is not a good 
thing to do, better use an alphanumeric username or the phone's MAC 
address etc.

As for your IAX sound quality issue: I have seen that before as well, and 
switched to SIP (as others did). My guess is that it will probably go 
away if you use Asterisk 1.4 on both sides, though.

SIP DEBUG on the receiving Asterisk gives you a hint which peer was found 
if matching is done on the IP address, the text is somethint like "Found 
peer ..." or "Found no matching peer or user for w.x.y.z"


Two quotes from the Wiki to explain things better:
http://www.voip-info.org/wiki/view/Asterisk+SIP+user+vs+peer


"When Asterisk receives an incoming SIP call, the SIP Channel Module

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


"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)."


Philipp




More information about the asterisk-users mailing list