返回列表 發帖

TDM400P PSTN-In and PSTN-out Settings

本帖最後由 角色 於 2010-8-29 16:31 編輯

假如我们有两个FXO ports,分别插入TDM400P的slot-1 and -2。

1)把 /etc/asterisk/dahdi-channels.conf的context=from-pstn更改
  1. ; Autogenerated by /usr/sbin/dahdi_genconf on Sat Aug 28 12:17:06 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"
  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"
  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. ;To-PSTN
  2. [To-PSTN-1]
  3. exten => _9.,1,Dial(DAHDI/1/${EXTEN:1},,)

  4. [To-PSTN-2]
  5. ;exten => _8.,1,Dial(DAHDI/2/${EXTEN:1},,)

  6. [internal]
  7. include => To-PSTN-1
  8. include => To-PSTN-2

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

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

  13. [from-pstn-2]
  14. exten => s,1,Dial(SIP/6002,,)
複製代碼
在dahdi-channels.conf,为什么有两个context呢?

原来第一context是我们平时用的context,就是有人打电话进来时,去哪里。第二个context,如果在第一个context在extensions.conf找不到的时候,就会找这个default(在extensions.conf 里的default context)。


角色

返回列表