So hier nun mal meine extensions.conf
[general]
clearglobalvars=no
[globals]
TIME_TO_ANSWER=20
TIME_TO_ANSWER_MAX=10
PASSWORD=
ANDIHANDY=01712345
OUTDEV=Capi/contr1
ANRUFER=unbekannte Rufnummer
[default]
include => tapi
include => capi-out
include => capi-in
include => localcalls
[capi-out]
;hier Funktioniert es!
;exten => _0X.,1,Set(CALLERID(number)=12346)
exten => _0X.,1,Dial(${OUTDEV}/12345:${EXTEN}/b)
exten => _0X.,2,Congestion(5)
exten => _0X.,3,Hangup()
;[tapi]
;exten => s,1,UserEvent(TAPI|TAPIEVENT: LINE_NEWCALL ${ARG2})
;exten => s,n,UserEvent(TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_OFFERING)
;exten => s,n,UserEvent(TAPI|TAPIEVENT: SET CALLERID ${CALLERID})
;exten => s,n,UserEvent(TAPI|TAPIEVENT: LINE_CALLINFO LINECALLINFOSTATE_CALLERID)
;exten => s,n,Dial(${ARG2},20,rtM(tapi^${UNIQUEID}|${ARG2}))
;exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVALI,CONGESTIION,ANSWER)
;exten => s,104,Goto(s-BUSY,1)
;exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemal w/ unavail announce
;exten => s-NOANSWER,2,Goto(tapi,s,1); if the press #, return to start
;exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemal w/ busy announce
;exten => s-BUSY,2,Goto(tapi,s,1) ; if the press #, return tu start
;exten => _s-.,1,Goto(s-NOANSWER,1) ; treat anything else as no answer
;exten => a,1,VoicemailMain(${ARG1}) ; if they press *, send the user into voicemailmain
;exten => h,1,UserEvent(TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_IDLE)
;[macro-tapi]
;exten => s,1,UserEvent(TAPI|TAPIEVENT: [~${ARG1}&${ARG2}] LINE_CALLSTATE LINECALLSTATE_CONNECTED)
;exten => s,2,UserEvent(TAPI|TAPIEVENT: [~${ARG1}&!${ARG2}] LINE_CALLSTATE LINECALLSTATE_HANGUP)
;[macro-fallback]
; ${ARG1} : Trunk to call out on
; ${ARG2} : Number to call
; ${ARG3} : Time to let ring
; ${ARG4} : Dial Options
;exten => s,1,UserEvent(TAPI|TAPIEVENT: LINE_NEWCALL ${CHANNEL:0:7})
;exten => s,2,UserEvent(TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_DIALTONE)
;exten => s,3,UserEvent(TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_DIALING)
;exten => s,4,UserEvent(TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_PROCEEDING)
;exten => s,5,Dial(${ARG1}/${ARG2},${ARG3},${ARG4}M(tapi^${UNIQUEID}|${CHANNEL:0:7}))
[capi-in]
;----------------------------------------------------------------------------------
;normale annahme
;----------------------------------------------------------------------------------
exten => 12345,1,Ringing
;exten => 12345,2,UserEvent(TAPI|TAPIEVENT: LINE_NEWCALL myline)
exten => 12345,2,Dial(SIP/andi,${TIME_TO_ANSWER})
exten => 12345,3,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?4:6)
exten => 12345,4,Dial(SIP/max,${TIME_TO_ANSWER})
exten => 12345,5,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?9:10)
exten => 12345,6,Dial(SIP/max,${TIME_TO_ANSWER_MAX})
exten => 12345,7,Goto(capi-in,12345,10)
exten => 12345,9,Wait(${TIME_TO_ANSWER})
;----------------------------------------------------------------------------------
;Hauptmenue
;----------------------------------------------------------------------------------
exten => 12345,10,Answer
exten => 12345,11,Set(GLOBAL(ANRUFER)=${CALLERID(all)})
exten => 12345,12,Wait,1
exten => 12345,13,Playback(/var/lib/asterisk/sounds/guten_tag_sie_sind_mit_der_firma_computers_and_more_verbunden)
exten => 12345,14,Playback(/var/lib/asterisk/sounds/leider_ist_zur_zeit_niemand_erreichbar)
exten => 12345,15,Goto(capi-in,12345,20)
exten => 12345,20,Wait,1
exten => 12345,21,Background(/var/lib/asterisk/sounds/menupoints)
exten => 12345,22,WaitExten
exten => 12345,23,Goto(capi-in,12345,20)
;----------------------------------------------------------------------------------
;Falsche Eingabe
;----------------------------------------------------------------------------------
exten => i,1,Playback(/var/lib/asterisk/sounds/eingabe_inkorrekt)
exten => i,2,Goto(capi-in,12345,20)
;----------------------------------------------------------------------------------
;anrufbeantworter
;----------------------------------------------------------------------------------
exten => 1,1,Playback(/var/lib/asterisk/sounds/Anrufbeantworter)
exten => 1,2,Voicemail(s100)
exten => 1,3,Hangup()
;----------------------------------------------------------------------------------
;verabschieden
;----------------------------------------------------------------------------------
exten => 3,1,Playback(/var/lib/asterisk/sounds/ByeDanke)
exten => 3,2,Hangup()
;----------------------------------------------------------------------------------
;erneutes anklingeln
;----------------------------------------------------------------------------------
exten => 2,1,Playback(/var/lib/asterisk/sounds/einen_moment_bitte_wir_werden_versuchen_sie_zu_verbinden)
exten => 2,2,Dial(SIP/andi,600,m[default])
exten => 2,3,Playback(/var/lib/asterisk/sounds/leider_ist_zur_zeit_niemand_erreichbar)
exten => 2,4,Goto(capi-in,12345,20)
;----------------------------------------------------------------------------------
;handy-weiterleitung
;----------------------------------------------------------------------------------
exten => 4,1,Playback(/var/lib/asterisk/sounds/wir_werden_nun_versuchen_sie_zum_mobiltelefon_von)
exten => 4,2,Playback(/var/lib/asterisk/sounds/AndreasTopp)
exten => 4,3,Playback(/var/lib/asterisk/sounds/zu_verbinden)
exten => 4,4,Playback(/var/lib/asterisk/sounds/einen_moment_bitte)
Hier funktioniert selbiger Befehl wie oben nicht, warum?????
exten => 4,5,Dial(${OUTDEV}/12346:${ANDIHANDY}/b)
;exten => 4,7,Dial(${OUTDEV}/12346:${ANDIHANDY}/b,60,m[default])
exten => 4,6,GotoIf($[${DIALSTATUS}=ANSWER]?15:20)
exten => 4,15,Hangup()
exten => 4,20,Playback(/var/lib/asterisk/sounds/leider_ist_zur_zeit_niemand_erreichbar)
exten => 4,21,Goto(capi-in,12345,20)
;---------------------------------------------------------------------------------
;AB abfragen
;---------------------------------------------------------------------------------
exten => 0,1,Read(PASSWORD,,4)
exten => 0,2,GotoIf($[${PASSWORD}=1234]?10:20)
exten => 0,10,VoiceMailMain(s100)
exten => 0,11,Hangup()
exten => 0,20,Playback(/var/lib/asterisk/sounds/eingabe_inkorrekt)
exten => 0,21,Goto(capi-in,12345,20)
[localcalls]
;mailbox andi
exten => 10,1,Answer
exten => 10,2,Wait,1
exten => 10,3,VoiceMailMain(s100)
;andi intern
exten => 110,1,Answer
exten => 110,2,Dial(SIP/andi,600,m[default])
exten => 110,3,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?4:5)
exten => 110,4,Playback(/var/lib/asterisk/sounds/leider_ist_zur_zeit_niemand_erreichbar)
exten => 110,5,Hangup()
hier noch die capi.conf (ich nutze chan-capi)
;
; CAPI config
;
;
; general section
[general]
nationalprefix=0
internationalprefix=00
rxgain=1.0 ;linear receive gain (1.0 = no change)
txgain=1.0 ;linear transmit gain (1.0 = no change)
language=de ;set default language
;ulaw=yes ;set this, if you live in u-law world instead of a-law
;jb..... ;with Asterisk 1.4 you can configure jitterbuffer,
;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
; interface sections ...
[ISDN1] ;this example interface gets name 'ISDN1' and may be any
;name not starting with 'g' or 'contr'.
;Use one interface section for each isdn port!
;ntmode=yes ;if isdn card operates in nt mode, set this to yes
isdnmode=msn ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
;when using NT-mode, 'DID' should be set in any case
incomingmsn=* ;allow incoming calls to this list of MSNs/DIDs, * = any
;defaultcid=123 ;set a default caller id to that interface for dial-out,
;this caller id will be used when dial option 'd' is set.
;controller=0 ;ISDN4BSD default
;controller=7 ;ISDN4BSD USB default
controller=1 ;capi controller number of this interface/port
group=1 ;dialout group
;prefix=0 ;set a prefix to calling number on incoming calls
softdtmf=on ;enable/disable software dtmf detection, recommended for AVM cards
relaxdtmf=on ;in addition to softdtmf, you can use relaxed dtmf detection
faxdetect=off ;enable faxdetection and redirection to EXTEN 'fax' for incoming and/or
;outgoing calls. (default='off', possible values: 'incoming','outgoing','both')
accountcode= ;PBX accountcode to use in CDRs
;amaflags=default;AMA flags for CDR ('default', 'omit', 'billing', or 'documentation')
context=capi-in ;context for incoming calls
;holdtype=hold ;when the PBX puts the call on hold, ISDN HOLD will be used. If
;set to 'local' (default value), no hold is done and the PBX may
;play MOH.
;immediate=yes ;DID: immediate start of pbx with extension 's' if no digits were
; received on incoming call (no destination number yet)
;MSN: start pbx on CONNECT_IND and don't wait for SETUP/SENDING-COMPLETE.
; info like REDIRECTINGNUMBER may be lost, but this is necessary for
; drivers/pbx/telco which does not send SETUP or SENDING-COMPLETE.
;echosquelch=1 ;_VERY_PRIMITIVE_ echo suppression
;echocancel=yes ;EICON DIVA SERVER (CAPI) echo cancelation (yes=g165)
;(possible values: 'no', 'yes', 'force', 'g164', 'g165')
;echocancelold=yes ;use facility selector 6 instead of correct 8 (necessary for older eicon drivers)
;echotail=64 ;echo cancel tail setting (default=0 for maximum)
;echocancelnlp=1 ;activate non-linear-processing; this improves echo cancel ratio, but might
;incorporate variable gain in the signal path.
;bridge=yes ;native bridging (CAPI line interconnect) if available
;callgroup=1 ;PBX call group
;pickupgroup=1 ;PBX pickup group (which call groups are we allowed to pickup)
;language=de ;set language for this device (overwrites default language)
disallow=all ;RTP codec selection (valid with Eicon DIVA Server only)
allow=ulaw ;RTP codec selection (valid with Eicon DIVA Server only)
devices=2 ;number of concurrent calls (b-channels) on this controller
;(2 makes sense for single BRI, 30/23 for PRI/T1)
;jb..... ;with Asterisk 1.4 you can configure jitterbuffer,
;see Asterisk documentation for all jb* setting available.
;mohinterpret=default ;Asterisk 1.4: default music on hold class when placed on hold.
;qsig=on ;enable use of Q.SIG extensions.
ein tipp wäre super!
gruss,
andi