>>>>> "Randy" == Randy Bush <[EMAIL PROTECTED]> writes:
Randy> how does a call to sip://[EMAIL PROTECTED] come in to asterisk so i Randy> can route it?
I beleive it comes in to extension user in the default context:
[default] exten => user,1,whatever...
You'll need to look in the variable ${SIPDOMAIN} to differentiate eg [EMAIL PROTECTED] from [EMAIL PROTECTED]
-JimC
This is correct, but perhaps not enough information to get started.
The important part is that if you're expecting SIP users on the "wild Internet" to be sending in SIP requests to your host, then you need to funnel them in from whatever context is specified in the [general] section of sip.conf. At the moment, let's not care about the my.dom part of the URI, and we'll assume that we're just matching against the "user" portion of the URI. If you want to match on domain, you'll need to get clever with the ${SIPDOMAIN} variable and GotoIf's, but that's for the truly masochistic. Example of a simple config:
[general] srvlookup = yes disallow=all allow=ulaw allow=alaw allow=g729 allow=gsm allow=ilbc port = 5060 ; Port to bind to bindaddr = 0.0.0.0 ; Address to bind to context = from-sip ; Default for incoming calls ; etc. etc.
Now, in extensions.conf:
[from-sip]
;
; let's assume [EMAIL PROTECTED] maps to a phone
; which is known as "1234" somewhere in sip.conf
;
exten => billy,1,Dial(SIP/1234)
;
; same for jane, but she's at phone 2229
;
exten => jane,1,Dial(SIP/2229)
;
; let's add some aliases for Jane, which simply loop
; back into the same context, but with a new ${EXTEN}
; of the "canonical" name for jane.
;
exten => jane.smith,1,Goto(from-sip,jane,1)
exten => janesmith,1,Goto(from-sip,jane,1)
;
; endNow, if you were using SRV records you could map things inbound to your domain (my.dom) to actually point to your Asterisk server (asterisk.my.dom) so long as the remote side respects SRV records. Furthermore, your ENUM entries (if you have them somewhere) could point to your SIP URI ([EMAIL PROTECTED]) For what should be a working example, see [EMAIL PROTECTED] (dig @ns.fox-den.com SRV _sip._udp.loligo.com)
JT
_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
