[general]
static = yes
writeprotect = no
autofallthrough = no
clearglobalvars = yes
priorityjumping = no
[globals]
#include "extensions.globals"
[from-internal]
#include "/etc/sipcat/extensions.from-internal.hook"
include => services
include => extensions
include => voicemail
include => callgroups
include => callqueues
include => parkedcalls
include => conferences
include => ivrs
#include "extensions.page"
#include "extensions.hint"
include => speeddials
include => outbound-routes
include => debug
exten => asterisk,1,voicemailmain(${CALLERID(num)})
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[from-defaultinternal]
#include "/etc/sipcat/extensions.from-defaultinternal.hook"
include => services
include => extensions
include => voicemail
include => callgroups
include => callqueues
include => parkedcalls
include => conferences
include => ivrs
#include "extensions.page"
#include "extensions.hint"
include => speeddials
include => debug
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[from-internal-admin]
include => from-defaultinternal
include => outbound-routes-admin
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[from-internal-Linksys]
include => from-defaultinternal
include => outbound-routes-Linksys
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[from-internal-vorbrodtm]
include => from-defaultinternal
include => outbound-routes-vorbrodtm
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[from-external]
include => inbound-routes
exten => fax,1,macro(receive_fax)
exten => i,1,hangup
exten => t,1,playtones(busy)
exten => t,2,busy
exten => h,1,hangup
[services]
switch => Realtime/services@
[ivrservices]
switch => Realtime/ivrservices@
[extensions]
switch => Realtime/extensions@
[voicemail]
switch => Realtime/voicemail@
[callgroups]
switch => Realtime/callgroups@
[callqueues]
switch => Realtime/callqueues@
[conferences]
switch => Realtime/conferences@
#include "extensions.ivrs"
[speeddials]
switch => Realtime/speeddials@
#include "extensions.outbound_routes"
#include "extensions.inbound_routes"
[macro-page-local]
exten => s,1,agi,dialparties.agi
exten => s,10,sipaddheader(Call-Info: <sip:87.239.96.27>\;answer-after=0)
exten => s,11,page(${ds})
[macro-dial-local]
exten => s,1,agi,dialparties.agi
exten => s,10,set(DYNAMIC_FEATURES=automon)
exten => s,11,set(TOUCH_MONITOR=${TIMESTAMP}-${CALLERID(num)}-${CALLERID(dnid)})
exten => s,12,dial(${ds}rwWtTo)
exten => s,23,busy
exten => h,1,system(soxmix "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}-in.wav" "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}-out.wav" "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}.wav");
exten => h,2,system(mime-construct --header "From: ${FROMADDR}" --to ${${CALLERID(num)}_EMAILADDR} --subject "Recorded conversation from ${CALLERID(num)} ${CALLERID(name)}" --attachment "auto-${TOUCH_MONITOR}.wav" --type audio/wav --file "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}.wav" --string "");
[macro-dial-out]
exten => s,1,gotoif($["${${CALLERID(num)}_REC_OUT}" = "ALWAYS"]?2:3)
exten => s,2,monitor(wav,/var/spool/asterisk/monitor/conversation-${CALLERID(num)}-${ARG5}-${TIMESTAMP},m)
exten => s,3,gotoif($["${ARG6}" = "0"]]?4:5)
exten => s,4,set(CALLERID(num)=${${CALLERID(num)}_CALLERID})
exten => s,5,gotoif($["${ARG6}" = "1"]]?6:7)
exten => s,6,set(CALLERID(num)=${${CALLERID(num)}_LCALLERID})
exten => s,7,set(DYNAMIC_FEATURES=automon)
exten => s,8,set(TOUCH_MONITOR=${TIMESTAMP}-${CALLERID(num)}-${CALLERID(dnid)})
exten => s,9,dial(${ARG1}/${ARG2}/${ARG4}${ARG5},,jwWtTo)
exten => s,110,noop(110 Dialing extension "${ARG5}" on trunk "${ARG1}/${ARG2}" failed)
exten => s,111,noop(111 Maximum channels reached on trunk "${ARG1}/${ARG2}")
exten => s,210,noop(210 Dialing extension "${ARG5}" on trunk "${ARG1}/${ARG2}" failed)
exten => s,211,noop(211 Maximum channels reached on trunk "${ARG1}/${ARG2}")
exten => h,1,system(soxmix "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}-in.wav" "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}-out.wav" "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}.wav");
exten => h,2,system(mime-construct --header "From: ${FROMADDR}" --to ${${CALLERID(num)}_EMAILADDR} --subject "Recorded conversation from ${CALLERID(num)} ${CALLERID(name)}" --attachment "auto-${TOUCH_MONITOR}.wav" --type audio/wav --file "/var/spool/asterisk/monitor/auto-${TOUCH_MONITOR}.wav" --string "");
[macro-receive-fax]
exten => s,1,answer();
exten => s,n,Set(faxfile=/var/spool/asterisk/fax/fax-${CALLERID(name)}-${CALLERID(num)}-${UNIQUEID}.tif);
exten => s,n,Set(faxuser=${ARG1});
exten => s,n,Goto(wrap-receive-fax,1,1);
[wrap-receive-fax]
exten => 1,1,gotoIf($["${CHANNEL:0:5}" != "mISDN"]]?3)
exten => 1,2,misdn_set_opt(!e:vt0);
exten => 1,3,rxfax(${faxfile});
exten => h,1,system(/usr/bin/perl /opt/sipcat/core/scripts/rxfax.pl "${faxfile}");
exten => h,2,system(cp "${faxfile}.pdf" "/var/spool/asterisk/fax/${faxuser}");
exten => h,3,system(mime-construct --header "From: ${FROMADDR}" --to ${${faxuser}_EMAILADDR} --subject "Fax from ${CALLERID(num)} ${CALLERID(name)}" --attachment "${CALLERID(num)}.pdf" --type application/pdf --file "${faxfile}.pdf" --string "");
exten => h,4,noop(Received fax from "${faxuser}")
#include "/etc/sipcat/extensions.hook"