Look, you don't have to necessarily specify a username when Dial(.....).<br>
It's sufficient ti specify the username in the peer declarations:<br>
<br>
On pbx1:<br>
<br>
[pbx2]<br>
type=friend<br>
username=pbx1 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx2<br>
outkeys=pbx1<br>
.....<br>context=....<br>
<br>
[pbx3]<br>
type=friend<br>
username=pbx1 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx3<br>
outkeys=pbx1<br>
.....<br>
context=....<br>
<br>
On pbx2:<br>
<br>
[pbx1]<br>
type=friend<br>
username=pbx2 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx1<br>
outkeys=pbx2<br>
.....<br>
context=....<br>
<br>
[pbx3]<br>
type=friend<br>
username=pbx2 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx3<br>
outkeys=pbx2<br>
.....<br>
context=....<br>
<br>
On pbx3:<br>
<br>
[pbx1]<br>
type=friend<br>
username=pbx3 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx1<br>
outkeys=pbx3<br>
.....<br>
context=....<br>
<br>
[pbx2]<br>
type=friend<br>
username=pbx3 ; this is user for OUTGOING connections<br>
host=w.x.y.z<br>
inkeys=pbx2<br>
outkeys=pbx3<br>
.....<br>
context=....<br>
<br>
<br>
Simple: 3 boxes, 3 usernames, 3 public/private key couples.<br>
<br>
Hope this helps<br>
<br>
<br><div><span class="gmail_quote">2006/3/25, Douglas Garstang <<a href="mailto:dgarstang@oneeighty.com">dgarstang@oneeighty.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I could ask why it can't authenticate against the key, but we've already been there.<br><br>So,
if I have 5 asterisk systems, and I want to have a different key on
each, and each system has a user and a peer section, and I have to use
different usernames... oh boy... this sounds like a horrible mess.<br><br><br>> -----Original Message-----<br>> From: Joshua Colp [mailto:<a href="mailto:joshnet@nbnet.nb.ca">joshnet@nbnet.nb.ca</a>]<br>> Sent: Saturday, March 25, 2006 12:19 PM
<br>> To: Asterisk Users Mailing List - Non-Commercial Discussion<br>> Subject: RE: [Asterisk-Users] RE: IAX Incoming/Outgoing<br>><br>><br>> It still needs to know the username so it knows what entry in<br>
> iax.conf to use for that information, such as the key to use.<br>><br>> Joshua Colp<br>><br>> ----- Original Message -----<br>> From: Douglas Garstang<br>> [mailto:<a href="mailto:dgarstang@oneeighty.com">
dgarstang@oneeighty.com</a>]<br>> To: Asterisk Users Mailing List -<br>> Non-Commercial Discussion [mailto:<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>]<br>> Sent:<br>> Sat, 25 Mar 2006 15:15:24 -0400
<br>> Subject: RE: [Asterisk-Users] RE: IAX<br>> Incoming/Outgoing<br>><br>><br>> > Why do I need a username at all if I am doing rsa<br>> authentication? Why<br>> > doesn't it match against the key?
<br>> ><br>> > > -----Original Message-----<br>> > > From: Joshua Colp [mailto:<a href="mailto:joshnet@nbnet.nb.ca">joshnet@nbnet.nb.ca</a>]<br>> > > Sent: Saturday, March 25, 2006 12:11 PM
<br>> > > To: Asterisk Users Mailing List - Non-Commercial Discussion<br>> > > Subject: RE: [Asterisk-Users] RE: IAX Incoming/Outgoing<br>> > ><br>> > ><br>> > > You do realize you're not sending along a username so it's
<br>> > > using another method to try to discover the username you're<br>> > > trying to authenticate as on the server side? Apparently not.<br>> > ><br>> > > IAX2/username_to_use@peer_entry_to_use/extension@context
<br>> > ><br>> > > Joshua Colp<br>> > ><br>> > > ----- Original Message -----<br>> > > From: Douglas Garstang<br>> > > [mailto:<a href="mailto:dgarstang@oneeighty.com">
dgarstang@oneeighty.com</a>]<br>> > > To: Asterisk Users Mailing List -<br>> > > Non-Commercial Discussion [mailto:<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>]<br>
> > > Sent:<br>> > > Sat, 25 Mar 2006 14:55:28 -0400<br>> > > Subject: RE: [Asterisk-Users] RE: IAX<br>> > > Incoming/Outgoing<br>> > ><br>> > ><br>> > > > Well, I just tried your approach. I broke them all up into
<br>> > > users/peers. Now<br>> > > > it makes even LESS sense. The pbx1 system is connecting to<br>> > > the pbx2 system,<br>> > > > and according to the iax debug, is sending a username of
<br>> > > 'pbx3_in'. *lol*<br>> > > ><br>> > > > [pbx1_in]<br>> > > > type=user<br>> > > > auth=rsa<br>> > > > inkeys=pbx1<br>> > > > context=global_pbx_transfer
<br>> > > > deny=<a href="http://0.0.0.0">0.0.0.0</a><br>> > > > permit=xxx.187.142.203<br>> > > ><br>> > > > [pbx1_out]<br>> > > > type=peer<br>> > > > auth=rsa
<br>> > > > outkey=pbx1<br>> > > > host=<a href="http://pbx1.ipt.yyy.com">pbx1.ipt.yyy.com</a><br>> > > ><br>> > > > [pbx2_in]<br>> > > > type=user<br>> > > > auth=rsa
<br>> > > > inkeys=pbx2<br>> > > > context=global_pbx_transfer<br>> > > > deny=<a href="http://0.0.0.0">0.0.0.0</a><br>> > > > permit=xxx.187.142.204<br>> > > ><br>
> > > > [pbx2_out]<br>> > > > type=peer<br>> > > > auth=rsa<br>> > > > outkey=pbx1<br>> > > > host=<a href="http://pbx2.ipt.yyy.com">pbx2.ipt.yyy.com</a><br>> > > >
<br>> > > > [pbx3_in]<br>> > > > type=user<br>> > > > auth=rsa<br>> > > > inkeys=pbx3<br>> > > > context=global_pbx_transfer<br>> > > > deny=<a href="http://0.0.0.0">
0.0.0.0</a><br>> > > > permit=xxx.187.142.234<br>> > > ><br>> > > > [pbx3_out]<br>> > > > type=peer<br>> > > > auth=rsa<br>> > > > outkey=pbx1<br>> > > > host=
<a href="http://pbx3.ipt.yyy.com">pbx3.ipt.yyy.com</a><br>> > > ><br>> > > > Here's how I connect:<br>> > > > exten =><br>> > > ><br>> s-CHANUNAVAIL,1,Dial(IAX2/pbx2_out/${ARG1}@global
_pbx_transfer,25,g)<br>> > > ><br>> > > > and here's the IAX debug:<br>> > > > Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX<br>> > > Subclass: NEW<br>> > > >
<br>> > > > Timestamp: 00003ms SCall: 00001 DCall: 00000<br>> > > [xxx.187.142.204:4569]<br>> > > > VERSION : 2<br>> > > > CALLED NUMBER : 2944099<br>> > > > CODEC_PREFS : (ulaw|g729)
<br>> > > > CALLING NUMBER : 2944093<br>> > > > CALLING PRESNTN : 0<br>> > > > CALLING TYPEOFN : 0<br>> > > > CALLING TRANSIT : 0<br>> > > > CALLING NAME : Foo
<br>> > > > LANGUAGE : en<br>> > > > CALLED CONTEXT : global_pbx_transfer<br>> > > > FORMAT : 4<br>> > > > CAPABILITY : 65535<br>> > > > ADSICPE : 2
<br>> > > > DATE TIME : 2006-03-25 11:54:36<br>> > > > hestia*CLI><br>> > > > -- Called pbx2_out/2944099@global_pbx_transfer<br>> > > > Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX
<br>> > > Subclass: ACK<br>> > > ><br>> > > > Timestamp: 00003ms SCall: 00002 DCall: 00001<br>> > > [xxx.187.142.204:4569]<br>> > > > Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX
<br>> > > Subclass:<br>> > > > AUTHREQ<br>> > > > Timestamp: 00005ms SCall: 00002 DCall: 00001<br>> > > [xxx.187.142.204:4569]<br>> > > > AUTHMETHODS : 4<br>
> > > > CHALLENGE : 129428696<br>>
> >
> USERNAME :
pbx3_in
<---- WHAT THE HELL<br>> > > IS THIS DOING<br>> > > > HERE?<br>> > > ><br>> > > ><br>> > > ><br>> > > ><br>> > > > > -----Original Message-----
<br>> > > > > From: Brian Capouch [mailto:<a href="mailto:brianc@palaver.net">brianc@palaver.net</a>]<br>> > > > > Sent: Saturday, March 25, 2006 11:46 AM<br>> > > > > To: Asterisk Users Mailing List - Non-Commercial Discussion
<br>> > > > > Subject: Re: [Asterisk-Users] RE: IAX Incoming/Outgoing<br>> > > > ><br>> > > > ><br>> > > > > Douglas Garstang wrote:<br>> > > > > > This is INSANE! My calling system has this
iax.conf:<br>> > > > > ><br>> > > > ><br>> > > > > Search the archives for mails about separating<br>> > > > > originations/terminations<br>> > > > > by removing all friends and setting up the various
<br>> > > > > interoperating boxes<br>> > > > > in a peer-user arrangement.<br>> > > > ><br>> > > > > I am pretty certain there are archived mails that urge<br>> > > people who use
<br>> > > > > IAX to do that, and indicating that the various possible<br>> > > ambiguities<br>> > > > > with IAX friends is not a Good Thing.<br>> > > > ><br>> > > > > That would seem borne out by your experiences.
<br>> > > > ><br>> > > > > I would also follow the time-honored programming technique of<br>> > > > > removing<br>> > > > > many of your constraints (keys, allow/disallows, etc.) in
<br>> > > order to<br>> > > > > remove as many causes of uncertainty as possible. Then once<br>> > > > > the boxes<br>> > > > > are talking those things can be added back in a controlled
<br>> > > > > manner. To<br>> > > > > my eyes your configurations have an awful lot of<br>> variable factors.<br>> > > > ><br>> > > > > Just where the insanity lies is another issue, which I don't
<br>> > > > > care to get<br>> > > > > into at the present time :-)<br>> > > > ><br>> > > > > B.<br>> > > > > _______________________________________________
<br>> > > > > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> > > > ><br>> > > > > Asterisk-Users mailing list<br>> > > > > To UNSUBSCRIBE or update options visit:
<br>> > > > > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> > > > ><br>> > > > _______________________________________________
<br>> > > > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> > > ><br>> > > > Asterisk-Users mailing list<br>> > > > To UNSUBSCRIBE or update options visit:
<br>> > > > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> > > ><br>> > > _______________________________________________
<br>> > > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> > ><br>> > > Asterisk-Users mailing list<br>> > > To UNSUBSCRIBE or update options visit:
<br>> > > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> > ><br>> > _______________________________________________
<br>> > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>> ><br>> > Asterisk-Users mailing list<br>> > To UNSUBSCRIBE or update options visit:<br>> >
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> ><br>> _______________________________________________<br>> --Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</a> --<br>><br>> Asterisk-Users mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br>><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>