返回列表 發帖

PSTN incoming call to IVR

本帖最後由 角色 於 2010-8-30 15:01 編輯

If a person calls the PSTN-1, extension 6001 will ring. If PSTN-2, the system will enter an ivr-1 routine.

YH

dahdi-channels.conf
  1. ; Autogenerated by /usr/sbin/dahdi_genconf on Sun Aug 29 15:00:16 2010
  2. ; If you edit this file and execute /usr/sbin/dahdi_genconf again,
  3. ; your manual changes will be LOST.
  4. ; Dahdi Channels Configurations (chan_dahdi.conf)
  5. ;
  6. ; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
  7. ; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
  8. ;

  9. ; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
  10. ;;; line="1 WCTDM/4/0 FXSKS  (In use) (SWEC: MG2)"
  11. signalling=fxs_ks
  12. callerid=asreceived
  13. group=0
  14. context=from-pstn-1
  15. channel => 1
  16. callerid=
  17. group=
  18. context=default

  19. ;;; line="2 WCTDM/4/1 FXSKS  (In use) (SWEC: MG2)"
  20. signalling=fxs_ks
  21. callerid=asreceived
  22. group=0
  23. context=from-pstn-2
  24. channel => 2
  25. callerid=
  26. group=
  27. context=default
複製代碼
extensions.conf
  1. [ivr-1]
  2. ;ivr-1
  3. exten => 1130,1,Answer
  4. exten => 1130,n,Wait(2)
  5. exten => 1130,n,Background(vm-enter-num-to-call)
  6. exten => 1130,n,WaitExten
  7. exten => 1130,n,Playback(vm-goodbye)
  8. exten => 1130,n,Hangup
  9. exten => i,1,Playback(pbx-invalid)
  10. exten => i,2,Goto(1130,1)
  11. exten => t,1,Playback(vm-goodbye)
  12. exten => t,2,n,Hangup


  13. [internal]

  14. include => ivr-1

  15. exten => 6001,1,Dial(SIP/6001,,r)
  16. exten => 6002,1,Dial(SIP/6002,,r)

  17. [from-pstn-1]
  18. exten => s,1,Dial(SIP/6001,,)

  19. [from-pstn-2]
  20. exten => s,1,Goto(internal,1130,1)
複製代碼

本帖最後由 ckleea 於 2010-10-25 20:46 編輯

回復 25# bubblestar

It tries this but still captures the first 2 digits.
Anyway, I think I need to go through all my dialplan scripts to check.

Updated:
Almost done. mobile phone -> 2b -> asterisk server -> IVR -> gizmo -> asterisk extensions ring
Correct called ID

TOP

本帖最後由 bubblestar 於 2010-10-25 17:34 編輯

回復 24# ckleea


   
Just go back to YH's [ivr-1] section in extensions.conf and put the time allowed, say 8 seconds, in WaitExten() as below:

extensions.conf

[ivr-1];ivr-1

exten => 1130,1,Answer
exten => 1130,n,Wait(2)
exten => 1130,n,Background(vm-enter-num-to-call)
exten => 1130,n,WaitExten(8)
exten => 1130,n,Playback(vm-goodbye)
exten => 1130,n,Hangup
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(1130,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,n,Hangup

** Seconds can be passed with fractions of a second. (eg: 1.5 = 1.5 seconds)

TOP

One more question: If I allow to dial IDD or go via gizmo to US, how can I extend the duration of waitexten long enough to capture all the input? I can be able to input 9 digits but when I input 01747XXXXXXX, the script accepts only 01 and then fails.

TOP

Excellent, you help me a lot.
謝謝 Bubblestar 兄。

Security is the major issue for us to work on.

My next task is to migrate some of the scripts to the switchfin driven IP01. I will then put it in UK for another 落腳點。

TOP

本帖最後由 bubblestar 於 2010-10-25 10:00 編輯

Good to hear that it works for you.  Always put your own dialplan using the include => XXX which can create different kinds of combination that suits your own needs.

Regarding the inclusion of password (for IDD protection or avoid being abused), you may insert just one line in the first place as below:


[viaPSTN]
; use any first available PSTN line of Group 0 to dial out your IDD or outside line.  It will be more flexible if you have 2 or more PSTN lines.
exten => _5.,1,Authenticate(8888,,4)
exten => _5.,n,Dial(DAHDI/g0/${EXTEN:1},,r)
exten => _5.,n,Congestion

or

[viaPSTN]
; use designated PSTN line 1 to dial out IDD or outside line
exten => _5.,1,Authenticate(8888,,4)
exten => _5.,n,Dial(DAHDI/1/${EXTEN:1},,r)
exten => _5.,n,Congestion

I think some other more effective, secure and better method can do the same.  If anyone of you can provide your settings, please be generous to share.

Many thanks

TOP

本帖最後由 ckleea 於 2010-10-25 07:29 編輯

Thanks, bubblestar. I always have the assumption that when passing to another extensions, I can get hold of the dialplan as well. Will try.


Follow up:
It works very well. Next, is to work out a better configuration and do a more detailed IVR. Perhaps to include password protected.

TOP

Thanks, bubblestar. I always have the assumption that when passing to another extensions, I can get hold of the dialplan as well. Will try.

TOP

本帖最後由 bubblestar 於 2010-10-24 22:59 編輯

回復 17# ckleea

Using YH's example for further illustration as below.  You may add another context in extensions.conf to enhance the usage.  Assume that you are going to use or dial PSTN===> VoIP ===> PSTN.  This implementation must be used subject to the availability of 2 PSTN lines.

dahdi-channels.conf

; Autogenerated by /usr/sbin/dahdi_genconf on Sun Aug 29 15:00:16 2010
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
;;; line="1 WCTDM/4/0 FXSKS  (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn-1
channel => 1
callerid=
group=
context=default

;;; line="2 WCTDM/4/1 FXSKS  (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn-2
channel => 2
callerid=
group=
context=default


extensions.conf

[ivr-1];ivr-1

exten => 1130,1,Answer
exten => 1130,n,Wait(2)
exten => 1130,n,Background(vm-enter-num-to-call)
exten => 1130,n,WaitExten
exten => 1130,n,Playback(vm-goodbye)
exten => 1130,n,Hangup
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(1130,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,n,Hangup


[internal]

include => ivr-1

include => viaPSTN

exten => 6001,1,Dial(SIP/6001,,r)
exten => 6002,1,Dial(SIP/6002,,r)

[from-pstn-1]
exten => s,1,Dial(SIP/6001,,)

[from-pstn-2]
exten => s,1,Goto(internal,1130,1)

[viaPSTN]
; use any first available PSTN line of Group 0 to dial out your IDD or outside line.  It will be more flexible if you have 2 or more PSTN lines.
exten => _5.,1,Dial(DAHDI/g0/${EXTEN:1},,r)
exten => _5.,2,Congestion

or

[viaPSTN]
; use designated PSTN line 1 to dial out IDD or outside line
exten => _5.,1,Dial(DAHDI/1/${EXTEN:1},,r)
exten => _5.,2,Congestion

TOP

I believe that some of extensions are not seen within the context of your ivr.

YH

TOP

回復 1# 角色


    Would like to ask about second stage dialing, the example allows to go to inside extensions. But how about dealing with next stage of dialing example go for outside call or IDD via VOIP?

I always got invalid extension.

TOP

Both notebook and remarks are good practice. But the problem for me is that we add, delete and edit the scripts. After a while, I forget what have been done.

TOP

如果驚唔記得,可以係每段設定前後加上一些敍述,方便記憶。

例如:


[from-pstn-1]
exten => s,1,Dial(SI ...
bubblestar 發表於 2010-9-8 14:53



    这是个不错的方法  
    退休之后  学APL

TOP

如果驚唔記得,可以係每段設定前後加上一些敍述,方便記憶。

例如:


[from-pstn-1]
exten => s,1,Dial(SIP/6001,30)        ;  從外面接入的電話,轉往內線6001,會晌30秒。
exten => s,2,VoiceMail(6001,u)        ;  30秒沒有人接聽的話,便自動接往內線6001的留言信箱。

如此類推。但係在圖形介面便比較難做到相類似的效果了。

TOP

这个你要自己做log book,去记录你以前做的的事。

角色

TOP

返回列表