All pastes #930585 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-06 18:30 UTC
rendered paste body
; This file contains example extensions_custom.conf entries.
; extensions_custom.conf should be used to include customizations
; to AMP's Asterisk dialplan.

; All custom context should contain the string 'custom' in it's name 

; Extensions in AMP have access to the 'from-internal' context.
; The context 'from-internal-custom' is included in 'from-internal' by default

#include extensions_trixbox.conf
#include extensions_hud.conf

[from-internal-custom]

include => from-internal-trixbox
			
;1234,1,Playback(demo-congrats)		; extensions can dial 1234
;1234,2,Hangup()
;h,1,Hangup()
;include => custom-recordme			; extensions can also dial 5678

; custom-count2four,s,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-count2four]		
;s,1,SayDigits(1234)
;s,2,Hangup

; custom-recordme,5678,1 can be used as a custom target for
; a Digital Receptionist menu or a Call Group
;[custom-recordme]
;exten => 5678,1,Wait(2)
;exten => 5678,2,Record(/tmp/asterisk-recording:gsm)
;exten => 5678,3,Wait(2)
;exten => 5678,4,Playback(/tmp/asterisk-recording)
;exten => 5678,5,Wait(2)
;exten => 5678,6,Hangup 
;#include extensions_a2billing.conf


[from-internal-xfer]
exten => _X.,1,Dial(Local/${EXTEN}@from-internal/n,50) ; ring extension or trunk for 50s
exten => _X.,n,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,Goto(ringback,1)
exten => s-CONGESTION,1,Goto(ringback,1)
exten => s-CHANUNAVAIL,1,Goto(ringback,1)
exten => s-BUSY,1,Goto(ringback,1)

exten => ringback,1,AGI(get-exten-from-chan.py,${BLINDTRANSFER}) ; script for converting channel id to extension, eg. "SIP/123-fejwio32" to "123" which is set to variable TRNFEXT
exten => ringback,n,Dial(Local/${TRNFEXT}@from-internal/n)

;asterisk2billing application
;exten => _X.,1,Answer
;exten => _X.,2,Wait,2
;exten => _X.,3,DeadAGI,a2billing.php
;exten => _X.,4,Wait,2
;exten => _X.,5,Hangup

[custom-a2billing]
exten => _X.,1,Answer 
exten => _X.,2,Set(NOCalleID=${IF($[ ${CALLERIDNUM}>1]?${CALLERIDNUM}:5555555566)}) 
exten => _X.,3,Set(CALLERID(number)=${NOCalleID}) 
exten => _X.,4,Wait,2 
exten => _X.,5,DeadAGI(a2billing.php|1) 
exten => _X.,6,Wait,2 
exten => _X.,7,Hangup

[custom-a2bcid]
exten => _X.,1,Answer
exten => _X.,2,Wait,2
exten => _X.,3,DeadAGI(a2billing.php|2)
exten => _X.,4,Wait,2
exten => _X.,5,Hangup


[custom-a2bpin]
exten => _X.,1,Answer 
exten => _X.,2,Set(NOCalleID=${IF($[ ${CALLERIDNUM}>1]?${CALLERIDNUM}:5555555566)}) 
exten => _X.,3,Set(CALLERID(number)=${NOCalleID}) 
exten => _X.,4,Wait,2 
exten => _X.,5,DeadAGI(a2billing.php|3) 
exten => _X.,6,Wait,2 
exten => _X.,7,Hangup

[a2billing]
exten => _X.,1,NoOp
;exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php|4)
exten => _X.,n,Hangup