[Asterisk-Users] SIP REGISTER behavior change: specific domains possible in
REGISTER
John Todd
jtodd at loligo.com
Sun Jun 15 16:49:49 MST 2003
Mark has fixed the REGISTER issues to be more RFC compliant. I've
created a new thread so that those of you who got bored with the old
thread might read this new one. The feature that has just been added
was added a while ago, but now it actually seems to _work_. :-)
If you have a SIP server to which you are trying to REGISTER, and
they demand valid domain (the part after the "@" in your username)
but the IP address of the remote server is not recognized as a valid
domain, here's what ya do:
In sip.conf:
register => user at remotesipdomain:password at x.x.x.x:port/y
Where:
user = username of the account you have on the remote server. This
can be a number, or it can be a name - it depends on what that SIP
server is expecting.
@remotesipdomain = the SIP domain of the account you have on the
remote server. Often, this is just the domain name of the service
you're using. It is possible that they don't care what you have in
this area, and you can skip it entirely - many services are
configured this way. If left out, Asterisk will use the IP address
of the SIP server to which it is sending the request.
password = the password for the account "user at remotesipdomain.com"
x.x.x.x = IP address OR hostname of the remote SIP server
port = port that the remote SIP server is accepting connections
(default is 5060; you almost never need to set this)
y = the local extension that is configured in your dialplan such
that when the call is passed to extensions.conf into the correct
context (specified earlier in your sip.conf) then the dial match will
start with this extension. This item is optional, and if left out
will use the "user" parameter for matching (I think...)
So, a few examples:
register => 3992 at dumbserver.blah.com
This registers user 3992 with dumbserver.blah.com, with no password,
and inbound calls from dumbserver.blah.com on extension 3992 will go
to extensions.conf and try to match 3992 as the "dialed extension".
The SIP system on dumbserver.blah.com doesn't care that you're
sending in registrations for 3992 at 10.93.22.4 (the IP address to which
dumbserver.blah.com resolves.)
register => 1234*111:9cE8woxP at weeble.wobble.com/1234111
This registers user "1234*111" (yes, that's a legal username) on
server weeble.wooble.com, and sends password 9cE8woxP. When calls
come in for user 1234*111 from weeble.wobble.com, they are sent to
extensions.conf with 12341111 (since it's a pain to match with that
"*" symbol in there, we re-write the extension)
register => gbush at whitehouse.gov:monkeypox at sip.gsa.gov/666
This is a more complex example that uses the new functionality, where
the server sip.gsa.gov only wants to see inbound registrations from
strictly-defined user/domain pairs, and it will not accept
"user at sip.gsa.gov" as a valid registration (or, perhaps there are
multiple domains on this SIP server, and gbush at sip.gsa.gov is someone
else entirely, so we have to specify the domain precisely.) We use
"gbush at whitehouse.gov" and password "monkeypox" and then any call
inbound from sip.gsa.gov to user "gbush" will be sent to extension
666 in extensions.conf
JT
>markster at digium.com (Mark Spencer) writes:
>
>[snip]
> > > 3. I have another SIP account (sip:912345678 at domain.es) which I
>would like
>> > to use within asterisk both for dialing out and for receiving calls.
>> >
>> > I see that sip.conf has a line
>> >
>> > register => 912345678 at domain.es/1234
>> >
>> > where 1234 is the local asterisk extension. From chan_sip.c, line 1390 I
>> > see that I can use the form:
>> >
>> > register => user[:secret[:authuser]]@host[:port][/localextension]
>> >
>> > However my registrar requires that I authenticate with domain.es, but use
>> > a sip proxy at ip 1.2.3.4, the two are unrelated and domain.es has no ip
>> > address. How can I get Asterisk to register with the remote prxoy?
>>
>> You do:
>>
>> register => 912345678:<password>:domain.es at 1.2.3.4/1234
>
>ok. thanks I'll try that tomorrow.
>
>Thanks again.
>
>Simon
More information about the asterisk-users
mailing list