標題: 【角色茶桌】—— Asterisk 1.8 Workshop 1 :Create two sip accounts and make call to each other (证实可用) [打印本頁] 作者: 角色 時間: 2011-9-24 16:30 標題: 【角色茶桌】—— Asterisk 1.8 Workshop 1 :Create two sip accounts and make call to each other (证实可用)
Why you still can't make it work?作者: 角色 時間: 2011-9-30 07:33
I do not know the reason neither.
bubblestar said he can just use sip.conf to make it work but I cannot. I have to use users.conf otherwise NO extension is registered.
YH作者: bubblestar 時間: 2011-9-30 11:14
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
複製代碼
作者: bubblestar 時間: 2011-9-30 11:21
No particular settings required for extensions.conf. Just config as you do in Asterisk 1.4 or 1.6.
Some terms or names for creation of extension line in the file of sip.conf are different. So, please pay special care for such changes. For instance, user name is changed to defaultuser. Insecure is now set as "port,invite" instead of "very" as that in Asterisk 1.4作者: 角色 時間: 2011-9-30 16:35
After having tried many combinations, finally I got the simplest form in sip.conf in order to get one extension registered as follows:
Bubblestar Ching is particularly in doing various fine settings. I am a pioneer to test.作者: ckleea 時間: 2011-9-30 19:06
I am also in flavour to use IAX connection. Zoiper is my best friend作者: 角色 時間: 2011-9-30 20:36
When I have time, I shall add more switches on it.
YH作者: 角色 時間: 2011-9-30 22:25
There is another example to demonstrate the use of the sip.conf to set up the Asterisk server as follows:
[2000]
type = friend
secret=2000
nat=yes
qualify=yes
host=dynamic
context=internal
[2001]
type = friend
secret=2001
nat=yes
qualify=yes
host=dynamic
context=internal
複製代碼
Please note the parameter "nat", if nat=no, Zoiper is not got registrated; and if nat=yes, Zoiper is got registrated. Siemens DECT IP Phone can register regardless of the settings of the parameter "nat".
Therefore, it is better to set the parameter "nat=yes" would be better.
YH作者: 角色 時間: 2011-9-30 22:48
I know the reason that I am not able to get registration. There is a type for the type, I typed it as typp rather the correct one type.
Once the word "typp" is replaced by "type", everything are working fine.
I personally not set any sip user extensions in sip.conf because from the beginning, I use GUI to set up the users. Then I all along work with the users.conf to add users manually. This may be one of the reasons that I need to use Dial(Local/6000) instead of Dial(SIP/6000) to dial within dialplan.
I will try further.
Please note template function is very useful for creating multiple users of similar capability.作者: bubblestar 時間: 2011-10-1 10:59
Yes, template is very useful indeed. So that why I choose to use it for extension creation.作者: 角色 時間: 2011-10-1 11:05
Workable examples are very an important start for the beginners no matter if they are belong to sip.conf or users.conf.