Ahh ok. I must warn you that I am well out of my depth here.
We use a custom built box running AsteriskNOW, I dont think we have any DAHDI/Zaptel hardware.
sip.conf;
[authentication]
[general]
context = default
allowoverlap = yes
bindport = 5060
bindaddr = 0.0.0.0
allowexternaldomains = no
allowexternalinvites = no
allowguest = yes
allowsubscribe = yes
allowtransfer = yes
alwaysauthreject = no
autodomain = no
callevents = no
canreinvite = yes
compactheaders = no
defaultexpiry = 120
dumphistory = no
g726nonstandard = no
ignoreregexpire = no
jbenable = no
jbforce = no
jblog = no
maxcallbitrate = 384
maxexpiry = 3600
minexpiry = 60
nat = no
notifyringing = yes
notifyhold = yes
pedantic = no
promiscredir = no
recordhistory = no
relaxdtmf = no
rtcachefriends = no
rtsavesysname = no
rtupdate = no
sendrpid = no
progressinband = no
sipdebug = yes
verbose = 5
srvlookup = yes
t1min = 100
t38pt_udptl = no
trustrpid = no
usereqphone = no
videosupport = no
localnet = 172.16.0.0/12
subscribecontext = default
extensions.conf;
[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no
priorityjumping = no
[globals]
trunk_1_cid = 0290432529
trunk_2 = Zap/g1
[dundi-e164-canonical]
[dundi-e164-customers]
[dundi-e164-via-pstn]
[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn
[dundi-e164-switch]
switch => DUNDi/e164
[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch
[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]
[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunklocal]
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
ignorepat => 9
include => local
include => trunkld
[local]
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
[macro-stdexten]
exten => s,1,Dial(${ARG2},20)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG1},u)
exten => s-NOANSWER,2,Goto(default,s,1)
exten => s-BUSY,1,Voicemail(${ARG1},b)
exten => s-BUSY,2,Goto(default,s,1)
exten => _s-.,1,Goto(s-NOANSWER,1)
exten => a,1,VoicemailMain(${ARG1})
[macro-stdPrivacyexten]
exten => s,1,Dial(${ARG2},20|p)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(u${ARG1})
exten => s-NOANSWER,2,Goto(default,s,1)
exten => s-BUSY,1,Voicemail(b${ARG1})
exten => s-BUSY,2,Goto(default,s,1)
exten => s-DONTCALL,1,Goto(${ARG3},s,1)
exten => s-TORTURE,1,Goto(${ARG4},s,1)
exten => _s-.,1,Goto(s-NOANSWER,1)
exten => a,1,VoicemailMain(${ARG1})
[macro-page]
exten => s,1,ChanIsAvail(${ARG1}|js)
exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
exten => s,n(autoanswer),Set(_ALERT_INFO="RA")
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0)
exten => s,n,NoOp()
exten => s,n,Dial(${ARG1}||)
exten => s,n(fail),Hangup
[demo]
exten => s,1,Wait(1)
exten => s,n,Answer
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n(restart),BackGround(demo-congrats)
exten => s,n(instruct),BackGround(demo-instruct)
exten => s,n,WaitExten
exten => 2,1,BackGround(demo-moreinfo)
exten => 2,n,Goto(s,instruct)
exten => 3,1,Set(LANGUAGE()=fr)
exten => 3,n,Goto(s,restart)
exten => 1000,1,Goto(default,s,1)
exten => 1234,1,Playback(transfer,skip)
exten => 1234,n,Macro(stdexten,1234,${CONSOLE})
exten => 1235,1,Voicemail(u1234)
exten => 1236,1,Dial(Console/dsp)
exten => 1236,n,Voicemail(u1234)
exten => #,1,Playback(demo-thanks)
exten => #,n,Hangup
exten => t,1,Goto(#,1)
exten => i,1,Playback(invalid)
exten => 500,1,Playback(demo-abouttotry)
exten => 500,n,Dial(IAX2/guest@misery.digium.com/s@default)
exten => 500,n,Playback(demo-nogo)
exten => 500,n,Goto(s,6)
exten => 600,1,Playback(demo-echotest)
exten => 600,n,Echo
exten => 600,n,Playback(demo-echodone)
exten => 600,n,Goto(s,6)
exten => 76245,1,Macro(page,SIP/Grandstream1)
exten => _7XXX,1,Macro(page,SIP/${EXTEN})
exten => 7999,1,Set(TIMEOUT(absolute)=60)
exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d)
exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)
[page]
exten => _X.,1,Macro(page,SIP/${EXTEN})
[macro-trunkdial]
exten = s,1,set(CALLERID(all)=${IF($["${LEN(${CALLERID(num)})}" > "6"]?${CALLERID(all)}:${ARG2})})
exten = s,n,Dial(${ARG1})
exten = s,n,Goto(s-${DIALSTATUS},1)
exten = s-NOANSWER,1,Hangup
exten = s-BUSY,1,Hangup
exten = _s-.,1,NoOp
[asterisk_guitools]
exten = executecommand,1,System(${command})
exten = executecommand,n,Hangup()
exten = record_vmenu,1,Answer
exten = record_vmenu,n,Playback(vm-intro)
exten = record_vmenu,n,Record(${var1})
exten = record_vmenu,n,Playback(vm-saved)
exten = record_vmenu,n,Playback(vm-goodbye)
exten = record_vmenu,n,Hangup
exten = play_file,1,Answer
exten = play_file,n,Playback(${var1})
exten = play_file,n,Hangup
[voicemenu-custom-1]
include = default
comment = Welcome
alias_exten = 7000
exten = s,1,Answer
exten = s,2,Wait(1)
exten = s,3,Background(peoplelogic/welcome-to-peoplelogic)
exten = s,4,Goto(ringroups-custom-1|s|1)
[DID_trunk_1]
[voicemenu-custom-3]
comment = tset
alias_exten = 7005
include = default
exten = s,1,Answer
exten = s,2,MP3Player(http://radioparadise.steadyhost.com:8060)
exten = *,1,Goto(default|1002|1)
[DID_trunk_1]
[eegg-1]
gui_ring_groupname = easter-egg-1
exten = s,1,Wait(1)
exten = s,2,Playback(all-your-base)
exten = s,3,Goto(eegg-1|s|1)
[internal-agents]
exten = 1003,1,Dial(SIP/1003)
[voicemenu-custom-4]
include = default
comment = Out of Hours
alias_exten = 7003
exten = s,1,Answer
exten = s,2,Wait(1)
exten = s,3,Background(peoplelogic/out-of-hours)
exten = s,4,VoiceMail(1001,u)
[ringroups-custom-1]
gui_ring_groupname = All
exten = s,1,Set(CALLERID(all)=Customer Service)
exten = s,n,Dial(SIP/1003,20)
exten = s,n,Voicemail(1003,b)
[accounts]
gui_ring_groupname = Accounts
exten = s,1,Set(CALLERID(all)=Accounts)
exten = s,n,Dial(SIP/1002,20,m(default))
exten = s,n,Voicemail(1002,b)
[dial-extension]
include = default
exten = s,1,Set(CALLERID(all)=Dialled Extension)
exten = s,2,Background(peoplelogic/dial-extension-now)
exten = s,3,WaitExten(10)
exten = s,4,Goto(voicemenu-custom-2|s|1)
exten = i,1,Goto(dial-extension|s|1)
[voicemenu-custom-2]
comment = PL
alias_exten = 7002
exten = s,1,Answer
exten = s,2,Wait(1)
exten = s,3,Background(peoplelogic/welcome-to-peoplelogic)
exten = s,4,Background(peoplelogic/customer-service-1)
exten = s,5,Background(peoplelogic/sales-2)
exten = s,6,Background(peoplelogic/accounts-3)
exten = s,7,Background(peoplelogic/if-you-know-ext)
exten = s,8,Background(peoplelogic/for-any-other-enquiries)
exten = s,9,Wait(1)
exten = s,10,WaitMusicOnHold(10)
exten = s,11,Goto(customer-service|s|1)
exten = 1,1,Playback(peoplelogic/thank-you-please-wait)
exten = 1,2,Goto(customer-service|s|1)
exten = 2,1,Playback(peoplelogic/thank-you-please-wait)
exten = 2,2,Goto(sales|s|1)
exten = 3,1,Playback(peoplelogic/thank-you-please-wait)
exten = 3,2,Goto(accounts|s|1)
exten = *,1,Goto(dial-extension|s|1)
exten = i,1,Playback(peoplelogic/invalid-choice)
exten = i,2,Goto(voicemenu-custom-2|s|4)
[production-team]
gui_ring_groupname = Cust Service
exten = s,1,Set(CALLERID(all)=Production Team)
exten = s,n,Dial(SIP/1009&SIP/1021,20,m(default))
exten = s,n,Dial(SIP/1005&SIP/1013&SIP/1023&SIP/1006&SIP/1009&SIP/1021,60,m(default))
exten = s,n,Voicemail(1009,b)
[DID_trunk_2]
include = default
exten = _X.,1,Goto(voicemenu-custom-2|s|1)
exten = s,1,Wait(4)
exten = s,2,Answer
exten = s,3,GotoIfTime(8:30-17:30|mon-fri|*|*?voicemenu-custom-2|s|1)
exten = s,4,Goto(voicemenu-custom-4|s|1)
[pl_ivr_09_outsidehours]
include = default
comment = Out of Hours
exten = s,1,Answer
exten = s,2,Wait(1)
exten = s,3,Background(pl_ivr_09/our-office-hours)
exten = s,4,VoiceMail(1001,u)
[pl_ivr_09_ext_dial]
include = default
exten = s,1,Set(CALLERID(all)=Dialled Extension)
exten = s,2,Background(peoplelogic/dial-extension-now)
exten = s,3,WaitExten(10)
exten = s,4,Goto(pl_ivr_09_main|s|1)
exten = i,1,Playback(pl_ivr_09/sorry-that-was-an-invalid-choice)
exten = i,2,Goto(pl_ivr_09_ext_dial|s|1)
[pl_ivr_09_morn]
comment = PL
alias_exten = 7007
exten = s,1,Wait(1)
exten = s,2,Playback(pl_ivr_09/good-morning-youve-reached-peoplelogic)
exten = s,3,Goto(pl_ivr_09_main|s|1)
[pl_ivr_09_arvo]
comment = PL
alias_exten = 7008
exten = s,1,Wait(1)
exten = s,2,Playback(pl_ivr_09/good-afternoon-youve-reached-peoplelogic)
exten = s,3,Goto(pl_ivr_09_main|s|1)
[default]
exten = 1234,1,Goto(eegg-1|s|1)
exten = 2000,1,VoiceMailMain
exten = 4000,1,Macro(trunkdial,${trunk_2}/1831,${trunk_2_cid})
exten = 5000,1,Authenticate(0258)
exten = 5000,2,Macro(trunkdial,${trunk_2}/*21,${trunk_2_cid})
exten = 5001,1,Macro(trunkdial,${trunk_2}/#21#,${trunk_2_cid})
exten = 7000,1,Goto(voicemenu-custom-1|s|1)
exten = 7002,1,SetMusicOnHold,default
exten = 7002,2,Goto(voicemenu-custom-2|s|1)
exten = 7005,1,Goto(voicemenu-custom-3|s|1)
exten = 7003,1,Goto(voicemenu-custom-4|s|1)
exten = 7010,1,Goto(incoming-calls|s|1)
exten = 7011,1,Goto(pl_ivr_09_arvo|s|1)
exten = 7012,1,Goto(pl_ivr_09_main|s|1)
exten = 3000,1,Goto(ringroups-custom-1|s|1)
exten = 6000,1,Directory(numberplan-custom-1,,ef)
exten = 8000,1,MeetMe(${EXTEN}|MI)
exten = 8159,1,Authenticate(6854)
exten = 8159,2,ChanSpy
exten = 8159,3,Hangup
[incoming-calls]
include = default
exten = _X.,1,Goto(pl_ivr_09_main|s|1)
exten = s,1,Wait(2)
exten = s,2,Answer
exten = s,3,GotoIfTime(8:30-12:00|mon-fri|*|*?pl_ivr_09_morn|s|1)
exten = s,4,GotoIfTime(12:01-17:30|mon-fri|*|*?pl_ivr_09_arvo|s|1)
exten = s,5,Goto(pl_ivr_09_outsidehours|s|1)
[numberplan-custom-1]
plancomment = DialPlan1
include = default
include = parkedcalls
exten = _111,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
comment = _111,1,Voicemail,standard
exten = _***XXXX,1,Pickup(${EXTEN:3})
exten = _XXXXX.,1,Macro(trunkdial,${trunk_2}/${EXTEN:0},${trunk_2_cid})
comment = _XXXXX.,1,All,custom
[pl_ivr_09_main]
comment = PL
alias_exten = 7006
exten = s,1,Answer
exten = s,2,WaitExten(1)
exten = s,3,Background(pl_ivr_09/if-you-know-the-extension-press-star-now)
exten = s,4,WaitExten(1)
exten = s,5,Background(pl_ivr_09/otherwise-press-1-for-support)
exten = s,6,WaitExten(1)
exten = s,7,Background(pl_ivr_09/press-2-for-the-production-team)
exten = s,8,WaitExten(1)
exten = s,9,Background(pl_ivr_09/press-3-for-sales)
exten = s,10,WaitExten(1)
exten = s,11,Background(pl_ivr_09/press-4-for-accounts-and-admin)
exten = s,12,WaitExten(1)
exten = s,13,Background(pl_ivr_09/you-can-also-dial-5-for-the-directory)
exten = s,14,WaitExten(1)
exten = s,15,Background(pl_ivr_09/or-hold-on-and-youll-be-answered-by-the-first-available-representative)
exten = s,16,WaitExten(15)
exten = s,17,Goto(customer-service|s|1)
exten = 1,1,Playback(pl_ivr_09/thanks-please-wait)
exten = 1,2,Goto(customer-service|s|1)
exten = 2,1,Playback(pl_ivr_09/thanks-please-wait)
exten = 2,2,Goto(production-team|s|1)
exten = 3,1,Playback(pl_ivr_09/thanks-please-wait)
exten = 3,2,Goto(sales|s|1)
exten = 4,1,Playback(pl_ivr_09/thanks-please-wait)
exten = 4,2,Goto(accounts|s|1)
exten = 5,1,Wait(1)
exten = 5,2,Directory(numberplan-custom-1,,ef)
exten = *,1,Goto(pl_ivr_09_ext_dial|s|1)
exten = i,1,Playback(pl_ivr_09/sorry-that-was-an-invalid-choice)
exten = i,2,Goto(pl_ivr_09_main|s|4)
[customer-service]
gui_ring_groupname = Cust Service
exten = s,1,Set(CALLERID(all)=Customer Service)
exten = s,n,Dial(SIP/1009&SIP/1005&SIP/1012&SIP/1002&SIP/1019&SIP/1021&SIP/1025&SIP/1026,20,m(default))
exten = s,n,Dial(SIP/1001&SIP/1002&SIP/1003&SIP/1005&SIP/1006&SIP/1007&SIP/1008&SIP/1009&SIP/1011&SIP/1012&SIP/1013&SIP/1015&SIP/1016&SIP/1021&SIP/1019&SIP/1022&SIP/1023&SIP/1025&SIP/1026,60,m(default))
exten = s,n,Voicemail(1009,b)
[sales]
gui_ring_groupname = sales
exten = s,1,Set(CALLERID(all)=Sales)
exten = s,n,Dial(SIP/1001,10,m(default))
exten = s,n,Dial(SIP/1016,20,m(default))
exten = s,n,Voicemail(1001,b)
Thanks again.[/code]