All pastes #11010 Raw Edit

to Jas

public text v1 · immutable
#11010 ·published 2005-05-05 07:14 UTC
rendered paste body
; Sample /etc/asterisk/extensions.conf
; Created September 1, 2004

; =========================================================
; QUICKSTART WITH VOICEPULSE CONNECT! SERVICE:
; 
; * Login to your VoicePulse Connect! account at:
;   http://connect.voicepulse.com/
;
; * Go to the Devices tab and note your device login and
;   password
;
; * Replace MY_DEVICE_LOGIN and MY_DEVICE_PASSWORD in the
;   "exten => " statements below with your device login
;   and password. (Lines 81-82)
;
; * If you DO NOT have a phone number from VoicePulse
;   Connect!, comment out the following lines by placing a
;   semicolon ";" at the beginning:
; 
;   - The entire "[arbitrary-name]" context (lines 43-48)
;   - The entire "[testdtmf]" context (lines 54-60)
; =========================================================

[general]
static=yes
writeprotect=no

[globals]



; ---------------------------------------------------------
; [arbitrary-name] is the context referred to by the 
; [voicepulse-in-01] user in iax.conf.  This is where your 
; custom incoming call processing should go.
;
; For sample purposes, this section will read back the 
; dialed number and then test DTMF by reading back each 
; digit pressed by the caller.
; ---------------------------------------------------------

[arbitrary-name]  ; <-- Should match the context you have 
                  ;     under [voicepulse-in-01] in iax.conf

exten => _NXXNXXXXXX,1,Playback(beep)
exten => _NXXNXXXXXX,2,SayDigits(${EXTEN})
exten => _NXXNXXXXXX,3,Goto(testdtmf|s|1)
exten => _XXXXXX,1,Dial,Zap/1/${EXTEN}; Press any 7 digit number and try to dial that number through Zap channel 1

; 
; This context is used by the sample [arbitrary-name]
; context above to read back each digit you press.
; 
[testdtmf]
exten => s,1,Background(beep)
exten => s,2,ResponseTimeout(60)
exten => _x,1,SayDigits(${EXTEN})
exten => _x,2,Goto(testdtmf|s|1)
exten => i,1,Goto(testdtmf|s|1)
exten => t,1,Hangup

;added Lehel from digium config DevKit TDM (TDM40B & X100P) 4 fxs

exten => 1000,1,Dial,Zap/1|20 ; Exten 1000 dials Zap channel 1 with a ring time option of 20 secs, which is the analog telephone plugged into the first port of the TDM400P.
exten => 1000,2,Voicemail,u1000
exten => 1000,3,Hangup
exten => 1000,102,Voicemail,b1000
exten => 1000,103,Hangup

exten => 2000,1,Dial,Zap/2|20
exten => 2000,2,Voicemail,u2000
exten => 2000,3,Hangup
exten => 2000,102,Voicemail,b2000
exten => 2000,103,Hangup

exten => 3000,1,Dial,Zap/3|20
exten => 3000,2,Voicemail,u3000
exten => 3000,3,Hangup
exten => 3000,102,Voicemail,b3000
exten => 3000,103,Hangup

exten => 4000,1,Dial,Zap/4|20
exten => 4000,2,Voicemail,u4000
exten => 4000,3,Hangup
exten => 4000,102,Voicemail,b4000
exten => 4000,103,Hangup

exten => 5000,1,Dial,Zap/5|20
exten => 5000,2,Voicemail,u5000
exten => 5000,3,Hangup
exten => 5000,102,Voicemail,b5000
exten => 5000,103,Hangup

exten => _9NXXXXXX,1,Dial(Zap/g1/${EXTEN:1}|20,t) ; Dialing 9 lets you dialout

; ---------------------------------------------------------
; This context is used to send all outgoing calls to the
; VoicePulse Connect! service for connection to the PSTN.
;
; Asterisk will attempt to dial out through gwiaxt01 first.
; If there is a problem, it will attempt to dial out
; through gwiaxt02.
;
; YOU MUST HAVE BOTH LINES FOR OUTGOING CALL REDUNDANCY!
;
; ---------------------------------------------------------

; 
; There should be TWO lines after [outgoing], each beginning
; with "exten =>".  Please check to make sure copying or 
; cutting & pasting this sample did not break the lines into 
; more than TWO exten lines.
; 
[incoming]
 exten => s,1,Wait(1)
 exten => s,2,Dial(Zap/g2|20,t) ; rings the first available channel in group 2
 exten => s,3,Voicemail,u9000
 exten => s,4,Hangup
 exten => s,103,Voicemail,b9000
 exten => s,104,Hangup

[outgoing]
exten => _1NXXNXXXXXX,1,Dial(IAX2/MY_DEVICE_LOGIN:MY_DEVICE_PASSWORD@*.voicepulse.com/${EXTEN})
exten => _1NXXNXXXXXX,102,Dial(IAX2/MY_DEVICE_LOGIN:MY_DEVICE_PASSWORD@*.voicepulse.com/${EXTEN})

[intern]
exten => entry