No puedo llamar al exterior

Discussion in 'Elastix 2.x' started by ckinoto, Mar 25, 2009.

  1. ckinoto

    Joined:
    Mar 13, 2009
    Messages:
    10
    Likes Received:
    0
    Hace 24 hors dejo de funcionar el 0 para tono para llamadas al exterior
    tampoco funciona las llamas entrantes suenan y al contestar no se escucha nada.
    esta es mi configuracion:

    zapata.conf



    [trunkgroups]

    [channels]
    context=from-pstn
    signalling=fxs_ks
    rxwink=300 ; Atlas seems to use long (250ms) winks
    usecallerid=yes
    hidecallerid=no
    callwaiting=yes
    usecallingpres=yes
    callwaitingcallerid=yes
    threewaycalling=yes
    transfer=yes
    canpark=yes
    cancallforward=yes
    callreturn=yes
    echocancel=yes
    echocancelwhenbridged=no
    faxdetect=incoming
    echotraining=800
    rxgain=0.0
    txgain=0.0
    callgroup=1
    pickupgroup=1
    overlapdial=enable

    ;Uncomment these lines if you have problems with the disconection of your analog lines
    ;busydetect=yes
    ;busycount=3


    immediate=yes

    #include zapata_additional.conf
    #include zapata-channels.conf
    context_lines=from-zaptel





    zapata-channels.conf

    ; Autogenerated by /usr/sbin/genzaptelconf -- do not hand edit
    ; Zaptel Channels Configurations (zapata.conf)
    ;
    ; This is not intended to be a complete zapata.conf. Rather, it is intended
    ; to be #include-d by /etc/zapata.conf that will include the global settings
    ;

    ; Span 1: WCTDM/0 "Wildcard TDM410P Board 1" (MASTER)
    ;;; line="3 WCTDM/0/2 FXSKS (In use)"
    signalling=fxs_ks
    callerid=asreceived
    group=0
    context=from-pstn
    channel => 3
    context=default




    extensions_custom.conf



    ; This file contains the contexts the agents login for the module call center.
    ; and contains the context conferences for module conferences of elastix 1.0.

    exten => 0,1,Playback(start-dial-after-dialtone)
    exten => 0,2,Dial(ZAP/3/{EXTEN})
    exten => 0,3,Hangup

    [from-internal-custom]
    exten => 1234,1,Playback(demo-congrats) ; extensions can dial 1234
    exten => 1234,2,Hangup()
    exten => h,1,Hangup()
    include => agentlogin
    include => conferences
    include => calendar-event

    [agentlogin]
    exten => _*8888.,1,Set(AGENTNUMBER=${EXTEN:5})
    exten => _*8888.,n,NoOp(AgentNumber is ${AGENTNUMBER})
    exten => _*8888.,n,AgentLogin(${AGENTNUMBER})
    exten => _*8888.,n,Hangup()

    [mm-announce]
    exten => 9999,1,Set(CALLERID(name)="MMGETOUT")
    exten => 9999,n,Answer
    exten => 9999,n,Playback(conf-will-end-in)
    exten => 9999,n,Playback(digits/5)
    exten => 9999,n,Playback(minutes)
    exten => 9999,n,Hangup

    [conferences]
    ;Used by cbEnd script to play end of conference warning
    exten => 5555,1,Answer
    exten => 5555,n,Wait(3)
    exten => 5555,n,CBMysql()
    exten => 5555,n,Hangup

    [calendar-event]
    exten => _*7899,1,Answer
    exten => _*7899,2,Playback(${FILE_CALL})
    exten => _*7899,3,Wait(2)
    exten => _*7899,4,Hangup()

    [parkedcalls]
    exten => 70,1,Answer
    exten => 70,2,SetMusicOnHold(default)
    exten => 70,3,ParkAndAnnounce(asterisk-friend:/tmp/asterisk-
    stranger:vm-isonphone:at-following-number:pARKED|40|local/2001@from-internal|who-r-u,s,7)
    exten => 70,4,Hangup


    extensions_additional.conf


    ; do not edit this file, this is an auto-generated file by freepbx
    ; all modifications must be done from the web gui


    [globals]
    #include globals_custom.conf
    CALLFILENAME = ""
    DIAL_OPTIONS = tr
    TRUNK_OPTIONS =
    DIAL_OUT = 9
    FAX =
    FAX_RX = system
    FAX_RX_EMAIL = fax@mydomain.com
    FAX_RX_FROM = freepbx@gmail.com
    INCOMING = group-all
    NULL = ""
    OPERATOR =
    OPERATOR_XTN =
    PARKNOTIFY = SIP/200
    RECORDEXTEN = ""
    RINGTIMER = 30
    DIRECTORY = last
    AFTER_INCOMING =
    IN_OVERRIDE = forcereghours
    REGTIME = 7:55-17:05
    REGDAYS = mon-fri
    DIRECTORY_OPTS =
    DIALOUTIDS = 2/
    VM_PREFIX = *
    VM_OPTS =
    VM_GAIN =
    VM_DDTYPE = u
    TIMEFORMAT = kM
    TONEZONE = ve
    ALLOW_SIP_ANON = no
    VMX_CONTEXT = from-internal
    VMX_PRI = 1
    VMX_TIMEDEST_CONTEXT =
    VMX_TIMEDEST_EXT = dovm
    VMX_TIMEDEST_PRI = 1
    VMX_LOOPDEST_CONTEXT =
    VMX_LOOPDEST_EXT = dovm
    VMX_LOOPDEST_PRI = 1
    VMX_OPTS_TIMEOUT =
    VMX_OPTS_LOOP =
    VMX_OPTS_DOVM =
    VMX_TIMEOUT = 2
    VMX_REPEAT = 1
    VMX_LOOPS = 1
    TRANSFER_CONTEXT = from-internal-xfer
    ZAPTEL_DELAY = 0
    OUTDISABLE_2 = off
    OUTFAIL_2 =
    OUTKEEPCID_2 = on
    OUTCID_2 = 71720232
    OUTMAXCHANS_2 = 1
    OUTPREFIX_2 =
    OUT_2 = ZAP/3
    ASTETCDIR = /etc/asterisk
    ASTMODDIR = /usr/lib/asterisk/modules
    ASTVARLIBDIR = /var/lib/asterisk
    ASTAGIDIR = /var/lib/asterisk/agi-bin
    ASTSPOOLDIR = /var/spool/asterisk
    ASTRUNDIR = /var/run/asterisk
    ASTLOGDIR = /var/log/asterisk
    CWINUSEBUSY = true
    AMPMGRUSER = admin
    AMPMGRPASS = elastix456
    ASTVERSION = 1.4.22


    ;end of [globals]


    [app-dnd-off]
    include => app-dnd-off-custom
    exten => *79,1,Answer
    exten => *79,n,Wait(1)
    exten => *79,n,Macro(user-callerid,)
    exten => *79,n,dbDel(DND/${AMPUSER})
    exten => *79,n,Playback(do-not-disturb&de-activated)
    exten => *79,n,Macro(hangupcall,)

    ; end of [app-dnd-off]


    [app-dnd-on]
    include => app-dnd-on-custom
    exten => *78,1,Answer
    exten => *78,n,Wait(1)
    exten => *78,n,Macro(user-callerid,)
    exten => *78,n,Set(DB(DND/${AMPUSER})=YES)
    exten => *78,n,Playback(do-not-disturb&activated)
    exten => *78,n,Macro(hangupcall,)

    ; end of [app-dnd-on]


    [cidlookup]
    include => cidlookup-custom
    exten => cidlookup_return,1,LookupCIDName
    exten => cidlookup_return,n,Return()

    ; end of [cidlookup]


    [park-dial]
    include => park-dial-custom
    exten => t,1,Noop(Parked Call Timed Out and Got Orphaned)
    exten => t,n,Goto(from-did-direct,2000,1)

    ; end of [park-dial]


    [app-callwaiting-cwoff]
    include => app-callwaiting-cwoff-custom
    exten => *71,1,Answer
    exten => *71,n,Wait(1)
    exten => *71,n,Macro(user-callerid,)
    exten => *71,n,dbDel(CW/${AMPUSER})
    exten => *71,n,Playback(call-waiting&de-activated)
    exten => *71,n,Macro(hangupcall,)

    ; end of [app-callwaiting-cwoff]


    [app-callwaiting-cwon]
    include => app-callwaiting-cwon-custom
    exten => *70,1,Answer
    exten => *70,n,Wait(1)
    exten => *70,n,Macro(user-callerid,)
    exten => *70,n,Set(DB(CW/${AMPUSER})=ENABLED)
    exten => *70,n,Playback(call-waiting&activated)
    exten => *70,n,Macro(hangupcall,)

    ; end of [app-callwaiting-cwon]


    [macro-speeddial-lookup]
    include => macro-speeddial-lookup-custom
    exten => s,1,GotoIf($["${ARG2}"=""]]?lookupsys)
    exten => s,n,Set(SPEEDDIALNUMBER=)
    exten => s,n(lookupuser),Set(SPEEDDIALNUMBER=${DB(AMPUSER/${ARG2}/speeddials/${ARG1})})
    exten => s,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?lookupsys)
    exten => s,n,Noop(Found speeddial ${ARG1} for user ${ARG2}: ${SPEEDDIALNUMBER})
    exten => s,n,Goto(end)
    exten => s,lookupuser+101(lookupsys),Set(SPEEDDIALNUMBER=${DB(sysspeeddials/${ARG1})})
    exten => s,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?failed)
    exten => s,n,Noop(Found system speeddial ${ARG1}: ${SPEEDDIALNUMBER})
    exten => s,n,Goto(end)
    exten => s,lookupsys+101(failed),Noop(No system or user speeddial found)
    exten => s,n(end),Noop(End of Speeddial-lookup)

    ; end of [macro-speeddial-lookup]


    [app-speeddial]
    include => app-speeddial-custom
    exten => _*0.,1,Macro(user-callerid,)
    exten => _*0.,n,Set(SPEEDDIALLOCATION=${EXTEN:2})
    exten => _*0.,n(lookup),Macro(speeddial-lookup,${SPEEDDIALLOCATION},${AMPUSER})
    exten => _*0.,n,GotoIf($["${SPEEDDIALNUMBER}"=""]?failed)
    exten => _*0.,n,Dial(Local/${SPEEDDIALNUMBER}@from-internal/n,)
    exten => _*0.,lookup+101(failed),Playback(speed-dial-empty)
    exten => _*0.,n,Congestion(20)
    exten => *75,1,Goto(app-speeddial-set,s,1)

    ; end of [app-speeddial]


    [app-speeddial-set]
    include => app-speeddial-set-custom
    exten => s,1,Macro(user-callerid,)
    exten => s,n(setloc),Read(newlocation,speed-enterlocation,,,,)
    exten => s,n(lookup),Macro(speeddial-lookup,${newlocation},${AMPUSER})
    exten => s,n(lookup),GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts)
    exten => s,n(setnum),Read(newnum,speed-enternumber,,,,)
    exten => s,n(success),Set(DB(AMPUSER/${AMPUSER}/speeddials/${newlocation})=${newnum})
    exten => s,n,Playback(speed-dial)
    exten => s,n,SayDigits(${newlocation})
    exten => s,n,Playback(is-set-to)
    exten => s,n,SayDigits(${newnum})
    exten => s,n,Hangup
    exten => s,n(conflicts),Playback(speed-dial)
    exten => s,n,SayDigits(${newlocation})
    exten => s,n,Playback(is-in-use)
    exten => s,n,Background(press-1&to-listen-to-it&press-2&to-enter-a-diff&location&press-3&to-change&telephone-number)
    exten => s,n,WaitExten(60,)
    exten => 1,1,Playback(speed-dial)
    exten => 1,n,SayDigits(${newlocation})
    exten => 1,n,Playback(is-set-to)
    exten => 1,n,SayDigits(${SPEEDDIALNUMBER})
    exten => 1,n,Goto(s,conflicts)
    exten => 2,1,Goto(s,setloc)
    exten => 3,1,Goto(s,setnum)
    exten => t,1,Congestion(20)

    ; end of [app-speeddial-set]


    [app-dictate-record]
    include => app-dictate-record-custom
    exten => *34,1,Answer
    exten => *34,n,Macro(user-callerid,)
    exten => *34,n,Noop(CallerID is ${AMPUSER})
    exten => *34,n,Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)})
    exten => *34,n,GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok)
    exten => *34,n(nodict),Playback(feature-not-avail-line)
    exten => *34,n,Hangup
    exten => *34,n(dictok),Dictate(/var/lib/asterisk/sounds/dictate/${AMPUSER})
    exten => *34,n,Macro(hangupcall,)

    ; end of [app-dictate-record]


    [app-dictate-send]
    include => app-dictate-send-custom
    exten => *35,1,Answer
    exten => *35,n,Macro(user-callerid,)
    exten => *35,n,Noop(CallerID is ${AMPUSER})
    exten => *35,n,Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)})
    exten => *35,n,GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok)
    exten => *35,n(nodict),Playback(feature-not-avail-line)
    exten => *35,n,Hangup
    exten => *35,n(dictok),Read(DICTFILE,enter-filename-short,,,,)
    exten => *35,n,Set(DICTEMAIL=${DB(AMPUSER/${AMPUSER}/dictate/email)})
    exten => *35,n,Set(DICTFMT=${DB(AMPUSER/${AMPUSER}/dictate/format)})
    exten => *35,n,Set(NAME=${DB(AMPUSER/${AMPUSER}/cidname)})
    exten => *35,n,Playback(dictation-being-processed)
    exten => *35,n,System(/var/lib/asterisk/bin/audio-email.pl --file /var/lib/asterisk/sounds/dictate/${AMPUSER}/${DICTFILE}.raw --attachment dict-${DICTFILE} --format ${DICTFMT} --to ${DICTEMAIL} --subject "Dictation from ${NAME} Attached")
    exten => *35,n,Playback(dictation-sent)
    exten => *35,n,Macro(hangupcall,)

    ; end of [app-dictate-send]


    [ext-group]
    include => ext-group-custom
    exten => 600,1,Macro(user-callerid,)
    exten => 600,n,GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb)
    exten => 600,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov)
    exten => 600,n(skipdb),Set(__NODEST=)
    exten => 600,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
    exten => 600,n,Set(__BLKVM_BASE=${EXTEN})
    exten => 600,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
    exten => 600,n(skipov),Set(RRNODEST=${NODEST})
    exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
    exten => 600,n,Set(RecordMethod=Group)
    exten => 600,n,Macro(record-enable,2000,${RecordMethod})
    exten => 600,n,Set(RingGroupMethod=ringall)
    exten => 600,n(DIALGRP),Macro(dial,30,${DIAL_OPTIONS},2000)
    exten => 600,n,Set(RingGroupMethod=)
    exten => 600,n,GotoIf($["foo${RRNODEST}" != "foo"]?nodest)
    exten => 600,n,Set(__NODEST=)
    exten => 600,n,dbDel(${BLKVM_OVERRIDE})
    exten => 600,n,Goto(from-did-direct,2003,1)
    exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})

    ; end of [ext-group]


    [app-dialvm]
    include => app-dialvm-custom
    exten => *98,1,Answer
    exten => *98,n,Wait(1)
    exten => *98,n,Macro(user-callerid,)
    exten => *98,n,VoiceMailMain()
    exten => *98,n,Macro(hangupcall,)
    exten => _*98.,1,Answer
    exten => _*98.,n,Wait(1)
    exten => _*98.,n,Macro(get-vmcontext,${EXTEN:3})
    exten => _*98.,n,VoiceMailMain(${EXTEN:3}@${VMCONTEXT})
    exten => _*98.,n,Macro(hangupcall,)

    ; end of [app-dialvm]


    [app-vmmain]
    include => app-vmmain-custom
    exten => *97,1,Answer
    exten => *97,n,Wait(1)
    exten => *97,n,Macro(user-callerid,)
    exten => *97,n,Macro(get-vmcontext,${AMPUSER})
    exten => *97,n(check),MailBoxExists(${AMPUSER}@${VMCONTEXT})
    exten => *97,n,GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?mbexist)
    exten => *97,n,VoiceMailMain()
    exten => *97,n,Macro(hangupcall,)
    exten => *97,check+101(mbexist),VoiceMailMain(${AMPUSER}@${VMCONTEXT})
    exten => *97,n,Macro(hangupcall,)

    ; end of [app-vmmain]


    [app-pbdirectory]
    include => app-pbdirectory-custom
    exten => 411,1,Answer
    exten => 411,n,Wait(1)
    exten => 411,n,Goto(pbdirectory,1)
    exten => pbdirectory,1,AGI(pbdirectory)
    exten => pbdirectory,n,GotoIf($["${dialnumber}"=""]?hangup,1)
    exten => pbdirectory,n,Noop(Got number to dial: ${dialnumber})
    exten => pbdirectory,n,Dial(Local/${dialnumber}@from-internal/n,)
    exten => hangup,1,Hangup

    ; end of [app-pbdirectory]


    [app-recordings]
    include => app-recordings-custom
    exten => *77,1,Macro(user-callerid,)
    exten => *77,n,Wait(2)
    exten => *77,n,Macro(systemrecording,dorecord)
    exten => *99,1,Macro(user-callerid,)
    exten => *99,n,Wait(2)
    exten => *99,n,Macro(systemrecording,docheck)

    ; end of [app-recordings]


    [app-calltrace]
    include => app-calltrace-custom
    exten => *69,1,Goto(app-calltrace-perform,s,1)

    ; end of [app-calltrace]


    [app-calltrace-perform]
    include => app-calltrace-perform-custom
    exten => s,1,Answer
    exten => s,n,Wait(1)
    exten => s,n,Macro(user-callerid,)
    exten => s,n,Playback(info-about-last-call&telephone-number)
    exten => s,n,Set(lastcaller=${DB(CALLTRACE/${AMPUSER})})
    exten => s,n,GotoIf($[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]?noinfo)
    exten => s,n,SayDigits(${lastcaller})
    exten => s,n,Set(TIMEOUT(digit)=3)
    exten => s,n,Set(TIMEOUT(response)=7)
    exten => s,n,Background(to-call-this-number&press-1)
    exten => s,n,Goto(fin)
    exten => s,n(noinfo),Playback(from-unknown-caller)
    exten => s,n,Macro(hangupcall,)
    exten => s,n(fin),Noop(Waiting for input)
    exten => s,n,WaitExten(60,)
    exten => s,n,Playback(sorry-youre-having-problems&goodbye)
    exten => 1,1,Goto(from-internal,${lastcaller},1)
    exten => i,1,Playback(vm-goodbye)
    exten => i,n,Macro(hangupcall,)
    exten => t,1,Playback(vm-goodbye)
    exten => t,n,Macro(hangupcall,)

    ; end of [app-calltrace-perform]


    [app-directory]
    include => app-directory-custom
    exten => #,1,Answer
    exten => #,n,Wait(1)
    exten => #,n,AGI(directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS})
    exten => #,n,Playback(vm-goodbye)
    exten => #,n,Hangup
    exten => i,1,Playback(privacy-incorrect)

    ; end of [app-directory]


    [app-echo-test]
    include => app-echo-test-custom
    exten => *43,1,Answer
    exten => *43,n,Wait(1)
    exten => *43,n,Playback(demo-echotest)
    exten => *43,n,Echo()
    exten => *43,n,Playback(demo-echodone)
    exten => *43,n,Hangup

    ; end of [app-echo-test]


    [app-speakextennum]
    include => app-speakextennum-custom
    exten => *65,1,Answer
    exten => *65,n,Wait(1)
    exten => *65,n,Macro(user-callerid,)
    exten => *65,n,Playback(your)
    exten => *65,n,Playback(extension)
    exten => *65,n,Playback(number)
    exten => *65,n,Playback(is)
    exten => *65,n,SayDigits(${AMPUSER})
    exten => *65,n,Wait(2)
    exten => *65,n,Hangup

    ; end of [app-speakextennum]


    [app-speakingclock]
    include => app-speakingclock-custom
    exten => *60,1,Answer
    exten => *60,n,Wait(1)
    exten => *60,n,Set(NumLoops=0)
    exten => *60,n(start),Set(FutureTime=$[${EPOCH} + 11])
    exten => *60,n,Playback(at-tone-time-exactly)
    exten => *60,n,GotoIf($["${TIMEFORMAT}" = "kM"]?hr24format)
    exten => *60,n,SayUnixTime(${FutureTime},,IM \'and\' S \'seconds\' p)
    exten => *60,n,Goto(waitloop)
    exten => *60,n(hr24format),SayUnixTime(${FutureTime},,kM \'and\' S \'seconds\')
    exten => *60,n(waitloop),Set(TimeLeft=$[${FutureTime} - ${EPOCH}])
    exten => *60,n,GotoIf($[${TimeLeft} < 1]?playbeep)
    exten => *60,n,Wait(1)
    exten => *60,n,Goto(waitloop)
    exten => *60,n(playbeep),Playback(beep)
    exten => *60,n,Wait(5)
    exten => *60,n,Set(NumLoops=$[${NumLoops} + 1])
    exten => *60,n,GotoIf($[${NumLoops} < 5]?start)
    exten => *60,n,Playback(goodbye)
    exten => *60,n,Hangup

    ; end of [app-speakingclock]


    [app-cf-busy-off]
    include => app-cf-busy-off-custom
    exten => *91,1,Answer
    exten => *91,n,Wait(1)
    exten => *91,n,Macro(user-callerid,)
    exten => *91,n,dbDel(CFB/${AMPUSER})
    exten => *91,n,Playback(call-fwd-on-busy&de-activated)
    exten => *91,n,Macro(hangupcall,)
    exten => _*91.,1,Answer
    exten => _*91.,n,Wait(1)
    exten => _*91.,n,Set(fromext=${EXTEN:3})
    exten => _*91.,n,dbDel(CFB/${fromext})
    exten => _*91.,n,Playback(call-fwd-on-busy&for&extension)
    exten => _*91.,n,SayDigits(${fromext})
    exten => _*91.,n,Playback(cancelled)
    exten => _*91.,n,Macro(hangupcall,)

    ; end of [app-cf-busy-off]


    [app-cf-busy-off-any]
    include => app-cf-busy-off-any-custom
    exten => *92,1,Answer
    exten => *92,n,Wait(1)
    exten => *92,n,Playback(please-enter-your&extension)
    exten => *92,n,Read(fromext,then-press-pound,,,,)
    exten => *92,n,Wait(1)
    exten => *92,n,dbDel(CFB/${fromext})
    exten => *92,n,Playback(call-fwd-on-busy&for&extension)
    exten => *92,n,SayDigits(${fromext})
    exten => *92,n,Playback(cancelled)
    exten => *92,n,Macro(hangupcall,)

    ; end of [app-cf-busy-off-any]


    [app-cf-busy-on]
    include => app-cf-busy-on-custom
    exten => *90,1,Answer
    exten => *90,n,Wait(1)
    exten => *90,n,Macro(user-callerid,)
    exten => *90,n,Playback(call-fwd-on-busy)
    exten => *90,n,Playback(please-enter-your&extension)
    exten => *90,n,Read(fromext,then-press-pound,,,,)
    exten => *90,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})})
    exten => *90,n,Wait(1)
    exten => *90,n(startread),Playback(ent-target-attendant)
    exten => *90,n,Read(toext,then-press-pound,,,,)
    exten => *90,n,GotoIf($["foo${toext}"="foo"]?startread)
    exten => *90,n,Wait(1)
    exten => *90,n,Set(DB(CFB/${fromext})=${toext})
    exten => *90,n,Playback(call-fwd-on-busy&for&extension)
    exten => *90,n,SayDigits(${fromext})
    exten => *90,n,Playback(is-set-to)
    exten => *90,n,SayDigits(${toext})
    exten => *90,n,Macro(hangupcall,)
    exten => _*90.,1,Answer
    exten => _*90.,n,Wait(1)
    exten => _*90.,n,Macro(user-callerid,)
    exten => _*90.,n,Set(DB(CFB/${AMPUSER})=${EXTEN:3})
    exten => _*90.,n,Playback(call-fwd-on-busy&for&extension)
    exten => _*90.,n,SayDigits(${AMPUSER})
    exten => _*90.,n,Playback(is-set-to)
    exten => _*90.,n,SayDigits(${EXTEN:3})
    exten => _*90.,n,Macro(hangupcall,)

    ; end of [app-cf-busy-on]


    [app-cf-off]
    include => app-cf-off-custom
    exten => *73,1,Answer
    exten => *73,n,Wait(1)
    exten => *73,n,Macro(user-callerid,)
    exten => *73,n,dbDel(CF/${AMPUSER})
    exten => *73,n,Playback(call-fwd-unconditional&de-activated)
    exten => *73,n,Macro(hangupcall,)
    exten => _*73.,1,Answer
    exten => _*73.,n,Wait(1)
    exten => _*73.,n,Set(fromext=${EXTEN:3})
    exten => _*73.,n,dbDel(CF/${fromext})
    exten => _*73.,n,Playback(call-fwd-unconditional&for&extension)
    exten => _*73.,n,SayDigits(${fromext})
    exten => _*73.,n,Playback(cancelled)
    exten => _*73.,n,Macro(hangupcall,)

    ; end of [app-cf-off]


    [app-cf-off-any]
    include => app-cf-off-any-custom
    exten => *74,1,Answer
    exten => *74,n,Wait(1)
    exten => *74,n,Playback(please-enter-your&extension)
    exten => *74,n,Read(fromext,then-press-pound,,,,)
    exten => *74,n,Wait(1)
    exten => *74,n,dbDel(CF/${fromext})
    exten => *74,n,Playback(call-fwd-unconditional&for&extension)
    exten => *74,n,SayDigits(${fromext})
    exten => *74,n,Playback(cancelled)
    exten => *74,n,Macro(hangupcall,)

    ; end of [app-cf-off-any]


    [app-cf-on]
    include => app-cf-on-custom
    exten => *72,1,Answer
    exten => *72,n,Wait(1)
    exten => *72,n,Macro(user-callerid,)
    exten => *72,n,Playback(call-fwd-unconditional)
    exten => *72,n,Playback(please-enter-your&extension)
    exten => *72,n,Read(fromext,then-press-pound,,,,)
    exten => *72,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})})
    exten => *72,n,Wait(1)
    exten => *72,n(startread),Playback(ent-target-attendant)
    exten => *72,n,Read(toext,then-press-pound,,,,)
    exten => *72,n,GotoIf($["foo${toext}"="foo"]?startread)
    exten => *72,n,Wait(1)
    exten => *72,n,Set(DB(CF/${fromext})=${toext})
    exten => *72,n,Playback(call-fwd-unconditional&for&extension)
    exten => *72,n,SayDigits(${fromext})
    exten => *72,n,Playback(is-set-to)
    exten => *72,n,SayDigits(${toext})
    exten => *72,n,Macro(hangupcall,)
    exten => _*72.,1,Answer
    exten => _*72.,n,Wait(1)
    exten => _*72.,n,Macro(user-callerid,)
    exten => _*72.,n,Set(DB(CF/${AMPUSER})=${EXTEN:3})
    exten => _*72.,n,Playback(call-fwd-unconditional&for&extension)
    exten => _*72.,n,SayDigits(${AMPUSER})
    exten => _*72.,n,Playback(is-set-to)
    exten => _*72.,n,SayDigits(${EXTEN:3})
    exten => _*72.,n,Macro(hangupcall,)

    ; end of [app-cf-on]


    [app-cf-unavailable-off]
    include => app-cf-unavailable-off-custom
    exten => *53,1,Answer
    exten => *53,n,Wait(1)
    exten => *53,n,Macro(user-callerid,)
    exten => *53,n,dbDel(CFU/${AMPUSER})
    exten => *53,n,Playback(call-fwd-no-ans&de-activated)
    exten => *53,n,Macro(hangupcall,)
    exten => _*53.,1,Answer
    exten => _*53.,n,Wait(1)
    exten => _*53.,n,Set(fromext=${EXTEN:3})
    exten => _*53.,n,dbDel(CFU/${fromext})
    exten => _*53.,n,Playback(call-fwd-no-ans&for&extension)
    exten => _*53.,n,SayDigits(${fromext})
    exten => _*53.,n,Playback(cancelled)
    exten => _*53.,n,Macro(hangupcall,)

    ; end of [app-cf-unavailable-off]


    [app-cf-unavailable-on]
    include => app-cf-unavailable-on-custom
    exten => *52,1,Answer
    exten => *52,n,Wait(1)
    exten => *52,n,Macro(user-callerid,)
    exten => *52,n,Playback(call-fwd-no-ans)
    exten => *52,n,Playback(please-enter-your&extension)
    exten => *52,n,Read(fromext,then-press-pound,,,,)
    exten => *52,n,Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})})
    exten => *52,n,Wait(1)
    exten => *52,n(startread),Playback(ent-target-attendant)
    exten => *52,n,Read(toext,then-press-pound,,,,)
    exten => *52,n,GotoIf($["foo${toext}"="foo"]?startread)
    exten => *52,n,Wait(1)
    exten => *52,n,Set(DB(CFU/${fromext})=${toext})
    exten => *52,n,Playback(call-fwd-no-ans&for&extension)
    exten => *52,n,SayDigits(${fromext})
    exten => *52,n,Playback(is-set-to)
    exten => *52,n,SayDigits(${toext})
    exten => *52,n,Macro(hangupcall,)
    exten => _*52.,1,Answer
    exten => _*52.,n,Wait(1)
    exten => _*52.,n,Macro(user-callerid,)
    exten => _*52.,n,Set(DB(CFU/${AMPUSER})=${EXTEN:3})
    exten => _*52.,n,Playback(call-fwd-no-ans&for&extension)
    exten => _*52.,n,SayDigits(${AMPUSER})
    exten => _*52.,n,Playback(is-set-to)
    exten => _*52.,n,SayDigits(${EXTEN:3})
    exten => _*52.,n,Macro(hangupcall,)

    ; end of [app-cf-unavailable-on]


    [app-userlogonoff]
    include => app-userlogonoff-custom
    exten => *12,1,Macro(user-logoff,)
    exten => *12,n,Hangup
    exten => *11,1,Macro(user-logon,)
    exten => *11,n,Hangup
    exten => _*11.,1,Macro(user-logon,${EXTEN:3},)
    exten => _*11.,n,Hangup

    ; end of [app-userlogonoff]


    [app-pickup]
    include => app-pickup-custom
    exten => _**.,1,Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)})
    exten => _**.,n,Pickup(${EXTEN:2})

    ; end of [app-pickup]


    [app-zapbarge]
    include => app-zapbarge-custom
    exten => 888,1,Macro(user-callerid,)
    exten => 888,n,Set(GROUP()=${CALLERID(number)})
    exten => 888,n,Answer
    exten => 888,n,Wait(1)
    exten => 888,n,ZapBarge()
    exten => 888,n,Hangup

    ; end of [app-zapbarge]


    [app-chanspy]
    include => app-chanspy-custom
    exten => 555,1,Macro(user-callerid,)
    exten => 555,n,Answer
    exten => 555,n,Wait(1)
    exten => 555,n,ChanSpy()
    exten => 555,n,Hangup

    ; end of [app-chanspy]


    [ext-test]
    include => ext-test-custom
    exten => 7777,1,Goto(from-pstn,s,1)
    exten => 666,1,Goto(ext-fax,in_fax,1)
    exten => h,1,Macro(hangupcall,)

    ; end of [ext-test]


    [ext-did]
    include => ext-did-custom
    exten => fax,1,Goto(ext-fax,in_fax,1)
    exten => s,1,Set(__FROM_DID=${EXTEN})
    exten => s,n,GotoIf($[ "${CALLERID(name)}" != "" ] ?cidok)
    exten => s,n,Set(CALLERID(name)=${CALLERID(num)})
    exten => s,n(cidok),Noop(CallerID is ${CALLERID(all)})
    exten => s,n,SetMusicOnHold(acc_1)
    exten => s,n,Set(__MOHCLASS=acc_1)
    exten => s,n,Ringing()
    exten => s,n,Set(FAX_RX=disabled)
    exten => s,n,Goto(from-did-direct,3000,1)

    ; end of [ext-did]


    [ext-did-catchall]
    include => ext-did-catchall-custom
    exten => _.,1,Noop(Catch-All DID Match - Found ${EXTEN} - You probably want a DID for this.)
    exten => _.,n,Goto(ext-did,s,1)

    ; end of [ext-did-catchall]


    [macro-from-zaptel-3]
    include => macro-from-zaptel-3-custom
    exten => s,1,Noop(Entering macro-from-zaptel-3 with DID = ${DID} and setting to: 59571720232)
    exten => s,n,Set(__FROM_DID=59571720232)
    exten => s,n,Goto(from-trunk,59571720232,1)

    ; end of [macro-from-zaptel-3]


    [ext-local]
    include => ext-local-custom
    exten => 2000,1,Macro(exten-vm,novm,2000)
    exten => 2000,n,Hangup
    exten => 2000,hint,SIP/2000
    exten => 2001,1,Macro(exten-vm,2001,2001)
    exten => 2001,n,Hangup
    exten => 2001,hint,SIP/2001
    exten => ${VM_PREFIX}2001,1,Macro(vm,2001,DIRECTDIAL)
    exten => ${VM_PREFIX}2001,n,Hangup
    exten => vmb2001,1,Macro(vm,2001,BUSY)
    exten => vmb2001,n,Hangup
    exten => vmu2001,1,Macro(vm,2001,NOANSWER)
    exten => vmu2001,n,Hangup
    exten => vms2001,1,Macro(vm,2001,NOMESSAGE)
    exten => vms2001,n,Hangup
    exten => 2002,1,Macro(exten-vm,2002,2002)
    exten => 2002,n,Hangup
    exten => 2002,hint,SIP/2002
    exten => ${VM_PREFIX}2002,1,Macro(vm,2002,DIRECTDIAL)
    exten => ${VM_PREFIX}2002,n,Hangup
    exten => vmb2002,1,Macro(vm,2002,BUSY)
    exten => vmb2002,n,Hangup
    exten => vmu2002,1,Macro(vm,2002,NOANSWER)
    exten => vmu2002,n,Hangup
    exten => vms2002,1,Macro(vm,2002,NOMESSAGE)
    exten => vms2002,n,Hangup
    exten => 2003,1,Macro(exten-vm,2003,2003)
    exten => 2003,n,Hangup
    exten => 2003,hint,SIP/2003
    exten => ${VM_PREFIX}2003,1,Macro(vm,2003,DIRECTDIAL)
    exten => ${VM_PREFIX}2003,n,Hangup
    exten => vmb2003,1,Macro(vm,2003,BUSY)
    exten => vmb2003,n,Hangup
    exten => vmu2003,1,Macro(vm,2003,NOANSWER)
    exten => vmu2003,n,Hangup
    exten => vms2003,1,Macro(vm,2003,NOMESSAGE)
    exten => vms2003,n,Hangup
    exten => 2004,1,Macro(exten-vm,2004,2004)
    exten => 2004,n,Hangup
    exten => 2004,hint,SIP/2004
    exten => ${VM_PREFIX}2004,1,Macro(vm,2004,DIRECTDIAL)
    exten => ${VM_PREFIX}2004,n,Hangup
    exten => vmb2004,1,Macro(vm,2004,BUSY)
    exten => vmb2004,n,Hangup
    exten => vmu2004,1,Macro(vm,2004,NOANSWER)
    exten => vmu2004,n,Hangup
    exten => vms2004,1,Macro(vm,2004,NOMESSAGE)
    exten => vms2004,n,Hangup
    exten => 3000,1,Macro(exten-vm,novm,3000)
    exten => 3000,n,Hangup
    exten => 3000,hint,SIP/3000
    exten => 3001,1,Macro(exten-vm,3001,3001)
    exten => 3001,n,Hangup
    exten => 3001,hint,SIP/3001
    exten => ${VM_PREFIX}3001,1,Macro(vm,3001,DIRECTDIAL)
    exten => ${VM_PREFIX}3001,n,Hangup
    exten => vmb3001,1,Macro(vm,3001,BUSY)
    exten => vmb3001,n,Hangup
    exten => vmu3001,1,Macro(vm,3001,NOANSWER)
    exten => vmu3001,n,Hangup
    exten => vms3001,1,Macro(vm,3001,NOMESSAGE)
    exten => vms3001,n,Hangup
    exten => 3002,1,Macro(exten-vm,3002,3002)
    exten => 3002,n,Hangup
    exten => 3002,hint,SIP/3002
    exten => ${VM_PREFIX}3002,1,Macro(vm,3002,DIRECTDIAL)
    exten => ${VM_PREFIX}3002,n,Hangup
    exten => vmb3002,1,Macro(vm,3002,BUSY)
    exten => vmb3002,n,Hangup
    exten => vmu3002,1,Macro(vm,3002,NOANSWER)
    exten => vmu3002,n,Hangup
    exten => vms3002,1,Macro(vm,3002,NOMESSAGE)
    exten => vms3002,n,Hangup
    exten => 3003,1,Macro(exten-vm,3003,3003)
    exten => 3003,n,Hangup
    exten => 3003,hint,SIP/3003
    exten => ${VM_PREFIX}3003,1,Macro(vm,3003,DIRECTDIAL)
    exten => ${VM_PREFIX}3003,n,Hangup
    exten => vmb3003,1,Macro(vm,3003,BUSY)
    exten => vmb3003,n,Hangup
    exten => vmu3003,1,Macro(vm,3003,NOANSWER)
    exten => vmu3003,n,Hangup
    exten => vms3003,1,Macro(vm,3003,NOMESSAGE)
    exten => vms3003,n,Hangup

    ; end of [ext-local]


    [from-did-direct-ivr]
    include => from-did-direct-ivr-custom
    exten => 2000,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 2000,n,Set(__NODEST=)
    exten => 2000,n,Goto(from-did-direct,2000,1)
    exten => 2001,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 2001,n,Set(__NODEST=)
    exten => 2001,n,Goto(from-did-direct,2001,1)
    exten => ${VM_PREFIX}2001,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}2001,n,Set(__NODEST=)
    exten => ${VM_PREFIX}2001,n,Macro(vm,2001,DIRECTDIAL)
    exten => 2002,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 2002,n,Set(__NODEST=)
    exten => 2002,n,Goto(from-did-direct,2002,1)
    exten => ${VM_PREFIX}2002,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}2002,n,Set(__NODEST=)
    exten => ${VM_PREFIX}2002,n,Macro(vm,2002,DIRECTDIAL)
    exten => 2003,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 2003,n,Set(__NODEST=)
    exten => 2003,n,Goto(from-did-direct,2003,1)
    exten => ${VM_PREFIX}2003,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}2003,n,Set(__NODEST=)
    exten => ${VM_PREFIX}2003,n,Macro(vm,2003,DIRECTDIAL)
    exten => 2004,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 2004,n,Set(__NODEST=)
    exten => 2004,n,Goto(from-did-direct,2004,1)
    exten => ${VM_PREFIX}2004,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}2004,n,Set(__NODEST=)
    exten => ${VM_PREFIX}2004,n,Macro(vm,2004,DIRECTDIAL)
    exten => 3000,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 3000,n,Set(__NODEST=)
    exten => 3000,n,Goto(from-did-direct,3000,1)
    exten => 3001,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 3001,n,Set(__NODEST=)
    exten => 3001,n,Goto(from-did-direct,3001,1)
    exten => ${VM_PREFIX}3001,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}3001,n,Set(__NODEST=)
    exten => ${VM_PREFIX}3001,n,Macro(vm,3001,DIRECTDIAL)
    exten => 3002,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 3002,n,Set(__NODEST=)
    exten => 3002,n,Goto(from-did-direct,3002,1)
    exten => ${VM_PREFIX}3002,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}3002,n,Set(__NODEST=)
    exten => ${VM_PREFIX}3002,n,Macro(vm,3002,DIRECTDIAL)
    exten => 3003,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => 3003,n,Set(__NODEST=)
    exten => 3003,n,Goto(from-did-direct,3003,1)
    exten => ${VM_PREFIX}3003,1,ExecIf($["${BLKVM_OVERRIDE}" != ""],dbDel,${BLKVM_OVERRIDE})
    exten => ${VM_PREFIX}3003,n,Set(__NODEST=)
    exten => ${VM_PREFIX}3003,n,Macro(vm,3003,DIRECTDIAL)

    ; end of [from-did-direct-ivr]


    [outbound-allroutes]
    include => outbound-allroutes-custom
    exten => foo,1,Noop(bar)

    ; end of [outbound-allroutes]


    [app-blackhole]
    include => app-blackhole-custom
    exten => hangup,1,Noop(Blackhole Dest: Hangup)
    exten => hangup,n,Hangup
    exten => zapateller,1,Noop(Blackhole Dest: Play SIT Tone)
    exten => zapateller,n,Answer
    exten => zapateller,n,Zapateller()
    exten => musiconhold,1,Noop(Blackhole Dest: Put caller on hold forever)
    exten => musiconhold,n,Answer
    exten => musiconhold,n,MusicOnHold()
    exten => congestion,1,Noop(Blackhole Dest: Congestion)
    exten => congestion,n,Answer
    exten => congestion,n,Playtones(congestion)
    exten => congestion,n,Congestion(20)
    exten => congestion,n,Hangup
    exten => busy,1,Noop(Blackhole Dest: Busy)
    exten => busy,n,Answer
    exten => busy,n,Playtones(busy)
    exten => busy,n,Busy(20)
    exten => busy,n,Hangup
    exten => ring,1,Noop(Blackhole Dest: Ring)
    exten => ring,n,Answer
    exten => ring,n,Playtones(ring)
    exten => ring,n,Wait(300)
    exten => ring,n,Hangup

    ; end of [app-blackhole]


    [bad-number]
    include => bad-number-custom
    exten => _X.,1,ResetCDR()
    exten => _X.,n,NoCDR()
    exten => _X.,n,Wait(1)
    exten => _X.,n,Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
    exten => _X.,n,Wait(1)
    exten => _X.,n,Congestion(20)
    exten => _X.,n,Hangup
    exten => _*.,1,ResetCDR()
    exten => _*.,n,NoCDR()
    exten => _*.,n,Wait(1)
    exten => _*.,n,Playback(silence/1&feature-not-avail-line&silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer)
    exten => _*.,n,Wait(1)
    exten => _*.,n,Congestion(20)
    exten => _*.,n,Hangup

    ; end of [bad-number]


    [macro-dialout-trunk]
    include => macro-dialout-trunk-custom
    exten => s,1,Set(DIAL_TRUNK=${ARG1})
    exten => s,n,ExecIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]],Authenticate,${ARG3})
    exten => s,n,GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk,1)
    exten => s,n,Set(DIAL_NUMBER=${ARG2})
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS})
    exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK})
    exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax)
    exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
    exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid)
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})
    exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
    exten => s,n(skipoutcid),AGI(fixlocalprefix)
    exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
    exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)})
    exten => s,n,GotoIf($[$["${MOHCLASS}" = "default"] | $["foo${MOHCLASS}" = "foo"]]?gocall)
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS})
    exten => s,n(gocall),Macro(dialout-trunk-predial-hook,)
    exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
    exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
    exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS})
    exten => s,n,Goto(s-${DIALSTATUS},1)
    exten => s,n(customtrunk),Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)})
    exten => s,n,Set(the_num=${CUT(OUT_${DIAL_TRUNK},$,2)})
    exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})
    exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum)
    exten => s,n(outnum),Set(the_num=${OUTNUM})
    exten => s,n(skipoutnum),Dial(${pre_num:4}${the_num}${post_num},300,${DIAL_TRUNK_OPTIONS})
    exten => s,n,Goto(s-${DIALSTATUS},1)
    exten => s,n(chanfull),Noop(max channels used up)
    exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving up)
    exten => s-BUSY,n,Playtones(busy)
    exten => s-BUSY,n,Busy(20)
    exten => s-NOANSWER,1,Noop(Dial failed due to trunk reporting NOANSWER - giving up)
    exten => s-NOANSWER,n,Playtones(congestion)
    exten => s-NOANSWER,n,Congestion(20)
    exten => s-CANCEL,1,Noop(Dial failed due to trunk reporting CANCEL - giving up)
    exten => s-CANCEL,n,Playtones(congestion)
    exten => s-CANCEL,n,Congestion(20)
    exten => _s-.,1,GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport)
    exten => _s-.,n,AGI(${OUTFAIL_${ARG1}})
    exten => _s-.,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks)
    exten => disabletrunk,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk)
    exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook)
    exten => h,1,Macro(hangupcall,)

    ; end of [macro-dialout-trunk]


    [macro-dialout-dundi]
    include => macro-dialout-dundi-custom
    exten => s,1,Set(DIAL_TRUNK=${ARG1})
    exten => s,n,ExecIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]],Authenticate,${ARG3})
    exten => s,n,GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk,1)
    exten => s,n,Set(DIAL_NUMBER=${ARG2})
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS})
    exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK})
    exten => s,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax)
    exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)
    exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid)
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})
    exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})
    exten => s,n(skipoutcid),AGI(fixlocalprefix)
    exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
    exten => s,n,GotoIf($[$["${MOHCLASS}" = "default"] | $["foo${MOHCLASS}" = "foo"]]?gocall)
    exten => s,n,Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS})
    exten => s,n(gocall),Macro(dialout-dundi-predial-hook,)
    exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)
    exten => s,n,GotoIf($["${custom}" = "AMP"]?customtrunk)
    exten => s,n,Macro(dundi-${DIAL_TRUNK},${OUTNUM})
    exten => s,n,Goto(s-${DIALSTATUS},1)
    exten => s,n(chanfull),Noop(max channels used up)
    exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving up)
    exten => s-BUSY,n,Playtones(busy)
    exten => s-BUSY,n,Busy(20)
    exten => s-NOANSWER,1,Noop(Dial failed due to trunk reporting NOANSWER - giving up)
    exten => s-NOANSWER,n,Playtones(congestion)
    exten => s-NOANSWER,n,Congestion(20)
    exten => s-CANCEL,1,Noop(Dial failed due to trunk reporting CANCEL - giving up)
    exten => s-CANCEL,n,Playtones(congestion)
    exten => s-CANCEL,n,Congestion(20)
    exten => _s-.,1,GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport)
    exten => _s-.,n,AGI(${OUTFAIL_${ARG1}})
    exten => _s-.,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks)
    exten => disabletrunk,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk)
    exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-dundi-predial-hook)
    exten => h,1,Macro(hangupcall,)

    ; end of [macro-dialout-dundi]


    [macro-user-callerid]
    include => macro-user-callerid-custom
    exten => s,1,Noop(user-callerid: ${CALLERID(name)} ${CALLERID(number)})
    exten => s,n,Set(AMPUSER=${IF($["foo${AMPUSER}" = "foo"]?${CALLERID(number)}:${AMPUSER})})
    exten => s,n,GotoIf($["${CHANNEL:0:5}" = "Local"]?report)
    exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""],Set,REALCALLERIDNUM=${CALLERID(number)})
    exten => s,n(start),Noop(REALCALLERIDNUM is ${REALCALLERIDNUM})
    exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
    exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
    exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?report)
    exten => s,n,Set(AMPUSERCID=${IF($["${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)}" = "1"]?${DB_RESULT}:${AMPUSER})})
    exten => s,n,Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSERCID}>)
    exten => s,n,Set(REALCALLERIDNUM=${DB(DEVICE/${REALCALLERIDNUM}/user)})
    exten => s,n,ExecIf($["${DB(AMPUSER/${AMPUSER}/language)}" != ""],Set,CHANNEL(language)=${DB(AMPUSER/${AMPUSER}/language)})
    exten => s,n(report),Noop(TTL: ${TTL} ARG1: ${ARG1})
    exten => s,n,GotoIf($[ "${ARG1}" = "SKIPTTL" ]?continue)
    exten => s,n(report2),Set(__TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])})
    exten => s,n,GotoIf($[ ${TTL} > 0 ]?continue)
    exten => s,n,Wait(${RINGTIMER})
    exten => s,n,Answer
    exten => s,n,Wait(2)
    exten => s,n,Playback(im-sorry&an-error-has-occured&with&call-forwarding)
    exten => s,n,Macro(hangupcall,)
    exten => s,n,Congestion(20)
    exten => s,n(continue),Noop(Using CallerID ${CALLERID(all)})
    exten => h,1,Macro(hangupcall,)

    ; end of [macro-user-callerid]


    [macro-dialout-enum]
    include => macro-dialout-enum-custom
    exten => s,1,ExecIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]],Authenticate,${ARG3})
    exten => s,n,Macro(outbound-callerid,${ARG1})
    exten => s,n,Set(GROUP()=OUT_${ARG1})
    exten => s,n,GotoIf($["${OUTMAXCHANS_${ARG1}}foo" = "foo"]?nomax)
    exten => s,n,GotoIf($[ ${GROUP_COUNT(OUT_${ARG1})} > ${OUTMAXCHANS_${ARG1}} ]?nochans)
    exten => s,n(nomax),Set(DIAL_NUMBER=${ARG2})
    exten => s,n,Set(DIAL_TRUNK=${ARG1})
    exten => s,n,AGI(fixlocalprefix)
    exten => s,n,AGI(enumlookup.agi)
    exten => s,n(dialloop),GotoIf($["foo${DIALARR}"="foo"]?end)
    exten => s,n,Set(TRYDIAL=${CUT(DIALARR,%,1)})
    exten => s,n,Set(DIALARR=${CUT(DIALARR,%,2-)})
    exten => s,n,Dial(${TRYDIAL},)
    exten => s,n,Noop(Dial exited in macro-enum-dialout with ${DIALSTATUS})
    exten => s,n,GotoIf($[ $[ "${DIALSTATUS}" = "CHANUNAVAIL" ] | $[ "${DIALSTATUS}" = "CONGESTION" ] ]?dialloop)
    exten => s,n(dialfailed),Goto(s-${DIALSTATUS},1)
    exten => s,n(nochans),Noop(max channels used up)
    exten => s,n(end),Noop(Exiting macro-dialout-enum)
    exten => s-BUSY,1,Noop(Trunk is reporting BUSY)
    exten => s-BUSY,n,Busy(20)
    exten => _s-.,1,Noop(Dial failed due to ${DIALSTATUS})

    ; end of [macro-dialout-enum]


    [macro-outbound-callerid]
    include => macro-outbound-callerid-custom
    exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
    exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
    exten => s,n(start),Noop(REALCALLERIDNUM is ${REALCALLERIDNUM})
    exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid)
    exten => s,n,GotoIf($["x${OUTKEEPCID_${ARG1}}" = "xon"]?normcid)
    exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid)
    exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM})
    exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid)
    exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)})
    exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
    exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
    exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid)
    exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = ""]?trunkcid)
    exten => s,n,Set(CALLERID(all)=${EMERGENCYCID})
    exten => s,n,Goto(report)
    exten => s,n(trunkcid),GotoIf($["${TRUNKOUTCID:1:2}" = ""]?usercid)
    exten => s,n,Set(CALLERID(all)=${TRUNKOUTCID})
    exten => s,n(usercid),GotoIf($["${USEROUTCID:1:2}" = ""]?report)
    exten => s,n,Set(CALLERID(all)=${USEROUTCID})
    exten => s,n,GotoIf($["x${CALLERID(name)}"!="xhidden"]?report:hidecid)
    exten => s,n(hidecid),SetCallerPres(prohib_passed_screen)
    exten => s,n(report),Noop(CallerID set to ${CALLERID(all)})

    ; end of [macro-outbound-callerid]


    [macro-agent-add]
    include => macro-agent-add-custom
    exten => s,1,Wait(1)
    exten => s,n,Macro(user-callerid,SKIPTTL)
    exten => s,n(a3),Read(CALLBACKNUM,agent-user,,,,)
    exten => s,n,GotoIf($["${CALLBACKNUM}" != ""]?a7)
    exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
    exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
    exten => s,n(a7),GotoIf($["${CALLBACKNUM}" = "${ARG1}"]?invalid)
    exten => s,n,ExecIf($["${ARG2}" != ""],Authenticate,${ARG2})
    exten => s,n(a9),AddQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
    exten => s,n,Wait(1)
    exten => s,n,Playback(agent-loginok&with&extension)
    exten => s,n,SayDigits(${CALLBACKNUM})
    exten => s,n,Hangup
    exten => s,n,MacroExit()
    exten => s,n(invalid),Playback(pbx-invalid)
    exten => s,n,Goto(a3)

    ; end of [macro-agent-add]


    [macro-agent-del]
    include => macro-agent-del-custom
    exten => s,1,Wait(1)
    exten => s,n,Macro(user-callerid,SKIPTTL)
    exten => s,n(a3),Read(CALLBACKNUM,agent-user,,,,)
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a5:a7)
    exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
    exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
    exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
    exten => s,n(a7),RemoveQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n)
    exten => s,n,UserEvent(RefreshQueue)
    exten => s,n,Wait(1)
    exten => s,n,Playback(agent-loggedoff)
    exten => s,n,Hangup

    ; end of [macro-agent-del]


    [macro-systemrecording]
    include => macro-systemrecording-custom
    exten => s,1,Goto(${ARG1},1)
    exten => dorecord,1,Record(/tmp/${AMPUSER}-ivrrecording:wav)
    exten => dorecord,n,Wait(1)
    exten => dorecord,n,Goto(confmenu,1)
    exten => docheck,1,Playback(/tmp/${AMPUSER}-ivrrecording)
    exten => docheck,n,Wait(1)
    exten => docheck,n,Goto(confmenu,1)
    exten => confmenu,1,Background(to-listen-to-it&press-1&to-rerecord-it&press-star,m,${CHANNEL(language)},macro-systemrecording)
    exten => confmenu,n,Read(RECRESULT,,1,,,4)
    exten => confmenu,n,GotoIf($["x${RECRESULT}"="x*"]?dorecord,1)
    exten => confmenu,n,GotoIf($["x${RECRESULT}"="x1"]?docheck,1)
    exten => confmenu,n,Goto(1)
    exten => 1,1,Goto(docheck,1)
    exten => *,1,Goto(dorecord,1)
    exten => t,1,Playback(goodbye)
    exten => t,n,Hangup
    exten => i,1,Playback(pm-invalid-option)
    exten => i,n,Goto(confmenu,1)
    exten => h,1,Hangup

    ; end of [macro-systemrecording]


    [from-internal-additional]
    include => from-internal-additional-custom
    include => app-dnd-off
    include => app-dnd-on
    include => app-callwaiting-cwoff
    include => app-callwaiting-cwon
    include => app-speeddial
    include => ext-findmefollow
    include => fmgrps
    include => app-dictate-record
    include => app-dictate-send
    include => ext-group
    include => grps
    include => ext-meetme
    include => app-dialvm
    include => app-vmmain
    include => app-pbdirectory
    include => app-recordings
    include => ext-queues
    include => app-calltrace
    include => app-directory
    include => app-echo-test
    include => app-speakextennum
    include => app-speakingclock
    include => app-cf-busy-off
    include => app-cf-busy-off-any
    include => app-cf-busy-on
    include => app-cf-off
    include => app-cf-off-any
    include => app-cf-on
    include => app-cf-unavailable-off
    include => app-cf-unavailable-on
    include => app-userlogonoff
    include => app-pickup
    include => app-zapbarge
    include => app-chanspy
    include => ext-test
    include => ext-local
    include => outbound-allroutes
    exten => h,1,Hangup

    ; end of [from-internal-additional]







    features_general_custom.conf


    ;*** WARNING: DO NOT HAND EDIT THIS FILE IT IS AUTO-GENERATD ***
    ;
    parkext => 70
    parkpos => 71-79
    context => parkedcalls
    parkingtime => 60




    sip_additional.conf

    ; do not edit this file, this is an auto-generated file by freepbx
    ; all modifications must be done from the web gui


    [2000]
    type=friend
    secret=2000
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=2000@device
    host=dynamic
    dtmfmode=inband
    dial=SIP/2000
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <2000>
    call-limit=4
    accountcode=
    call-limit=50

    [2001]
    type=friend
    secret=2001
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=2001@device
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/2001
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <2001>
    call-limit=4
    accountcode=
    call-limit=50

    [2002]
    type=friend
    secret=2002
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=2002@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/2002
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <2002>
    call-limit=4
    accountcode=
    call-limit=50

    [2003]
    type=friend
    secret=2003
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=2003@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/2003
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <2003>
    call-limit=4
    accountcode=
    call-limit=50

    [2004]
    type=friend
    secret=2004
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=2004@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/2004
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <2004>
    call-limit=4
    accountcode=
    call-limit=50

    [3000]
    type=friend
    secret=3000
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=3000@device
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/3000
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <3000>
    call-limit=4
    accountcode=
    call-limit=50

    [3001]
    type=friend
    secret=3001
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=3001@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/3001
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <3001>
    call-limit=4
    accountcode=
    call-limit=50

    [3002]
    type=friend
    secret=3002
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=3002@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/3002
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <3002>
    call-limit=4
    accountcode=
    call-limit=50

    [3003]
    type=friend
    secret=3003
    record_out=Adhoc
    record_in=Adhoc
    qualify=yes
    port=5060
    pickupgroup=
    nat=yes
    mailbox=3003@default
    host=dynamic
    dtmfmode=rfc2833
    dial=SIP/3003
    context=from-internal
    canreinvite=no
    callgroup=
    callerid=device <3003>
    call-limit=4
    accountcode=
    call-limit=50




    sip_general_additional.conf

    ; do not edit this file, this is an auto-generated file by freepbx
    ; all modifications must be done from the web gui


    vmexten=*97
    bindport=5060
    bindaddr=0.0.0.0
    disallow=all
    allow=ulaw
    allow=alaw
    context=from-sip-external
    callerid=Unknown
    notifyringing=yes
    notifyhold=yes
    limitonpeers=yes
    tos_sip=cs3
    tos_audio=ef
    tos_video=af41




    users.conf


    ;
    ; User configuration
    ;
    ; Creating entries in users.conf is a "shorthand" for creating individual
    ; entries in each configuration file. Using users.conf is not intended to
    ; provide you with as much flexibility as using the separate configuration
    ; files (e.g. sip.conf, iax.conf, etc) but is intended to accelerate the
    ; simple task of adding users. Note that creating individual items (e.g.
    ; custom SIP peers, IAX friends, etc.) will allow you to override specific
    ; parameters within this file. Parameter names here are the same as they
    ; appear in the other configuration files. There is no way to change the
    ; value of a parameter here for just one subsystem.
    ;

    [general]
    ;
    ; Full name of a user
    ;
    fullname = New User
    ;
    ; Starting point of allocation of extensions
    ;
    userbase = 6000
    ;
    ; Create voicemail mailbox and use use macro-stdexten
    ;
    hasvoicemail = yes
    ;
    ; Set voicemail mailbox 6000 password to 1234
    ;
    vmsecret = 1234
    ;
    ; Create SIP Peer
    ;
    hassip = yes
    ;
    ; Create IAX friend
    ;
    hasiax = yes
    ;
    ; Create H.323 friend
    ;
    ;hash323 = yes
    ;
    ; Create manager entry
    ;
    hasmanager = no
    ;
    ; Set permissions for manager entry (see manager.conf.sample for documentation)
    ; (defaults to *all* permissions)
    ;managerread = system,call,log,verbose,command,agent,user,config
    ;managerwrite = system,call,log,verbose,command,agent,user,config
    ;
    ; Remaining options are not specific to users.conf entries but are general.
    ;
    callwaiting = yes
    threewaycalling = yes
    callwaitingcallerid = yes
    transfer = yes
    canpark = yes
    cancallforward = yes
    callreturn = yes
    callgroup = 1
    pickupgroup = 1


    ;[6000]
    ;fullname = Joe User
    ;email = joe@foo.bar
    ;secret = 1234
    ;zapchan = 1
    ;hasvoicemail = yes
    ;vmsecret = 1234
    ;hassip = yes
    ;hasiax = no
    ;hash323 = no
    ;hasmanager = no
    ;callwaiting = no
    ;context = international







    No se que pudo ocurrir de un dia para otro dejo de funcionar
    Ya probe reiniciando el servidor y todo nada de nada
     
  2. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    en el shell escribe
    Code:
    tail -f /var/log/asterisk full
    
    trata de hacer la llamada y copia y pega el resultado acá para ver cual es el error.
     

Share This Page