Problema con limite de tiempo en las llamadas

Discussion in 'Elastix 2.x' started by Deviant, Apr 27, 2009.

  1. Deviant

    Joined:
    Feb 26, 2008
    Messages:
    117
    Likes Received:
    0
    hola Amigos este problema lo tengo en otra central que he puesto a funcionar en otro lado, y quiero limitar el tiempo de las llamadas salientes ("solo salientes no entrantes") y tengo configurado esto en extensions.conf

    [macro-dialout-trunk]
    exten => s,1,Set(DIAL_TRUNK=${ARG1})

    exten => s,2,Macro(user-callerid,)
    exten => s,3,GotoIf($["${CALLERID(number)}" = "105"]?14)
    exten => s,4,GotoIf($["${CALLERID(number)}" = "111"]?14)
    exten => s,5,GotoIf($["${CALLERID(number)}" = "170"]?14)
    exten => s,6,GotoIf($["${CALLERID(number)}" = "211"]?14)
    exten => s,7,GotoIf($["${CALLERID(number)}" = "218"]?14)
    exten => s,8,GotoIf($["${CALLERID(number)}" = "220"]?14)
    exten => s,9,GotoIf($["${CALLERID(number)}" = "232"]?14)
    exten => s,10,GotoIf($["${CALLERID(number)}" = "237"]?14)
    exten => s,11,GotoIf($["${CALLERID(number)}" = "322"]?14)
    exten => s,12,GotoIf($["${CALLERID(number)}" = "333"]?14)
    exten => s,13,Set(TIMEOUT(absolute)=255)
    exten => s,14,wait(1)

    lo que esta así "333"]?14) es para que esas extensiones no sean limitadas a el tiempo que pongo

    les comento que en mi otra central tengo configurado esto de la misma manera y aquí si me funciona en la otra no se porque no funciona quisiera y me orientaran, les pongo lo que tengo en extensions.conf



    [macro-dialout-trunk]

    exten => s,1,Set(DIAL_TRUNK=${ARG1})

    exten => s,2,Macro(user-callerid,)

    exten => s,3,GotoIf($["${CALLERID(number)}" = "185"]?21)

    exten => s,4,GotoIf($["${CALLERID(number)}" = "186"]?21)

    exten => s,5,GotoIf($["${CALLERID(number)}" = "187"]?21)

    exten => s,6,GotoIf($["${CALLERID(number)}" = "188"]?21)

    exten => s,7,GotoIf($["${CALLERID(number)}" = "189"]?21)

    exten => s,8,GotoIf($["${CALLERID(number)}" = "190"]?21)

    exten => s,9,GotoIf($["${CALLERID(number)}" = "191"]?21)

    exten => s,10,GotoIf($["${CALLERID(number)}" = "192"]?21)

    exten => s,11,GotoIf($["${CALLERID(number)}" = "197"]?21)

    exten => s,12,GotoIf($["${CALLERID(number)}" = "198"]?21)

    exten => s,13,GotoIf($["${CALLERID(number)}" = "100"]?21)

    exten => s,14,GotoIf($["${CALLERID(number)}" = "300"]?21)

    exten => s,15,GotoIf($["${CALLERID(number)}" = "301"]?21)

    exten => s,16,GotoIf($["${CALLERID(number)}" = "302"]?21)

    exten => s,17,GotoIf($["${CALLERID(number)}" = "303"]?21)

    exten => s,18,GotoIf($["${CALLERID(number)}" = "304"]?21)

    exten => s,19,GotoIf($["${CALLERID(number)}" = "305"]?21)

    exten => s,20,Set(TIMEOUT(absolute)=255)

    exten => s,21,wait(1)



    exten => s,n,Set(DIAL_NUMBER=${ARG2})

    exten => s,n,Set(ROUTE_PASSWD=${ARG3})



    exten => s,n,GotoIf($["${ROUTE_PASSWD}" = ""]?noauth) ; arg3 is pattern password

    exten => s,n(auth),Authenticate(${ROUTE_PASSWD})

    exten => s,n(noauth),GotoIf($["x${OUTDISABLE_${ARG1}}" = "xon"]?disabletrunk,1)



    ; If NODEST is set, clear it. No point in remembering since dialout-trunk will just end in the

    ; bit bucket. But if answered by an outside line with transfer capability, we want NODEST to be

    ; clear so a subsequent transfer to an internal extension works and goes to voicmail or other

    ; destinations.

    ;

    exten => s,n,Set(_NODEST=)



    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS}) // will be reset to TRUNK_OPTIONS if not intra-company

    exten => s,n,Set(GROUP()=OUT_${DIAL_TRUNK})

    exten => s,n,Macro(user-callerid,SKIPTTL)

    exten => s,n,Macro(record-enable,${CALLERID(number)},OUT)

    exten => s,n,GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid) ;Set to YES if treated like internal

    exten => s,n,Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS})

    exten => s,n,Macro(outbound-callerid,${DIAL_TRUNK})

    exten => s,n(skipoutcid),GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax)

    exten => s,n(checkmax),GotoIf($[ ${GROUP_COUNT()} > ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull)

    exten => s,n(nomax),AGI(fixlocalprefix) ; this sets DIAL_NUMBER to the proper dial string for this trunk

    exten => s,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) ; OUTNUM is the final dial number

    exten => s,n,Set(custom=${CUT(OUT_${DIAL_TRUNK},:,1)}) ; Custom trunks are prefixed with "AMP:"



    ; Back to normal processing, whether intracompany or not.

    ; But add the macro-setmusic if we don't want music on this outbound call

    ;

    exten => s,n,GotoIf($[$["${MOHCLASS}" = "default"] | $["foo${MOHCLASS}" = "foo"]]?gocall) ; Set to YES if we should pump silence

    exten => s,n,Set(DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}) ; set MoH or off



    ; This macro call will always be blank and is provided as a hook for customization required prior to making a call

    ; such as adding SIP header information or other requirements. All the channel variables from above are present

    ;

    exten => s,n,Macro(dialout-trunk-predial-hook)

    exten => s,n,GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass,1)



    exten => s,n(gocall),GotoIf($["${custom}" = "AMP"]?customtrunk)

    exten => s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM},300,${DIAL_TRUNK_OPTIONS}) ; Regular Trunk Dial

    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)}) ; this is where we expect to find string OUTNUM

    exten => s,n,Set(post_num=${CUT(OUT_${DIAL_TRUNK},$,3)})

    exten => s,n,GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum) ; if we didn't find "OUTNUM", then skip to Dial

    exten => s,n(outnum),Set(the_num=${OUTNUM}) ; replace "OUTNUM" with the actual number to dial

    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,2,Busy(20)



    exten => s-NOANSWER,1,NoOp(Dial failed due to trunk reporting NOANSWER - giving up)

    exten => s-NOANSWER,2,Playtones(congestion)

    exten => s-NOANSWER,3,Congestion(20)



    exten => s-CANCEL,1,NoOp(Dial failed due to trunk reporting CANCEL - giving up)

    exten => s-CANCEL,2,Playtones(congestion)

    exten => s-CANCEL,3,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)



    ; Adds a dynamic agent/member to a Queue

    ; Prompts for call-back number - in not entered, uses CIDNum

    [macro-agent-add]

    exten => s,1,Wait(1)

    exten => s,2,Macro(user-callerid,SKIPTTL)

    exten => s,3,Read(CALLBACKNUM,agent-user) ; get callback number from user

    exten => s,4,GotoIf($["${CALLBACKNUM}" = ""]?5:7) ; if user just pressed # or timed out, use cidnum

    exten => s,5,Set(CALLBACKNUM=${CALLERID(number)})

    exten => s,6,GotoIf($["${CALLBACKNUM}" = ""]?2) ; if still no number, start over

    exten => s,7,GotoIf($["${ARG2}" = ""]?9:8) ; arg2 is queue password

    exten => s,8,Authenticate(${ARG2})

    exten => s,9,AddQueueMember(${ARG1},Local/${CALLBACKNUM}@from-internal/n) ; using chan_local allows us to have agents over trunks

    exten => s,10,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})

    exten => s,11,Wait(1)

    exten => s,12,Playback(agent-loginok)

    exten => s,13,Hangup()



    ; Removes a dynamic agent/member from a Queue

    ; Prompts for call-back number - in not entered, uses CIDNum

    no se si es por lo que falta abajo y no se si conveniente copiarlo para que me funcione


    gracias.
     
  2. jcastellanos

    Joined:
    Feb 10, 2009
    Messages:
    2,404
    Likes Received:
    0
    es la misma vercion de elastix? estan bajo el mismo contexto las extenciones?
     
  3. Deviant

    Joined:
    Feb 26, 2008
    Messages:
    117
    Likes Received:
    0
    en la que no me funciona esta la versión Elastix 1.2.1-4 y en la que me funciona esta la Elastix 1.0-15, y si estan en el mismo contexto las extensiones no se, quisiera que me ayudaras porque me urge mucho y las llamadas no tienen limite de tiempo.
     
  4. jcastellanos

    Joined:
    Feb 10, 2009
    Messages:
    2,404
    Likes Received:
    0
    bueno, suena extraño, aparte de ese .conf, que otro modificaste?
     
  5. Deviant

    Joined:
    Feb 26, 2008
    Messages:
    117
    Likes Received:
    0
    nada mas ese es que asi lo tengo en la version Elastix 1.0-15 no se esta muy raro quisiera ver si puedo integrarlo a la extensions_additional.conf ahi si encontre la parte esta.


    [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]

    no se si lo puedo agregar el contexto al principio. ya que en el archivo extensions.conf no vi la parte de [macro-dialout-trunk] la tuve que crear.
     
  6. jcastellanos

    Joined:
    Feb 10, 2009
    Messages:
    2,404
    Likes Received:
    0
    si, pero yo seria mas de la idea que lo instales con la misma vercion, hay algo en el .conf que no estas tomando encuenta, lamentablemente no tengo todo el panorama para ubicar el problema.

    la configuracion del free pbx es igual en las dos?
     
  7. Deviant

    Joined:
    Feb 26, 2008
    Messages:
    117
    Likes Received:
    0
    ummmm no hay dos E1 en la que no me funciona y en la que si me funciona tengo una tarjeta E1 Digium y una TDM2400P lo cual creo es el problema, no se mi me recomiendas meter este contexto en extensions_additional.conf para ver si me sirve?

    gracias por tus respuestas.
     
  8. jcastellanos

    Joined:
    Feb 10, 2009
    Messages:
    2,404
    Likes Received:
    0
    si claro, intentalo, aunuq eno creo que funcione asi, nadamas respalda antes por cualquier cosa.

    saludos
     
  9. Deviant

    Joined:
    Feb 26, 2008
    Messages:
    117
    Likes Received:
    0
    Ok Jcastellanos lo configure asi y si me funciono todo sale bien las llamdas se cortan a los 2:57 segundos y las que puse en el listado no se cortan muchas gracias por tus prontas respuestas.
     
  10. jcastellanos

    Joined:
    Feb 10, 2009
    Messages:
    2,404
    Likes Received:
    0
    ok, que gusto que funcionara, recuerda que cualquier cosa por aqui andamos :)
     

Share This Page