| 一些簡單例子 
 一個dialplan 控制3個skype channels dial out
 透過peer connection進行2 stages dialling複製代碼[CallingRule_Skype]; This serve 3 skype trunks _01 _02 & _03  for outgoing to other skype accounts
exten => _80[123].,1,NoOp
exten => _80[123].,n,Dial(SIP/stsTrunk_0${EXTEN:2:1}/${EXTEN:3})
exten => _80[123].,n,Macro(stsdialresult)
exten => _80[123].,n,Playback(pls-try-call-later)
透過template 方面,簡化起trunks 或users 程序。注意"!" = template 意思複製代碼[CallingRule_2hk2b]
exten => _852XXXXXXXX,1,Set(GLOBAL(hkno)=00${EXTEN}) ; 改變user input and save to a global variable
exten => _852XXXXXXXX,n,Dial(SIP/6207,2,M(senddigits)tr) ; 用 macro 進行2 stages dialling, passing DTMF signal of the global variable
[macro-senddigits]
exten => s,1,Wait(2)  ; wait 1 second
exten => s,n,SendDTMF(${hkno})  ; send the number
複製代碼[sip2sip](!)
type = peer
username = userid
fromuser = userid
secret = password
canreinvite = no
insecure = no
disallow = all
allow = gsm
allow = ulaw
allow = alaw
qualify = yes
nat = yes
domain = sip2sip.info
fromdomain = sip2sip.info
outboundproxy = proxy.sipthor.net
context = from-sip2sip
[sip2sip-0](sip2sip)
host = sip2sip.info
[sip2sip-1](sip2sip)
host = 81.23.228.129
[sip2sip-2](sip2sip)
host = 81.23.228.150
[sip2sip-3](sip2sip)
host = 85.17.186.7
 |