[asterisk-users] IAX2 order

Danny Nicholas danny at debsinc.com
Fri Sep 18 14:57:51 CDT 2009


Pardon my ignorance, but couldn't you set up this provider as a "Static
peer" so he would always be first in the hash?

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Kevin P.
Fleming
Sent: Friday, September 18, 2009 2:30 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] IAX2 order

David A. Bandel wrote:

> I've been fighting with this seems like forever now and can't make it
> work in 1.6.x.  In 1.4.x, I could make sure a particular voip provider
> was always first in the list by making him as an #include and putting
> it last.
> 
> Now in 1.6.x I can never get this to take.  I really don't want to run
> TWO asterisk servers just for some IAX trunking.
> 
> Real problem:  my voip provider doesn't send username authentication,
> just their secret.  If they are either the first or the only, then all
> works because * checks just the first iax2 entry in the "show iax2
> peers" list.  If they are anything but first, all my incoming calls
> from them fail (identification failure).
> 
> Is there ANY way to make them first?  In 1.6.x they are always 3rd.

Unfortunately the answer is no; in Asterisk 1.6.x chan_iax2 stores
users/peers in a hash table, which as you have determined means they are
not stored in any particularly obvious order... and even if you did
determine the order, it could change in the future if the hash table
definition is changed.

Your provider really needs to use a proper authentication mechanism, or
you need to restrict that peer/user entry to their IP address(es) if
possible.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming at digium.com
Check us out at www.digium.com & www.asterisk.org

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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




More information about the asterisk-users mailing list