[VoIP] It's a Username, not a Context
John R. Covert
john_reads_cnet_via_archives at covert.org
Sun Jan 27 20:10:31 CST 2008
The "Activate an Office Code" page still calls the IAX2 user Username
entry "Inbound Context". Greg, would you please change this to
"Inbound Username" as soon as possible?
I just got a call from Jeff Kauffman. Incoming calls to him were
failing. I did the following debug steps.
1. Check his ENUM entry:
$ host -tany 9.2.7.3.2.8.7.1.std.ckts.info
9.2.7.3.2.8.7.1.std.ckts.info has NAPTR record 100 10 "u" "E2U+IAX2"
"!^\\+*(.*)$!iax2:inbound at spock71.homeip.net/\\1!" .
2. Dial a call to him:
-- Executing Dial("SIP/localsjphone-0182ee00",
"IAX2/inbound at spock71.homeip.net/17823729|120") in new stack
-- Called inbound at spock71.homeip.net/17823729
Jan 27 20:56:57 WARNING[157]: chan_iax2.c:7170 socket_read:
Call rejected by 24.0.186.135: No authority found
Aha! No authority found!
I had him look in IAX2 for a section with the incoming username of
"inbound". But he had
[from-cnet]
context=inbound
We changed that to
[inbound]
context=inbound
And things immediately worked.
So, it's time again to review the components of an IAX url.
IAX2/[username[:password]@]host[:port][/extension[@context]]
In its simplest form, if you dial
IAX2/foo.mumble.com/s
This will place a call with no username or password to the "s" extension
in the default context for the LAST username with no secret listed in
iax.conf.
Note that you may list multiple usernames with no secret. It's the last
one that gets matched with you don't specify a username on the outgoing
call. The reason it's the last is that the last will be first and the
first will be last in the list of iax2 users that you get is you type
iax2 show users, and the first is the one that's matched when both the
username and password are omitted, as they are in "IAX2/foo.mumble.com/s".
Calls to Jeff were going to IAX2/inbound at spock71.homeip.net/17823729
They were looking for a username of "inbound" with no secret. But
he had a username of "from-cnet" pointing to a context of "inbound".
In iax.conf, users are specified with the username in the square
brackets. You then specify which context or contexts those users
are allowed to call with one or more context=xxxx lines.
When you call IAX2/inbound at spock71.homeip.net/17823729, you've
said that you are the USER "inbound" and you want to place a call
to the extension 17823729 in the default context for the user
"inbound". In Jeff's iax.conf, now that it has been corrected,
the default context for the user "inbound" is now "inbound".
That will send the call to the context [inbound] in extensions.conf.
We could theoretically call IAX2/someuser at some.thing.com/1234 at acontext.
"someuser" is a username, and "acontext" is a context.
For this to work, there would have to be a user in iax.conf that looks
something like this:
[someuser]
context=thedefault
context=acontext
In iax.conf (but not sip.conf) you can specify more than one context
for a user. The first one is taken if there is not an explicitly
given context on the dial command. If there is one given, as in
the example above, it must have been allowed for that user.
/john
More information about the VoIP
mailing list