返回列表 發帖
建議:

將一些簡單實用 code posted, 如bubblestar 兄的 blacklist code, 角色兄的 IVR

夜D,我會一個 dialcode to人 submit DTMF automatically in 2 stages dialling

TOP

一些簡單例子

一個dialplan 控制3個skype channels dial out
  1. [CallingRule_Skype]; This serve 3 skype trunks _01 _02 & _03  for outgoing to other skype accounts
  2. exten => _80[123].,1,NoOp
  3. exten => _80[123].,n,Dial(SIP/stsTrunk_0${EXTEN:2:1}/${EXTEN:3})
  4. exten => _80[123].,n,Macro(stsdialresult)
  5. exten => _80[123].,n,Playback(pls-try-call-later)
複製代碼
透過peer connection進行2 stages dialling
  1. [CallingRule_2hk2b]
  2. exten => _852XXXXXXXX,1,Set(GLOBAL(hkno)=00${EXTEN}) ; 改變user input and save to a global variable
  3. exten => _852XXXXXXXX,n,Dial(SIP/6207,2,M(senddigits)tr) ; 用 macro 進行2 stages dialling, passing DTMF signal of the global variable

  4. [macro-senddigits]
  5. exten => s,1,Wait(2)  ; wait 1 second
  6. exten => s,n,SendDTMF(${hkno})  ; send the number
複製代碼
透過template 方面,簡化起trunks 或users 程序。注意"!" = template 意思
  1. [sip2sip](!)
  2. type = peer
  3. username = userid
  4. fromuser = userid
  5. secret = password
  6. canreinvite = no
  7. insecure = no
  8. disallow = all
  9. allow = gsm
  10. allow = ulaw
  11. allow = alaw
  12. qualify = yes
  13. nat = yes
  14. domain = sip2sip.info
  15. fromdomain = sip2sip.info
  16. outboundproxy = proxy.sipthor.net
  17. context = from-sip2sip

  18. [sip2sip-0](sip2sip)
  19. host = sip2sip.info

  20. [sip2sip-1](sip2sip)
  21. host = 81.23.228.129

  22. [sip2sip-2](sip2sip)
  23. host = 81.23.228.150

  24. [sip2sip-3](sip2sip)
  25. host = 85.17.186.7
複製代碼

TOP

回復 10# bubblestar

這是template 的寫法。

另外,如果sip provider有唔同IP, 這方法可以應用。

TOP

返回列表