| sip.conf settings for Asterisk 1.8 複製代碼[general]
; Global Settings
bindport = 5060                                        ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0                                        ; Bind all addresses on machine
realm = asterisk
useragent = myuseragent 
;sdpsession = myuseragent
allowguest = yes                                        ; Allow or reject guest calls ; set allowguest  =  no for security reason                         
allowsubscribe = yes 
canreinvite = no
insecure = port,invite
srvlookup = yes
;qualifyfreq = 60 
;qualifygap = 100 
;qualifypeers = 1 
callevents = no 
;allowexternalinvites = yes
allowexternaldomains = yes
alwaysauthreject = yes                        
allowoverlap = no                                        ; Disable overlap dialing support (Default is yes)                      
allowtransfer = yes                                        ; Disable all transfers                        
videosupport = no
callcounter = yes 
t38pt_udptl = yes,fec,maxdatagram = 400 
faxdetect = yes 
; Network QoS Settings
tos_sip = CS3                                        ; Sets TOS for SIP packets                     
tos_audio = ef                                        ; Sets TOS for RTP audio packets.                              
tos_video = AF41                                        ; Sets TOS for RTP video packets                                 
cos_sip = 3 
cos_audio = 5 
cos_video = 4 
cos_text = 3 
jbenable = no
jbforce = no
; Network Settings
externrefresh = 10
externhost = your_ddns_name                                ; DDNS 
fromdomain = your_ddns_name                        ; Optional - force a particular domain         
localnet = xxx.xxx.xxx.xxx/255.255.255.0                        ; Asterisk network address and mask            
stunaddr = 
autodomain = no
; Global Signaling Settings
disallow = all
allow = ulaw
allow = alaw
allow = gsm                                                ; GSM needs low bandwidth than ulaw and alaw
allow = g729
allow = slin
faxdetect = on 
rtptimeout = 60
rtpholdtimeout = 300
rtpkeepalive = 20                                               ; Send a keepalive ever 20 Seconds if using NAT
maxexpiry = 3600                                        ; **Engin & BBP Global this if necessary
minexpiry = 60                                        
defaultexpiry = 240                                        ; **Engin users: include users: include this if necessary
registerattempts = 0
registertimeout = 20
relaxdtmf = yes 
notifyringing = yes 
notifyhold = yes 
notifycid = yes 
pedantic = no 
progressinband = never
promiscredir = no
; Default Settings
nat = yes
dtmfmode = rfc2833 
qualify = yes
context = default                                        ; Send unknown SIP incoming callers to this context
language = en
musicclass = default
mohinterpret = default 
mohsuggest = default
[authentication]
[my-settings](!)                                        ; template for the phones
type = friend                                        ; is both peer (out) and user (in)
qualify = yes
nat = yes
host = dynamic
dtmfmode = auto 
allow = ulaw,alaw,gsm,g729,slin
context = yourcontextname
canreinvite = no                                        ; set "canreinvite = yes" for all internal extensions. This will let RTP directly flow from Line 1 or other ATA to PSTN without going through Asterisk, thus to minimize the delay
insecure = port,invite
port = 5060
;musiconhold = default
;musciclass = default
;deny=0.0.0.0/0.0.0.0 
;permit=xxx.xxx.xxx/255.255.255.0 
[6001](my-settings)
defaultuser = 6001
secret = very_secret_code
mailbox = 6001@default
vmsecret = 6001
dial = SIP/6001                                                        
callerid = "who_is_who" <>
;accountcode =         
;callgroup = 1,3-4                                        ; members of groups 1,3 to 4
;pickupgroup = 1,2-4                                        ; member of "pickup" groups 1,2 to 4
call-limit = 10
musiconhold = default
musciclass = default
[6002](phone-settings)
defaultuser = 6002
secret = very_secret_code
mailbox = 6002@default
vmsecret = 6002
dial = SIP/6002
callerid = "who_am_i" <>
;accountcode =                         
;callgroup = 1,3-4                                        ; members of groups 1,3 to 4        
;pickupgroup = 1,2-4                                        ; member of "pickup" groups 1,2 to 4
call-limit = 10
musiconhold = friends
musciclass = friends
 |