; calling_card.conf:
; Allow incoming users with a password to make outgoing calls

[calling_card-challenge]
exten = s,1,Background(user_sounds/calling_card-password)

; Accounts are included from another file here so 
; neer-do-wells such as yourself don't see them.  
; Each "account" is like this:
;
; exten = 12341234,1,Macro(custom-SetCIDNum,2121112222)
; exten = 12341234,2,SetCIDName(A. Card User)
; exten = 12341234,3,Goto(calling_card,s,1)
;
; It's a very simplistic way to do it, but it works.

#include <calling_card_accounts.conf>

[calling_card]
exten = s,1,SetVar(root_context=calling_card)
exten = s,2,Wait(2)
exten = s,3,goto(greet,1)   ; Jump to calling_card context
exten = greet,1,Background(user_sounds/calling_card_greeting)
include = app-change-caller_id
include = app-hangup_on_star
include = outgoing
include = hangup
include = invalid_extension-internal

