URGENTE - Configurar rota de entrada

1,614 views
Skip to first unread message

Kaipper

unread,
Jan 18, 2013, 10:16:19 AM1/18/13
to elasti...@googlegroups.com
 == Parsing '/etc/asterisk/res_pktccops.conf':   == Found
    -- Executing [s@from-pstn:1] NoOp("Khomp/B0C9-0.0", "No DID or CID Match") in new stack
    -- Executing [s@from-pstn:2] Answer("Khomp/B0C9-0.0", "") in new stack
    -- Executing [s@from-pstn:3] Wait("Khomp/B0C9-0.0", "2") in new stack
    -- Executing [s@from-pstn:4] Playback("Khomp/B0C9-0.0", "ss-noservice") in new stack
    -- <Khomp/B0C9-0.0> Playing 'ss-noservice.gsm' (language 'pt_BR')
    -- Executing [s@from-pstn:5] SayAlpha("Khomp/B0C9-0.0", "") in new stack
    -- Executing [s@from-pstn:6] Hangup("Khomp/B0C9-0.0", "") in new stack
  == Spawn extension (from-pstn, s, 6) exited non-zero on 'Khomp/B0C9-0.0'
    -- Executing [h@from-pstn:1] Macro("Khomp/B0C9-0.0", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Khomp/B0C9-0.0", "1?endmixmoncheck") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] NoOp("Khomp/B0C9-0.0", "End of MIXMON check") in new stack
    -- Executing [s@macro-hangupcall:10] GotoIf("Khomp/B0C9-0.0", "1?nomeetmemon") in new stack
    -- Goto (macro-hangupcall,s,15)
    -- Executing [s@macro-hangupcall:15] NoOp("Khomp/B0C9-0.0", "MEETME_RECORDINGFILE=") in new stack
    -- Executing [s@macro-hangupcall:16] GotoIf("Khomp/B0C9-0.0", "1?noautomon") in new stack
    -- Goto (macro-hangupcall,s,18)
    -- Executing [s@macro-hangupcall:18] NoOp("Khomp/B0C9-0.0", "TOUCH_MONITOR_OUTPUT=") in new stack
    -- Executing [s@macro-hangupcall:19] GotoIf("Khomp/B0C9-0.0", "1?noautomon2") in new stack
    -- Goto (macro-hangupcall,s,25)
    -- Executing [s@macro-hangupcall:25] NoOp("Khomp/B0C9-0.0", "MONITOR_FILENAME=") in new stack
    -- Executing [s@macro-hangupcall:26] GotoIf("Khomp/B0C9-0.0", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,29)
    -- Executing [s@macro-hangupcall:29] GotoIf("Khomp/B0C9-0.0", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,32)
    -- Executing [s@macro-hangupcall:32] GotoIf("Khomp/B0C9-0.0", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,34)
    -- Executing [s@macro-hangupcall:34] Hangup("Khomp/B0C9-0.0", "") in new stack
  == Spawn extension (macro-hangupcall, s, 34) exited non-zero on 'Khomp/B0C9-0.0' in macro 'hangupcall'
  == Spawn extension (from-pstn, h, 1) exited non-zero on 'Khomp/B0C9-0.0'



no LOG me aparece esse erro como farei.. HELP

Nathanael Darwin

unread,
Jan 18, 2013, 10:49:34 AM1/18/13
to elasti...@googlegroups.com
Como está configurado sua rota de entrada?


2013/1/18 Kaipper <original...@gmail.com>

--
 
---
Você está recebendo esta mensagem porque se inscreveu no grupo "ElastixBrasil" dos Grupos do Google.
Para postar neste grupo, envie um e-mail para elasti...@googlegroups.com.
Para cancelar a inscrição nesse grupo, envie um e-mail para elastixbrasi...@googlegroups.com.
Visite este grupo em http://groups.google.com/group/elastixbrasil?hl=pt-BR.
Para obter mais opções, acesse https://groups.google.com/groups/opt_out.
 
 

Kaipper

unread,
Jan 18, 2013, 12:19:59 PM1/18/13
to elasti...@googlegroups.com
esse é o problema estou tomando uma surra pra criar.

tenho um modulo ebs da khomp com 4 FXO e 8 FXS

de ramal pra ramal fala.
de ramal pra fora funciona
de fora pra dentro da problema.

Alclicio Vieira

unread,
Jan 18, 2013, 12:27:03 PM1/18/13
to elasti...@googlegroups.com
Qual é o problema,

Post os "sintomas"
--
ALCLICIO VIEIRA,
ITIL® V3 Certification,
Crea-DF 10476 Telecom

Phone:55 (61) 95277330 


Kaipper

unread,
Jan 18, 2013, 12:43:35 PM1/18/13
to elasti...@googlegroups.com

esse é o problema estou tomando uma surra pra criar.

tenho um modulo ebs da khomp com 4 FXO e 8 FXS

de ramal pra ramal fala.
de ramal pra fora funciona
de fora pra dentro da problema.




nao vai pra canto algum.JPG

Nathanael Darwin

unread,
Jan 18, 2013, 5:03:12 PM1/18/13
to elasti...@googlegroups.com
posta o arquivo de configuração da placa para vermos.
posta tambem sua tela de rotas de entrada.

Kaipper

unread,
Jan 20, 2013, 11:21:54 AM1/20/13
to elasti...@googlegroups.com
Arquivo extension.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;
; This file is part of FreePBX.
;
;    FreePBX is free software: you can redistribute it and/or modify
;    it under the terms of the GNU General Public License as published by
;    the Free Software Foundation, either version 2 of the License, or
;    (at your option) any later version.
;
;    FreePBX is distributed in the hope that it will be useful,
;    but WITHOUT ANY WARRANTY; without even the implied warranty of
;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;    GNU General Public License for more details.
;
;    You should have received a copy of the GNU General Public License
;    along with FreePBX.  If not, see <http://www.gnu.org/licenses/>.
;
; Copyright (C) 2004 Coalescent Systems Inc (Canada)
; Copyright (C) 2006 Why Pay More 4 Less Pty Ltd (Australia)
; Copyright (C) 2007 Astrogen LLC (USA)


;**************************  -WARNING-  ****************************************
;                                                                              *
; This include file is to be used with extreme caution. In almost all cases    *
; any custom dialplan SHOULD be put in extensions_custom.conf which will       *
; not hurt a FreePBX generated dialplan. In some very rare and custom          *
; situations users may have a need to override what FreePBX automatically      *
; generates. If so anything in this file will do that.  If you come up with a  *
; situation where you need to modify the existing dialplan or macro, please    *
; put it here and also notify the FreePBX development team so they can take it *
; into account in the future.                                                  *
;                                                                              *
#include extensions_override_freepbx.conf
;                                                                              *
;**************************  -WARNING-  ****************************************

; include extension contexts generated from AMP
#include extensions_additional.conf

; Customizations to this dialplan should be made in extensions_custom.conf
; See extensions_custom.conf.sample for an example.
; If you need to use [macro-dialout-trunk-predial-hook], [ext-did-custom], or 
; [from-internal-custom] for example, place these in this file or they will get overwritten.
;
#include extensions_custom.conf
[from-digital]
include => from-pstn

[from-analog]
include => from-dahdi

[from-trunk] ; just an alias since VoIP shouldn't be called PSTN
include => from-pstn

;editado por Thiago Kaipper
[from-pstn]
include => khomp-00-00
include => from-pstn-custom ; create this context in extensions_custom.conf to include customizations
include => ext-did
include => ext-did-post-custom
include => from-did-direct ; MODIFICATION (PL) for findmefollow if enabled, should be before ext-local
include => ext-did-catchall ; THIS MUST COME AFTER ext-did



;-------------------------------------------------------------------------------
; from-pstn-e164-us:
;
; The context is designed for providers who send calls in e164 format and is
; biased towards NPA calls, callerid and dialing rules. It will do the following:
;
;  DIDs in an NPA e164 format of +1NXXNXXXXXX will be converted to 10 digit DIDs
;
;  DIDs in any other format will be delivered as they are, including e164 non NPA
;  DIDs which means they will need the full format including the + in the inbound
;  route.
;
;  CallerID(number) presented in e164 NPA format will be trimmed to a 10 digit CID
;
;  CallerID(number) presented in e164 non-NPA (country code other than 1) will be
;  reformated from: +<CountryCode><Number> to 011<CountryCode><Number>
;
[from-pstn-e164-us]
exten => _+1NXXNXXXXXX/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _+1NXXNXXXXXX/_NXXNXXXXXX,2,Goto(from-pstn,${EXTEN:2},1)
exten => _+1NXXNXXXXXX/_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _+1NXXNXXXXXX/_011X.,n,Goto(from-pstn,${EXTEN:2},1)
exten => _+1NXXNXXXXXX,1,Goto(from-pstn,${EXTEN:2},1)
exten => _[0-9+]./_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => _[0-9+]./_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
exten => _[0-9+]./_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => _[0-9+]./_011X.,n,Goto(from-pstn,${EXTEN},1)
exten => _[0-9+].,1,Goto(from-pstn,${EXTEN},1)
exten => s/_+1NXXNXXXXXX,1,Set(CALLERID(number)=${CALLERID(number):2})
exten => s/_NXXNXXXXXX,n,Goto(from-pstn,${EXTEN},1)
exten => s/_+X.,1,Set(CALLERID(number)=011${CALLERID(number):1})
exten => s/_011X.,n,Goto(from-pstn,${EXTEN},1)
exten => s,1,Goto(from-pstn,${EXTEN},1)
;-------------------------------------------------------------------------------

;-------------------------------------------------------------------------------
; from-pstn-to-did
;
; The context is designed for providers who send the DID in the TO: SIP header
; only. The format of this header is:
;
;
; So the DID must be extracted between the sip: and the @, which this does
;
[from-pstn-toheader]
exten => _.,1,Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
;-------------------------------------------------------------------------------


; MODIFICATION (PL) 
;
; Required to assure that direct dids go to personal ring group before local extension.
; This could be auto-generated however I it is preferred to be put here and hard coded
; so that it can be modified if ext-local should take precedence in certain situations.
; will have to decide what to do later.
;
[from-did-direct]
include => ext-findmefollow
include => ext-local


; ############################################################################
; Macros [macro]
; ############################################################################

; Rings one or more extensions.  Handles things like call forwarding and DND
; We don't call dial directly for anything internal anymore.
; ARGS: $TIMER, $OPTIONS, $EXT1, $EXT2, $EXT3, ...
; Use a Macro call such as the following: 
;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)
[macro-dial]
exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial)
exten => s,n,SetMusicOnHold(${MOHCLASS})
exten => s,n(dial),AGI(dialparties.agi)
exten => s,n,NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS})

exten => s,n+2(normdial),Dial(${ds})                               ; dialparties will set the priority to 10 if $ds is not null
exten => s,n,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})})
exten => s,n,GosubIf($["${SCREEN}" != "" | "${DIALSTATUS}" = "ANSWER"]?${DIALSTATUS},1)

exten => s,20(huntdial),NoOp(Returned from dialparties with hunt groups to dial )
exten => s,n,Set(HuntLoop=0)
exten => s,n(a22),GotoIf($[${HuntMembers} >= 1]?a30)  ; if this is from rg-group, don't strip prefix
exten => s,n,NoOp(Returning there are no members left in the hunt group to ring)

; dialparties.agi has setup the dialstring for each hunt member in a variable labeled HuntMember0, HuntMember1 etc for each iteration
; and The total number in HuntMembers. So for each iteration, we will update the CALLTRACE Data.
;
exten => s,n+2(a30),Set(HuntMember=HuntMember${HuntLoop})
exten => s,n,GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $[$["${RingGroupMethod}" = "hunt" ] | $["${RingGroupMethod}" = "firstavailable"] | $["${RingGroupMethod}" = "firstnotonphone"]]]?a32:a35)

exten => s,n(a32),Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${HuntLoop} + 1])})
exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,n,Goto(s,a42)

;Set Call Trace for each hunt member we are going to call "Memory groups have multiple members to set CALL TRACE For" hence the loop
;
exten => s,n(a35),GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $["${RingGroupMethod}" = "memoryhunt" ]]?a36:a50)  
exten => s,n(a36),Set(CTLoop=0)
exten => s,n(a37),GotoIf($[${CTLoop} > ${HuntLoop}]?a42)  ; if this is from rg-group, don't strip prefix
exten => s,n,Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${CTLoop} + 1])})
exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,n,Set(CTLoop=$[1 + ${CTLoop}])
exten => s,n,Goto(s,a37)
        
exten => s,n(a42),Dial(${${HuntMember}}${ds})
exten => s,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?ANSWER,1)
exten => s,n,Set(HuntLoop=$[1 + ${HuntLoop}])
exten => s,n,GotoIf($[$[$["foo${RingGroupMethod}" != "foofirstavailable"] & $["foo${RingGroupMethod}" != "foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?a46)
exten => s,n,Set(HuntMembers=0)
exten => s,n(a46),Set(HuntMembers=$[${HuntMembers} - 1])
exten => s,n,Goto(s,a22)

exten => s,n(a50),DBdel(CALLTRACE/${CT_EXTEN})
exten => s,n,Goto(s,a42)

; For call screening
exten => NOANSWER,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
exten => NOANSWER,n,GotoIf($["${IVR_RETVM}" != "RETURN" | "${IVR_CONTEXT}" = ""]?bye)
exten => NOANSWER,n,Return
exten => NOANSWER,n(bye),Macro(hangupcall)
exten => TORTURE,1,Goto(app-blackhole,musiconhold,1)
exten => TORTURE,n,Macro(hangupcall)
exten => DONTCALL,1,Answer
exten => DONTCALL,n,Wait(1)
exten => DONTCALL,n,Zapateller()
exten => DONTCALL,n,Playback(ss-noservice)
exten => DONTCALL,n,Macro(hangupcall)
exten => ANSWER,1,Noop(Call successfully answered - Hanging up now)
exten => ANSWER,n,Macro(hangupcall,)

; make sure hungup calls go here so that proper cleanup occurs from call confirmed calls and the like
;
exten => h,1,Macro(hangupcall)

; get the voicemail context for the user in ARG1
[macro-get-vmcontext]
exten => s,1,Set(VMCONTEXT=${DB(AMPUSER/${ARG1}/voicemail)})
exten => s,2,GotoIf($["foo${VMCONTEXT}" = "foo"]?200:300)
exten => s,200,Set(VMCONTEXT=default)
exten => s,300,NoOp()

; For some reason, if I don't run setCIDname, CALLERID(name) will be blank in my AGI
; ARGS: none
[macro-fixcid]
exten => s,1,Set(CALLERID(name)=${CALLERID(name)})

; Ring groups of phones
; ARGS: comma separated extension list
; 1 - Ring Group Strategy
; 2 - ringtimer
; 3 - prefix
; 4 - extension list
[macro-rg-group]
exten => s,1,Macro(user-callerid,SKIPTTL) ; already called from ringgroup
exten => s,2,GotoIf($["${CALLERID(name):0:${LEN(${RGPREFIX})}}" != "${RGPREFIX}"]?4:3)  ; check for old prefix
exten => s,3,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}}) ; strip off old prefix
exten => s,4,Set(RGPREFIX=${ARG3})  ; set new prefix
exten => s,5,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})  ; add prefix to callerid name
exten => s,6,Set(RecordMethod=Group)  ; set new prefix
exten => s,7,Macro(record-enable,${MACRO_EXTEN},${RecordMethod})
exten => s,8,Set(RingGroupMethod=${ARG1})     ;
exten => s,9,Macro(dial,${ARG2},${DIAL_OPTIONS},${ARG4})
exten => s,10,Set(RingGroupMethod='')     ;


;
; Outgoing channel(s) are busy ... inform the client
; but use noanswer features like ringgroups don't break by being answered
; just to play the message.
;
[macro-outisbusy]
exten => s,1,Progress
exten => s,n,Playback(all-circuits-busy-now,noanswer)
exten => s,n,Playback(pls-try-call-later,noanswer)
exten => s,n,Macro(hangupcall)

; dialout and strip the prefix
[macro-dialout]
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,2,GotoIf($["${ECID${CALLERID(number)}}" = ""]?5) ;check for CID override for exten
exten => s,3,Set(CALLERID(all)=${ECID${CALLERID(number)}})
exten => s,4,Goto(7)
exten => s,5,GotoIf($["${OUTCID_${ARG1}}" = ""]?7) ;check for CID override for trunk
exten => s,6,Set(CALLERID(all)=${OUTCID_${ARG1}})
exten => s,7,Set(length=${LEN(${DIAL_OUT_${ARG1}})})
exten => s,8,Dial(${OUT_${ARG1}}/${ARG2:${length}})
exten => s,9,Playtones(congestion)
exten => s,10,Congestion(5)
exten => s,109,Macro(outisbusy)


; dialout using default OUT trunk - no prefix
[macro-dialout-default]
exten => s,1,Macro(user-callerid,SKIPTTL)
exten => s,2,Macro(record-enable,${CALLERID(number)},OUT)
exten => s,3,Macro(outbound-callerid,${ARG1})
exten => s,4,Dial(${OUT}/${ARG1})
exten => s,5,Playtones(congestion)
exten => s,6,Congestion(5)
exten => s,105,Macro(outisbusy)

[macro-dialout-trunk-predial-hook]
; this macro intentionally left blank so it may be safely overwritten for any custom
; requirements that an installation may have.
;
; MACRO RETURN CODE: ${PREDIAL_HOOK_RET}
;                    if set to "BYPASS" then this trunk will be skipped
;
exten => s,1,MacroExit()

[macro-user-logon]
; check device type
;
exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
; get user's extension
;
exten => s,n,Set(AMPUSER=${ARG1})
exten => s,n,GotoIf($["${AMPUSER}" != ""]?gotpass)
exten => s,n(playagain),Read(AMPUSER,please-enter-your-extension-then-press-pound,,,4)
; get user's password and authenticate
;
exten => s,n,GotoIf($["${AMPUSER}" = ""]?s-MAXATTEMPTS,1)
exten => s,n(gotpass),GotoIf($["${DB_EXISTS(AMPUSER/${AMPUSER}/password)}" = "0"]?s-NOUSER,1)
exten => s,n,Set(AMPUSERPASS=${DB_RESULT})
exten => s,n,GotoIf($[${LEN(${AMPUSERPASS})} = 0]?s-NOPASSWORD,1)
; do not continue if the user has already logged onto this device
;
exten => s,n,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)})
exten => s,n,GotoIf($["${DEVICEUSER}" = "${AMPUSER}"]?s-ALREADYLOGGEDON,1)
exten => s,n,Authenticate(${AMPUSERPASS})
exten => s,n,AGI(user_login_out.agi,login,${CALLERID(number)},${AMPUSER})
exten => s,n,Playback(vm-goodbye)

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged into)
exten => s-FIXED,n,Playback(ha/phone)
exten => s-FIXED,n,SayDigits(${CALLERID(number)})
exten => s-FIXED,n,Playback(is-curntly-unavail&vm-goodbye)
exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into 

exten => s-ALREADYLOGGEDON,1,NoOp(This device has already been logged into by this user)
exten => s-ALREADYLOGGEDON,n,Playback(vm-goodbye)
exten => s-ALREADYLOGGEDON,n,Hangup ;TODO should play msg indicated device is already logged into 

exten => s-NOPASSWORD,1,NoOp(This extension does not exist or no password is set)
exten => s-NOPASSWORD,n,Playback(pbx-invalid)
exten => s-NOPASSWORD,n,Goto(s,playagain)

exten => s-MAXATTEMPTS,1,NoOp(Too many login attempts)
exten => s-MAXATTEMPTS,n,Playback(vm-goodbye)
exten => s-MAXATTEMPTS,n,Hangup

exten => s-NOUSER,1,NoOp(Invalid extension ${AMPUSER} entered)
exten => s-NOUSER,n,Playback(pbx-invalid)
exten => s-NOUSER,n,Goto(s,playagain)

[macro-user-logoff]
; check device type
;
exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
exten => s,n,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1)
exten => s,n,AGI(user_login_out.agi,logout,${CALLERID(number)})
exten => s,n(done),Playback(vm-goodbye)

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged out of)
exten => s-FIXED,n,Playback(an-error-has-occured&vm-goodbye)
exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into 



; Privacy Manager Macro makes sure that any calls that don't pass the privacy manager are presented
; with congestion since there have been observed cases of the call continuing if not stopped with a 
; congestion, and this provides a slightly more friendly 'sorry' message in case the user is
; legitimately trying to be cooperative. 
;
; Note: the following options are configurable in privacy.conf:
;
; maxretries = 3 ; default value, number of retries before failing
; minlength = 10 ; default value, number of digits to be accepted as valid CID
;
[macro-privacy-mgr]
exten => s,1,Set(KEEPCID=${CALLERID(num)})
exten => s,n,GotoIf($["foo${CALLERID(num):0:1}"="foo+"]?CIDTEST2:CIDTEST1)
exten => s,n(CIDTEST1),Set(TESTCID=${MATH(1+${CALLERID(num)})})
exten => s,n,Goto(TESTRESULT)
exten => s,n(CIDTEST2),Set(TESTCID=${MATH(1+${CALLERID(num):1})})
exten => s,n(TESTRESULT),GotoIf($["foo${TESTCID}"="foo"]?CLEARCID:PRIVMGR)
exten => s,n(CLEARCID),Set(CALLERID(num)=)
exten => s,n(PRIVMGR),PrivacyManager(${ARG1},${ARG2})
exten => s,n,GotoIf($["${PRIVACYMGRSTATUS}"="FAILED"]?fail)
exten => s,n,GosubIf($["${CALLED_BLACKLIST}" = "1"]?app-blacklist-check,s,1)
exten => s,n,SetCallerPres(allowed_passed_screen); stop gap until app_privacy.c clears unavailable bit
exten => s,PRIVMGR+101(fail),Noop(STATUS: ${PRIVACYMGRSTATUS} CID: ${CALLERID(num)} ${CALLERID(name)} CALLPRES: ${CALLLINGPRES})
exten => s,n,Playback(sorry-youre-having-problems)
exten => s,n,Playback(goodbye)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,Hangup



; Text-To-Speech related macros
; These all follow common actions.  First try to playback a file "tts/custom-md5" 
; where "md5" is the md5() of whatever is going to be played. If that doesn't exist,
; try to playback using macro-tts-sayXXXXX (where XXXXX is text/digits/etc, same as
; the macro below). If that macro exits with MACRO_OFFSET=100, then it's done, 
; otherwise, fallback to the default asterisk method. 
;
; say text is purely for text-to-speech, there is no fallback
[macro-saytext]
exten => s,1,Noop(Trying custom SayText playback for "${ARG1}")
exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
; call tts-saytext. This should set MACRO_OFFSET=101 if it was successful
exten => s,n(tts),Macro(tts-saytext,${ARG1},${ARG2},${ARG3})
exten => s,n,Noop(No text-to-speech handler for SayText, cannot say "${ARG1}")
exten => s,n,Goto(done)
exten => s,tts+101,Noop(tts handled saytext)

; say name is for saying names typically, but fallsback to using SayAlpha
; (saying the word letter-by-letter)
[macro-sayname]
exten => s,1,Noop(Trying custom SayName playback for "${ARG1}")
exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
; call tts-sayalpha. This should set MACRO_OFFSET=101 if it was successful
exten => s,n(tts),Macro(tts-sayalpha,${ARG1},${ARG2},${ARG3})
exten => s,n,SayAlpha(${ARG1})
exten => s,n,Goto(done)
exten => s,tts+101,Noop(tts handled sayname)

; Say number is for saying numbers (eg "one thousand forty six") 
[macro-saynumber]
exten => s,1,Noop(Trying custom SayNumber playback for "${ARG1}")
exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
; call tts-saynumber. This should set MACRO_OFFSET=101 if it was successful
exten => s,n(tts),Macro(tts-saynumber,${ARG1},${ARG2},${ARG3})
exten => s,n,SayNumber(${ARG1})
exten => s,n,Goto(done)
exten => s,tts+101,Noop(tts handled saynumber)

; Say digits is for saying digits one-by-one (eg, "one zero four six")
[macro-saydigits]
exten => s,1,Noop(Trying custom SayDigits playback for "${ARG1}")
exten => s,n,Playback(tts/custom-${MD5(${ARG1})})
exten => s,n,GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done)
; call tts-saydigits. This should set MACRO_OFFSET=101 if it was successful
exten => s,n(tts),Macro(tts-saydigits,${ARG1},${ARG2},${ARG3})
exten => s,n,SayDigits(${ARG1})
exten => s,n,Goto(done)


;
; ############################################################################
; Inbound Contexts [from]
; ############################################################################

[from-sip-external]
; Yes. This is _really_ meant to be _. - I know asterisk whines about it, but 
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?checklang:noanonymous)
exten => s,n(checklang),GotoIf($["${SIPLANG}"!=""]?setlanguage:from-trunk,${DID},1)
exten => s,n(setlanguage),Set(CHANNEL(language)=${SIPLANG})
exten => s,n,Goto(from-trunk,${DID},1)
exten => s,n(noanonymous),Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup

[from-internal-xfer]
; applications are now mostly all found in from-internal-additional in _custom.conf
include => from-internal-custom
include => parkedcalls

; MODIFIED (PL)
;
; Currently the include for findmefollow is being auto-generated before ext-local which is the desired behavior.
; However, I haven't been able to do anything that I know of to force this. We need to determine if it should
; be hardcoded into here to make sure it doesn't change with some configuration. For now I will leave it out
; until we can discuss this.
;
include => ext-local-confirm
include => findmefollow-ringallv2
include => from-internal-additional
; This causes grief with '#' transfers, commenting out for the moment.
; include => bad-number
exten => s,1,Macro(hangupcall)
exten => h,1,Macro(hangupcall)

[from-internal]
include => from-internal-xfer
include => bad-number
exten=> _4XX,1,Dial(khomp/r${EXTEN})


; Configurado por Thiago Kaipper linhas a cima e abaixo 

;exten => s,1,Dial(khomp/r${401})
;include => from-pstn
;------------------------------------------------------------------------
; [macro-setmusic]
;------------------------------------------------------------------------
; CONTEXT:      macro-setmusic
; PURPOSE:      to turn off moh on routes where it is not desired
;
;------------------------------------------------------------------------
[macro-setmusic]
exten => s,1,NoOp(Setting Outbound Route MoH To: ${ARG1})
exten => s,2,Set(CHANNEL(musicclass)=${ARG1}) ; this won't work in 1.2 anymore, could fix in auto-generate if we wanted...
;------------------------------------------------------------------------

; ##########################################
; ## Ring Groups with Confirmation macros ##
; ##########################################
; Used by followme and ringgroups

;------------------------------------------------------------------------
; [macro-dial-confirm]
;------------------------------------------------------------------------
; This has now been incorporated into dialparties. It still only works with ringall
; and ringall-prim strategies. Have not investigated why it doesn't work with
; hunt and memory hunt.
;
;------------------------------------------------------------------------
[macro-dial-confirm]
; This was written to make it easy to use macro-dial-confirm instead of macro-dial in generated dialplans.
; This takes the same parameters, with an additional parameter of the ring group Number
; ARG1 is the timeout
; ARG2 is the DIAL_OPTIONS
; ARG3 is a list of xtns to call - 203-222-240-123123123#-211
; ARG4 is the ring group number

; This sets a unique value to indicate that the channel is ringing. This is used for warning slow
; users that the call has already been picked up.
;
exten => s,1,Set(DB(RG/${ARG4}/${CHANNEL})=RINGING)

; We need to keep that channel variable, because it'll change when we do this dial, so set it to
; fallthrough to every sibling.
;
exten => s,n,Set(__UNIQCHAN=${CHANNEL})

; The calling ringgroup should have set RingGroupMethod appropriately. We need to set two
; additional parameters:
;
; USE_CONFIRMATION, RINGGROUP_INDEX
;
; These are passed to inform dialparties to place external calls through the [grps] context
;
exten => s,n,Set(USE_CONFIRMATION=TRUE)
exten => s,n,Set(RINGGROUP_INDEX=${ARG4})
exten => s,n,Set(ARG4=) ; otherwise it gets passed to dialparties.agi which processes it (prob bug) 

exten => s,n,Macro(dial,${ARG1},${ARG2},${ARG3})

; delete the variable, if we are here, we are done trying to dial and it may have been left around
;
exten => s,n,Noop(DELETE KEY: RG/${RINGGROUP_INDEX}/${CHANNEL}: ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
exten => s,n,Set(USE_CONFIRMATION=)
exten => s,n,Set(RINGGROUP_INDEX=)
;------------------------------------------------------------------------


;------------------------------------------------------------------------
; [ext-local-confirm]
;------------------------------------------------------------------------
; If call confirm is being used in a ringgroup, then calls that do not require confirmation are sent
; to this extension instead of straight to the device.
;
; The sole purpose of sending them here is to make sure we run Macro(auto-confirm) if this
; extension answers the line. This takes care of clearing the database key that is used to inform
; other potential late comers that the extension has been answered by someone else.
;
; ALERT_INFO is deprecated in Asterisk 1.4 but still used throughout the FreePBX dialplan and
; usually set by dialparties.agi. This allows inheritance. Since no dialparties.agi here, set the
; header if it is set.
;
;------------------------------------------------------------------------
[ext-local-confirm]
exten => _LC-.,1,Noop(IN ext-local-confirm with - RT: ${RT}, RG_IDX: ${RG_IDX})
exten => _LC-.,n,GotoIf($["x${ALERT_INFO}"="x"]?godial)
exten => _LC-.,n,SIPAddHeader(Alert-Info: ${ALERT_INFO})
exten => _LC-.,n(godial),dial(${DB(DEVICE/${EXTEN:3}/dial)},${RT},M(auto-confirm^${RG_IDX})${DIAL_OPTIONS})

;------------------------------------------------------------------------
; [findmefollow-ringallv2]
;------------------------------------------------------------------------
; This context, to be included in from-internal, implements the PreRing part of findmefollow
; as well as the GroupRing part. It also communicates between the two so that if DND is set
; on the primary extension, and mastermode is enabled, then the other extensions will not ring
;
;------------------------------------------------------------------------
[findmefollow-ringallv2]
exten => _FMPR-.,1,Noop(In FMPR ${FMGRP} with ${EXTEN:5})
exten => _FMPR-.,n,Set(RingGroupMethod=)
exten => _FMPR-.,n,Set(USE_CONFIRMATION=)
exten => _FMPR-.,n,Set(RINGGROUP_INDEX=)
exten => _FMPR-.,n,Macro(simple-dial,${EXTEN:5},${FMREALPRERING})
exten => _FMPR-.,n,GotoIf($["${DIALSTATUS}" != "BUSY"]?nodnd)
exten => _FMPR-.,n,Set(DB(FM/DND/${FMGRP}/${FMUNIQUE})=DND)
exten => _FMPR-.,n(nodnd),Noop(Ending FMPR ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS})
exten => _FMPR-.,n,Hangup()

exten => _FMGL-.,1,Noop(In FMGL ${FMGRP} with ${EXTEN:5})
exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd)
exten => _FMGL-.,n,Wait(1)
exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd)
exten => _FMGL-.,n,Wait(1)
exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd)
exten => _FMGL-.,n,Wait(${FMPRERING})
exten => _FMGL-.,n,GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd)
exten => _FMGL-.,n,DBDel(FM/DND/${FMGRP}/${FMUNIQUE})
exten => _FMGL-.,n(dodial),Macro(dial,${FMGRPTIME},${DIAL_OPTIONS},${EXTEN:5})
exten => _FMGL-.,n,Noop(Ending FMGL ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS})
exten => _FMGL-.,n,Hangup()
exten => _FMGL-.,n+10(dodnd),DBDel(FM/DND/${FMGRP}/${FMUNIQUE})
exten => _FMGL-.,n,GotoIf($["${FMPRIME}" = "FALSE"]?dodial)
exten => _FMGL-.,n,Noop(Got DND in FMGL ${FMGRP} with ${EXTEN:5} in ${RingGroupMethod} mode, aborting)
exten => _FMGL-.,n,Hangup()

;------------------------------------------------------------------------
; [block-cf]
;------------------------------------------------------------------------
; This context is set as a target with FORWARD_CONTEXT when Call Forwarding is set to be
; ignored in a ringgroup or other features that may take advantage of this. Server side
; CF is done in dialparties.agi but if a client device forwards a call, it will be caught
; and blocked here.
;------------------------------------------------------------------------
[block-cf]
exten => _X.,1,Noop(Blocking callforward to ${EXTEN} because CF is blocked)
exten => _X.,n,Hangup()

;------------------------------------------------------------------------


;this is where parked calls go if they time-out.  Should probably re-ring
[default]
include => ext-local
exten => s,1,Playback(vm-goodbye)
exten => s,2,Macro(hangupcall)


;editado por Thiago Kaipper
 
[khomp-00]
exten=> s,1,Dial(khomp/b0c9/${EXTEN})
exten => s,n,Hangup 

#include extension_a2billing_additionals.conf

_____________________________________________________________________________________________________
Arquivo khomp.conf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;; This is the configuration file for the Khomp ;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;; channel version 4.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;
;;;; Section for main configurations about channels.
;;;;

[channels]

;;
;; Enable/disable the dial string compatibility with DAHDI in Dial string form,  
;; if enabled all Khomp dial will use the dial string like DAHDI.
;;
;; possible syntaxes:
;;
;; Dial(Khomp/<channel#>[c|r<cadence#>|d]/<extension>)
;; Dial(Khomp/(g|G|r|R)<group#>[c|r<cadence#>|d]/<extension>)
;; Dial(Khomp/i<span#>/<extension>)
;;
;; (default = no)

; dial-string-like-dahdi = no

;;
;; Defines the behaviour of the module load function if communication to
;; Khomp boards and/or devices cannot be started. Possible values:
;;
;;  failure - Return failure and halts Asterisk execution.
;;     skip - Skips loading this module.
;;
;; (default = failure)

load-error = skip

;;
;; Enable/disable generalized echo cancellation in the channel, for calls
;; passing inside Asterisk (disabled for bridged calls).
;;
;; (default = yes)

; echo-canceller = yes

;;
;; Enable/disable AGC (auto gain control). Should be used carefully, as it
;; can make line noise really loud.
;;
;; (default = no)

; auto-gain-control = no

;;
;; Enable/disable sending DTMFs out-band as a way to pass detected DTMFs to
;; Asterisk. Needed if Asterisk generates digits for us in Dial (option 'D')
;; or is being used for IVR ("URA", in pt_BR).
;;
;; (default = yes)

; out-of-band-dtmfs = yes

;;
;; Enable/disable DTMF suppression. WARNING: If you disable this, DTMFs will
;; not be suppressed anymore! You should only use this option if you know what
;; you are doing.
;;
;; (default = yes)

; dtmf-suppression = yes

;;
;; Adjust connection automagically if a FAX tone is detected.
;;
;; (default = yes)

; auto-fax-adjustment = yes

;;
;; Time (is seconds) since connection, when we may detect FAX tone and perform
;; automagical adjustment. After this, FAX tone detection is ignored.
;;
;; Possible values: 0 - 9999
;;
;; (default = 30).


; fax-adjustment-timeout = 30

;;
;; Enable/disable pulse detection (reported as DTMF digits).
;;
;; (default = no)

; pulse-forwarding = no

;;
;; Enable correct standard following for R2/MFC protocol.
;;
;; NOTE: This option is disabled by default as R2 protocol timeout for condition
;; reporting is only 7 seconds, and for correct operation we need to send a
;; fake "Line Free" condition if Asterisk is used in the midle of two R2 links
;; (forwarding calls from one to another) or if incoming calls may take long to
;; receive RINGING or BUSY status.
;;
;; You can set this to "yes" to have a correct behaviour for condition
;; obtaining/reporting, but only if Asterisk is directly connected to a CO (central
;; office) or a fast signaling PBX, or incoming calls are handled quickly enogth by
;; dialplan logic - IOW, you must GUARANTEE there will be no more than 7 seconds from
;; call arrival to call progress reporting.
;;
;; (default = no)

; r2-strict-behaviour = no

;;
;; Set the delay (in ms) after sending ringback condition where audio stream
;; should be opened for the channel. Limited to 25ms minimum, 500ms maximum.
;;
;; (default = 250)

; r2-preconnect-wait = 250

;;
;; Chooses the method for disconnecting calls on the R2/MFC protocol.
;;
;; NOTE: This option is adjusted to "force-disconnect" by default, as disconnecting
;; incoming calls in the standard way may result in 90 seconds delay for releasing the
;; timeslot, thus leading to an under-utilization of the available lines. This option
;; is non-ITU.T, but allowed by Brazillian variant of R2/MFC.
;;
;; This option can be changed to "release" for a more agressive disconnect method, if
;; the "force-disconnect" is not releasing calls fast enought, or to "disconnect" for
;; attaining strictly to the international R2 standard.
;;
;; WARNING: Do not use the option 'release' unless you really know what you are doing!
;;          This option instructs the channel to have a complete non-standard behaviour,
;;          which could result in signaling errors for the remote site.
;;
;; Available options:
;;
;;   force-disconnect      Use force disconnection               (signals AB as '00')
;;   disconnect            Use standard disconnection            (signals AB as '11')
;;   release               Release the channel w/o disconnecting (signals AB as '10')
;;
;; (default = "force-disconnect")

; r2-hangup-behaviour = force-disconnect

;;
;; Defines the incoming context for calls on E1 channels. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD-LL)

context-digital = from-pstn

;;
;; Defines the incoming context for calls on FXS channels. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD-CC)


context-fxs = from-internal

;;
;; Defines the "alternative" context for calls on FXS channels, which will be
;; checked if the main context does not match for a call. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD)

; context-fxs-alt = khomp-DD

;;
;; Defines the incoming context for calls on FXO channels. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD-CC)

;   Editado por Thiago Kaipper
context-fxo = from-pstn

;;
;; Defines the "alternative" context for calls on FXO channels, which will be
;; checked if the main context does not match for a call. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD)

; context-fxo-alt = khomp-DD

;;
;; Defines the incoming context for calls on GSM channels. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD-CC)

context-gsm-call = from-pstn

;;
;; Defines the "alternative" context for calls on GSM channels, which will be
;; checked if the main context does not match for a call. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD)

; context-gsm-call-alt = khomp-DD

;;
;; Defines the incoming context for messages on GSM channels. Some wildcards are
;; accepted, and described in the bottom of this file.
;;
;; (default = khomp-sms-DD-CC)

; context-gsm-sms = khomp-sms-DD-CC

;;
;; Defines the incoming context for execution of a waiting call on GSM channels,
;; used when some KGSM channel is already handling calls and another incoming
;; call arrives in the same channel.
;;
;; The channel type used for execution is a special Khomp_Wait channel, which
;; does not have any audio nor can be answered/dialed. Some wildcards are
;; accepted on the context name, and described in the bottom of this file.
;;
;; Use "none" for disabling this feature.
;;
;; (default = khomp-wait-DD-CC)

; context-gsm-wait = khomp-wait-DD-CC

;;
;; Defines the incoming context for calls on Passive Record boards (KPR). Some
;; wildcards are accepted, and described in the bottom of this file.
;;
;; (default = khomp-DD-CC)

; context-pr = khomp-DD-CC

;;
;; Set the logging of messages to console. Possible values (to set more than one,
;; separate the values with comma):
;;
;;  errors    -- Error messages, when something goes really wrong.
;;  warnings  -- Warnings, used when something might not be going as expected.
;;  messages  -- Generic messages, used to indicate some information.
;;  events    -- Show received K3L events as console messages.
;;  commands  -- Show sent K3L commands as console messages.
;;  audio     -- Enable messages for K3L audio events (very verbose!).
;;  modem     -- Enable messages for data received from KGSM modems.
;;  link      -- Enable logging of link status changes.
;;  standard  -- Special, enable default messages (RECOMMENDED).
;;  all       -- Special, enable ALL messages (should not be used naively).
;;
;; (default = standard)

; log-to-console = standard

;;
;; Set the logging of messages to disk. Possible values (to set more than one,
;; separate the values with comma):
;;
;;  errors        -- Error messages, when something goes really wrong.
;;  warnings      -- Warnings, used when something might not be going as expected.
;;  messages      -- Generic messages, used to indicate some information.
;;  events        -- Record received K3L events as log messages.
;;  commands      -- Record sent K3L commands as log messages.
;;  audio         -- Enable messages for K3L audio events (very verbose!).
;;  modem         -- Enable messages for data received from KGSM modems.
;;  link          -- Enable logging of link status changes.
;;  functions     -- Enable debugging for functions. Should not be used naively!
;;  threads       -- Enable debugging for threads. Should not be used naively!
;;  locks         -- Enable debugging for locks. Should not be used naively!
;;  stream-notice -- Enable debugging for stream changes, failures, overruns, underruns.
;;                   Should not be used naively!
;;  stream-debug  -- Enable debugging for streams (DO NOT USE THIS!).
;;
;;  standard  -- Special, enable default messages (RECOMMENDED).
;;  debugging -- Special, enable debug messages (should not be used naively).
;;  all       -- Special, enable ALL messages (DO NOT USE THIS!).
;;
;; (default = standard)

; log-to-disk = standard

;;
;; Set output volume level. Possible values:
;;
;;   * '+ N' = increase N times;
;;   * '- N' = decrease N times.
;;   *   '0' = leave default.
;;
;; (default = 0)

;editado por Thiago Kaipper

 output-volume = +2

;;
;; Set input volume level. Can only be used if AGC (and not pulse detection)
;; is enabled on the board configuration. Possible values:
;;
;;   * '+ N' = increase N times;
;;   * '- N' = decrease N times.
;;   *   '0' = leave default.
;;
;; (default = 0)

;editado por Thiago Kaipper

; input-volume = +2

;;
;; Sets the default AMA flags, affecting the categorization of entries in the
;; call detail records.
;;
;; (default = default)

; amaflags = default

;;
;; Defines call groups for calls of all channel.
;;
;; (default = 0)

; callgroup = 0

;;
;; Set the default group that can pickup fellow workers' calls.
;;
;; (default = 0)

; pickupgroup = 0

;;
;; Sets the account code for calls placed on the channel. The account code may
;; be any alphanumeric string.
;;
;; (default = <empty>)

; accountcode = 

;;
;; Set the language of the channel (useful for selecting audio messages of a
;; specific language on answer).
;;
;; (default = <empty>)

;editado por Thiago Kaipper

 language = pt_BR

;;
;; Set the music on hold class of the channel (useful for selecting a group of
;; songs to play on hold).
;;
;; (default = default)

; mohclass = default

;;
;; Sets the CallerID detection type for FXO boards using Asterisk(r) interface.
;;
;; NOTE: This option is not used for BINA DTMF, which is detected by the
;;       board DSPs, and is always enabled.
;;
;; Possible values:
;;
;;  bell     Bell FSK standard
;;  v23      V23 FSK standard
;;  none     Disable the detection
;;
;; (default = bell)

; fxo-fsk-detection = bell

;; Sets the timeout for CallerID detection (is ms).
;;
;; (default = 2000)

; fxo-fsk-timeout = 2000

;;
;; Sets the amount of time to wait before sending FLASH command on KUserTransfer
;; application. Possible values are between 500 and 5000 miliseconds.
;;
;; (default = 1000)

; fxo-user-xfer-delay = 1000

;;
;; Sets the global orig (CALLERID) base for FXS boards. This number is added
;; to a sequencial number, which is incremented for each FXS board and FXS
;; channel in the system.
;;
;; For more example of how to use this option, see channel README file,
;; section 'Opcoes do application Dial', item 'Dial(Khomp/r304)'.
;;
;; (default = 00)

;editado por Thiago Kaipper

fxs-global-orig = 401

;;
;; Enable or disable sending originator number throught BINA DTMF signalization
;; to a FXS branch during call setup.
;; (default = no)

; fxs-send-bina-dtmf = no

;;
;; Enable or disable sending originator number throught FSK signalization to a
;; FXS branch during call setup.
;; (default = no)

; fxs-send-fsk = no

;;
;; Enables/disables the use of sharp (#) as an end-of-number digit for immediate
;; dialing. This does not affect special numbers which start on sharp, like '#8'.
;;
;; (default = no)

; immediate-sharp-dial = no

;;
;; Sets the numbers (separated by comma) in which the standard dialtone will
;; be changed to CO dialtone (central office tone) when they are pressed.
;;
;; (default = <empty>)

; co-dialtone-digits = 0,90

;;
;; Sets the cadence name for standard dialtone (PBX dialtone by default).
;;
;; (default = std-dialtone)

; dialtone-cadence = pbx-dialtone

;;
;; Sets the cadence name for voicemail dialtone, used for the branch
;; associated with an user when he/she has voicemail.
;;
;; (default = vm-dialtone)

; vm-dialtone-cadence = vm-dialtone

;;
;; Sets the cadence name for CO dialtone.
;;
;; (default = co-dialtone)

; co-dialtone-cadence = co-dialtone

;;
;; This is the delay time to really disconnect a channel after the disconnect
;; event arrive. If a connect event comes up in this interval, then the
;; disconnection is ignored and the call keeps going on. Values are in
;; miliseconds.
;;
;; (default = 0)

; disconnect-delay = 0

;;
;; This timer controls the delay associated with ringback generation in the
;; Khomp channel, when the other side *does not send audio* - in other words,
;; this is used when calling peers located at VoIP channels.
;; Values are in milliseconds.
;;
;; (default = 1500)

; delay-ringback-co = 1500

;;
;; This timer controls the delay associated with ringback generation in the
;; Khomp channel when the other side report a continuous stream of audio in
;; silence - in other words, this is used when the audio is present but does
;; not have any tone. Values are in milliseconds.
;;
;; (default = 2500)

; delay-ringback-pbx = 2500

;;
;; Defines if the channel should optimize audio delay by droping longstanding
;; packets from audio buffer. This guarantees the minimal audio delay for the
;; user, and avoid delays associated with miscoded SIP clients. However,
;; depending on the system's scheduling policy (some 2.6 kernel releases),
;; this may result on excessive drop of packets, and audible audio skipping.
;; This should not be changed naively.
;;
;; (default = no)

; optimize-audio-path = no

;;
;; Defines the way audio RX synchorization is handled.
;;
;; Possible values:
;;
;;  softtimer-thread        -  Creates a thread which signals all channels for
;;                             pending data each (audio-packet-length/8) ms.
;;                             Default mode of operation, works on virtually any
;;                             system using default configuration.
;;
;;  softtimer-multi-thread  - Same as above, but creates one thread for each
;;                            device (board or module).
;;
;;  softtimer-kernel        - Available for kernel 2.6.22+ and {g,eg}libc 2.7+,
;;                            uses timerfd syscalls for creating timers for
;;                            synchronizing the audio stream reported to Asterisk.
;;
;;  auto (default)          - Selects best method for synchronization, currently just
;;                            sets the option for 'softtimer-thread'.

; audio-rx-sync = auto

;;
;; Defines if the channel should ignore some uncommon DTMF digits detected by
;; the board (A, B, C and D). This reduces the number of false positives which
;; may happen sometimes, without affecting correctness on traditional scenarios.
;; However, if you need to pass those digits througth the board, you may need
;; to set this option to 'no'.
;;
;; (default = yes)

; ignore-letter-dtmfs = yes

;;
;; For KFXO boards, defines if audio will be allowed being sent into outgoing
;; calls before it has been answered.
;;
;; (default = yes)

; fxo-send-pre-audio = yes

;;
;; When there is a request to indicate busy for an incoming KFXO call, the
;; ringing channel is taken off hook and then placed on hook, so it now goes
;; to answered state and we can send audio throught the line.

;; If the off/on hook time interval is too short, the PSTN may ignore it, and
;; keep the line in a ringing state. If it is too long, the call may be charged.
;; The option below defines the delay between the line being answered and being
;; disconnected, in miliseconds (from 50ms to 90000ms).
;;
;; (default = 1250)

; fxo-busy-disconnection = 1250

;;
;; Defines the timeout, in seconds, between digits of a FXS board's extension.
;;
;; (default = 7)

; fxs-digit-timeout = 7

;;
;; Enables/Disables the action of dropping collect calls. If enabled, all
;; collect calls will be dropped no matter what KDropCollectCall is set to.
;; This feature is not available for KGSM-USB devices.
;;
;; (default = no)

; drop-collect-call = no

;;
;; Defines the length (in BYTES) for A-Law audio packets sent to Asterisk. Can
;; be used to change the packet size for applications and/or channels that need
;; fixed-sized data at a specific size (e.g.: iaxmodem, some SIP devices).
;; DO NOT CHANGE THIS OPTION NAIVELY, AS IT MAY RESULT IN UNDESIRED DELAY DUE
;; TO EXTRA BUFFERING NEEDED FOR PACKET SIZE CONVERSION.
;;
;; Some useful values:
;;
;;  16 ms => 128 bytes (default, no extra buffering needed)
;;
;;  10 ms =>  80 bytes (minimum)
;;  20 ms => 160 bytes
;;  30 ms => 240 bytes (maximum)
;;
;;  Minimum step is 8 bytes (1ms).

; audio-packet-length = 128

;;
;; Defines if the activation and deactivation of Kommuter is done automatically by
;; the channel, or manually by the user. Possible values:
;;
;; auto     -- Khomp channel driver starts all kommuter devices at initialization
;;             and stops them if the module is unloaded.
;;
;; manual   -- The user must explicity call the CLI command < khomp kommuter on/off >,
;;             that starts or stops the kommuter devices connected to this machine.
;;
;; (default = auto)

; kommuter-activation = auto

;;
;; Defines the default value for the Kommuter watchdog in seconds.
;; All kommuters conected to this machine will be initialized with this value,
;; and will commute the links after reaching this time with no response of the channel.
;; The minimum is 0 (will never commute the links), and maximum value is 255 seconds.
;;
;; (default = 10)

; kommuter-timeout = 10

;;
;; When adjusted to some DTMF digit sequence, it will define those as the digits
;; to be used to initialize a call transfer using PBX-to-PBX signaling.
;;
;; (default = empty)

; user-transfer-digits =

;;
;; When enabled, this channel will be elegible for transfer using PBX-to-PBX signaling
;; if the underlying signalization supports this feature (ISDN, Line Side, CAS EL7,
;; E1 LC, or FXO signalings).
;;
;; (default = yes)

; user-transfer-enable = yes

;;
;; Defines the facility used by the ISDN protocol for QSig transfers. Possible values:
;;
;; qsig-ct    Use QSig CT transfer (preferred method).
;; qsig-ssct  Use QSig SSCT transfer.
;; any        Use any method.
;; none       Do not transfer ISDN calls.
;;
;; (default = qsig-ct)

; qsig-transfer-facility = qsig-ct

;;
;; Defines the flash behaviour: attended transfer or pendulum.
;;
;; Possible values:
;;
;; xfer      Use atxfer option from features.conf.
;; pendulum  Use pendulum (if enabled).
;; auto      If enabled, use pendulum, if not, use xfer.
;;
;; (default = xfer)

;; flash-behaviour = xfer

;;
;; Defines the DTMF digit sequence used to answer a waiting call (placing the current
;; on hold), place the active call on hold and start a new outgoing call, and to
;; alternate between answered calls.
;;
;; (default = empty)

; pendulum-digits =

;; Defines the channels where the pendulum feature for outgoing will be enabled automatically.
;;
;; Possible values:
;;
;; none   No channel will have the feature by default.
;; fxs    Enable the feature for FXS channels only.
;; all    All channels will have the feature.
;;
;; (default = fxs)

; pendulum-native = fxs

;; Defines the channels where the pendulum feature for incoming will be enabled automatically
;; (removing the need to use "@" in the Dial string for activation).
;;
;; Possible values:
;;
;; none   No channel will have the feature by default.
;; fxs    Enable the feature for FXS channels only.
;; all    All channels will have the feature.
;;
;; (default = fxs)
;;
;; NOTE: In case of signallings or technologies where a single channel does not
;;       necessarily corresponds to a specific user or destination, the "@"
;;       notation is needed for specifying the destination number to the
;;       allocation procedures. For more info, please check the Manual.

; pendulum-incoming = fxs

;; Defines the timeout for an waiting call to stay in the ringing state without being
;; answered. After this, the waiting call is dropped, and the waiting cadence is stopped.
;;
;; (default = 20000ms)

; pendulum-timeout = 20000

;; Defines if channels should be enabled or not. Useful in specific channel sections.
;; Use for debugging purpouses only, not recommended for production environments.
;;
;; (default = yes)

; enabled = yes

;;;;;;;;;;;;;;;;;;;;;; CONTEXTS WILDCARDS ;;;;;;;;;;;;;;;;;;;;;;
;;
;; For incoming contexts, you can use the following wildcards:
;;
;; 'DD' (device number): the sequence number of the board on the
;; system (can be checked using "khomp summary", valid for all
;; board models);
;;
;; 'LL' (link number): the sequence number of link where the call
;; has arrived on the board. valid only for E1 boards.
;;
;; 'SSSS' (serial number): the serial number of the board (can
;; be checked using "khomp summary", and it's valid for all
;; board models);
;;
;; 'CC' (channel number): the channel number on which the call
;; or message has arrived (valid for FXO, FXS and GSM boards);
;;
;; 'CCC' (channel number): same as above, but valid only for E1
;; channels;
;;

;;;;
;;;; Section for configuring allocation groups.
;;;;

[groups]

;; In this section, you should define options using the following syntax:
;;
;; <groupname> = <allocation-string>[:<context>]
;;
;; ex: 'pstn = b0l0 + b1c38' (without quotes)
;; ex: 'pstn = b0l0 + b1c38:from-pstn' (without quotes)
;;
;; You may define your own groups. In the example above, the group
;; called pstn can be used in the Dial string as Dial(Khomp/Gpstn/...)
;; or Dial(Khomp/gpstn/...). As a result, the allocation string will be
;; replaced with the one associated with the group "pstn". This is the same
;; of doing Dial(Khomp/b0l0 + b1c38/...).
;; In the second example, a context is also defined which can be used in
;; extensions.conf for inbound calls on that allocation string's range.
;;
;; If choose compatibily mode like DAHDI in compatibily session, your 
;; groups must follow the syntax:
;; <groupname> = <channel#>-<channel#>[:<context>] | <channel#>, <channel#>[:<context>]
;; 
;; ex: '1 = 1-30' (without quotes)
;; ex: '1 = 1,2,3,4-10:from-pstn' (without quotes)
;;
;; Or if no group was added, the groups for compatibily mode like DAHDI will be set automatically   
;; with full range of channels at the each board/link, and each board/link will be a group,
;; per example, for a E1 only  board, will be generated two groups, first with a 1 to 30 channels (link 1), and   
;; second group of 31 to 60 channels (link 2).

;;;;
;;;; Section for configuring cadences used on FXS boards and the whole
;;;; channel (fast busy, ringback tones, etc).
;;;;

[cadences]

;; Default value for cadences. You may define your own cadences, and
;; also use them in the Dial arguments as "ring_cadence=your_cadence_name".
;;
;; "0,0" means a continuous dialtone, only valid for audio generation
;; (i.e. cannot be used for ringing an FXS channel).
;;
;; (default as defined below, independent of compatibility mode,
;; and only to be used in Dial arguments)

; co-dialtone  = 0,0
; vm-dialtone  = 1000,100,100,100
; pbx-dialtone = 1000,100
; fast-busy    = 100,100
; ringback     = 1000,4000
; waiting-call = 100,100,100,3700
; ring         = 1000,4000

;; If choose compatibily mode like DAHDI in compatibility session, the 
;; cadences must be a sequential number starts by 1, to be used in dial string.
;;
;; ex: Dial(Khomp/1r1/9901)
;; 
;; Note: Negative values are not accepted, to configuring where the caller ID spill is
;; to be placed, use the properly configuration section.
;;
;; (default as defined below)

; 1 = 125, 125, 2000, 4000
; 2 = 250, 250, 500, 1000
; 3 = 125, 125, 125, 125
; 4 = 1000, 500, 2500, 5000

;;;;
;;;; Section for configuring CALLERID's associated with FXS boards.
;;;;

[fxs-branches]

;; conf ramal



;; In this section, you should define options using the following syntax:
;;
;; 'orig_prefix = serial number 0, serial number 1, ...'
;;
;; ex: '800 = 1234,4535' (without quotes)
;;
;; In the example above (assuming KFXS-SPX boards 1234 and 4535), the
;; branches will be numbered from 800 to 829 in board 1234, and from
;; 830 to 859 in board 4535.

;;;;
;;;; Section for configuring FXS hotlines.
;;;;

[fxs-hotlines]

;; In this section, you should define options using the following syntax:
;;
;; 'orig_prefix = destination_number'
;;
;; ex: '804 = 32332933' (without quotes)
;;
;; In the example above, the branch numbered 804 will call the number
;; 3233-2933 (Khomp support number) every time the FXS branch goes off hook.

;;;
;;; Section for configuring specific options for FXS branches.
;;;

[fxs-options]


;; In this section, you should define options using the following syntax:
;;
;; 'orig_prefix = option1:value | option2:value | option3:value' ...
;;
;; ex: '804 = pickupgroup:1,4-15 | output-volume:+2' (without quotes)
;;
;; In the example above, the branch numbered 804 will have specific
;; configuration for 'pickupgroup' and default output volume set to +2.
;;
;; Possible values to options is:
;; pickupgroup, callgroup, context, input-volume, output-volume language,
;; mohclass, amaflags, accountcode, calleridnum, calleridname, mailbox.
______________________________________________________________________________________________________________________________



Reply all
Reply to author
Forward
0 new messages