Why would you use anything other than what's in the sip.conf file?
You can now configure (though I have not tried it myself) usernames
with "@" symbols in them. I am having a lot of difficulty parsing
your question. Just give people usernames of
"username@domain-name.com" then and map them to some meta-extension,
and set it up that way in sip.conf, like this:
[1234]
type=friend
username=jtodd@somewhere.com
secret=jtoddspassword
host=dynamic
>Can asterisk act as a SIP registrar or location server?
>I would like to be able for a user agent(client) to register with
>whatever client they are using as "username@domain-name.com".
Rather
>than the entry/username/password that is setup in the sip.conf file.
>That way a user could log into any SIP enable client and their calls
>would follow them around.
>I have read the sip.conf man pages and have noticed the following
>commented lines in sip.conf:
>
>;
>;register => 1234@mysipprovider.com ; Register with a SIP provider
>;register => 2345@mysipprovider.com/1234 ; Register 2345 at sip provider
>as 1234 here.
This is for registering to remote servers for calls inbound to Asterisk.
To explain: I have an account on my company's SIP proxy/gateway
system at work. They gave me a username of "jtodd@bigcompany.com"
and password of "deadrabbit". I want to use Asterisk to route my
calls from Bigcompany's SIP server into one of my SIP phones. I
have created an extension in context "from-sip" called 2203 which
takes inbound calls and routes them to my SIP phone.
So, in sip.conf I put the following config in the [general] context:
[general]
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0 ; Address to bind to
context = from-sip ; Default for incoming calls
register=jtodd@bigcompany.com:deadrabbit@sipserver.bigcompany.com/2203
; here is the definition for my ATA-186 SIP phone
; (note: this config is abbreviated; does not include outbound config
for ATA-186)
[2203]
type=friend
username=2203
secret=passwordforata186
host=dynamic
canreinvite=no
Now, in extensions.conf I put something like this:
[from-sip]
exten => 2203,1,Dial(SIP/2203)
That's it! When I fire up Asterisk, it sends a REGISTER to
sipserver.bigcompany.com and notifies that server that my Asterisk
server is accepting calls for my account. Then, when calls come in
from that account. Then, when calls come in from that account,
Asterisk points them at extension 2203, which in turn dials my
ATA-186.
For a more exhaustive example, see http://www.loligo.com/asterisk/
JT
>
>But I am a little confused how this should be implemented.
>
>--
>Steve Woolley
>ADS Telecom, Inc.
>59 Skyline Drive #1250
>Lake Mary, FL 32746
>Phone: (407) 682-6226 x1110
>Fax: (407) 682-3455
>swoolley@adstelecom.com
>
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users@lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users