; Answer and wait 2 seconds to setup media stream
exten => 8005551212,1,Answer
exten => 8005551212,n,Wait(2)
; Authenticate the caller against the spoof-users context in voicemail.conf
exten => 8005551212,n,VMAuthenticate(@spoof-users)
; Read in 10 digits to the variable SPOOF_NUM
exten => 8005551212,n,Read(SPOOF_NUM|enter-spoof-num|10)
; Read in 10 digits to the variable DIAL_NUM
exten => 8005551212,n,Read(DIAL_NUM|enter-dial-num|10)
; Set outbound callerid number to the value of variable SPOOF_NUM
exten => 8005551212,n,Set(CALLERID(num)=${SPOOF_NUM})
; Dial out through Voicepulse the phone number contained in the variable DIAL_NUM
exten => 8005551212,n,Dial(IAX2/myvoiceuser@voicepulse/${DIAL_NUM})
; Signal back congestion since the call failed
exten => 8005551212,n,Congestion