Cursos Asterisk en México

[RESUELTO] Grabar llamadas desde una cola dependiendo del agente

Colapsar

Anuncio

Colapsar
No hay anuncio todavía.
X
 
  • Filtrar
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes

  • [RESUELTO] Grabar llamadas desde una cola dependiendo del agente

    Hola que tal como estan? LEs comento mi problemita.. mi entencion es grabar llamadas de algunos agentes de acuerdo si les seteo la opcion o no.
    Utilizo canales locales en la cola para interceptar a quien va a ser el agente que va a atender...segun eso ejecuto o no Mixmonitor y luego dial().
    El tema es que todo me resulta bien..salvo que el file de audio que se graba es muy chiquito y no contiene la grabacion.

    queues.conf

    Q-Prueba]

    setinterfacevar=yes
    setqueuevar=yes
    music=default
    ; monitor-type = MixMonitor
    ; monitor-format = gsm
    strategy=ringall
    timeout=45
    retry=5
    wrapuptime=0
    maxlen = 0
    announce-frequency = 0
    announce-holdtime = no
    member => Local/SIP-9515@MemberConnector,,,SIP/9515
    member => Local/SIP-9501@MemberConnector,,,SIP/9501

    [MemberConnector]

    exten => _[A-Za-z0-9].,1,Verbose(2,Connecting ${CALLERID(all)} to Agent at ${EXTEN})
    ; filter out any bad characters, allowing alphanumeric characters and the hyphen

    same => n,Set(QueueMember=${FILTER(A-Za-z0-9\-,${EXTEN})})

    ;assign the first field of QueueMember to Technology using the hyphen separator
    same => n,Set(Technology=${CUT(QueueMember,-,1)})

    ; assign the second field of QueueMember to Device using the hyphen separator
    same => n,Set(Device=${CUT(QueueMember,-,2)})


    ; Averiguamos si el llamante tiene q ser grabado...

    same => n,AGI(tieneGrab.php,6,8,${Device}) ; si al agente se lo debe grabar entonces salta a traves del Agi a la posicion 6 sino a la 8


    same => 6,set(guardarCdr="1")

    same => 7,MixMonitor(/var/www/html/rec2/recs/${UNIQUEID}.gsm,b)

    ; dial the agent

    same => 8,Dial(${Technology}/${Device},25,Tt)

    ;same => n,stopMonitor() ; descomentando esto me da el mismo resultado

    same => n,Hangup()

    Al momento de chequear los files de grabaciones detecto que se grabo pero solo un segundo..

    Que esta pasando??

  • #2
    Y el log de tu CLI? Intenta quitar el flag de solo on bridge del MixMonitor igual y te esta ruido con el local channel.

    Comentario


    • #3
      Gracias por la respuesta, aqui va el log del cli:

      - Executing [SIP-9515@MemberConnector:2] Set("Local/SIP-9515@MemberConnector-0000004d;2", "QueueMember=SIP-9515") in new stack
      -- Executing [SIP-9515@MemberConnector:3] Set("Local/SIP-9515@MemberConnector-0000004d;2", "Technology=SIP") in new stack
      -- Executing [SIP-9515@MemberConnector:4] Set("Local/SIP-9515@MemberConnector-0000004d;2", "Device=9515") in new stack
      -- Executing [SIP-9515@MemberConnector:5] AGI("Local/SIP-9515@MemberConnector-0000004d;2", "tieneGrab.php,6,8,9515") in new stack
      -- Launched AGI Script /var/lib/asterisk/agi-bin/tieneGrab.php
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_request: tieneGrab.php
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_channel: Local/SIP-9515@MemberConnector-0000004d;2
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_language: en
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_type: Local
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_request: tieneGrab.php
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_channel: Local/SIP-9501@MemberConnector-0000004c;2
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_language: en
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_type: Local
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_uniqueid: 1382980321.207
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_version: 11.0.0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_callerid: 9514
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_calleridname: Interno 9514
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_callingpres: 0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_callingani2: 0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_callington: 0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_callingtns: 0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_dnid: unknown
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_rdnis: unknown
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_context: MemberConnector
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_extension: SIP-9501
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_priority: 5
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_enhanced: 0.0
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_accountcode:
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_threadid: 1117800768
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_arg_1: 6
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_arg_2: 8
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> agi_arg_3: 9501
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >>
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_uniqueid: 1382980321.209
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_version: 11.0.0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_callerid: 9514
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_calleridname: Interno 9514
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_callingpres: 0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_callingani2: 0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_callington: 0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_callingtns: 0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_dnid: unknown
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_rdnis: unknown
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_context: MemberConnector
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_extension: SIP-9515
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_priority: 5
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_enhanced: 0.0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_accountcode:
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_threadid: 1080912192
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_arg_1: 6
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_arg_2: 8
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> agi_arg_3: 9515
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >>
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Rx << VERBOSE "SELECT * FROM empExt WHERE extension = 9515"
      tieneGrab.php,6,8,9515: SELECT * FROM empExt WHERE extension = 9515
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> 200 result=1
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Rx << VERBOSE "SELECT * FROM empExt WHERE extension = 9501"
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Rx << VERBOSE "grab habilitada" 1
      tieneGrab.php,6,8,9515: grab habilitada
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> 200 result=1
      tieneGrab.php,6,8,9501: SELECT * FROM empExt WHERE extension = 9501
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> 200 result=1
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Rx << VERBOSE "grab habilitada" 1
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Rx << EXEC GoTo 6
      -- AGI Script Executing Application: (GoTo) Options: (6)
      tieneGrab.php,6,8,9501: grab habilitada
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> 200 result=1

      -- Goto (MemberConnector,SIP-9515,6)
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Rx << EXEC GoTo 6
      -- AGI Script Executing Application: (GoTo) Options: (6)
      -- Goto (MemberConnector,SIP-9501,6)
      <Local/SIP-9501@MemberConnector-0000004c;2>AGI Tx >> 200 result=0
      <Local/SIP-9515@MemberConnector-0000004d;2>AGI Tx >> 200 result=0
      -- <Local/SIP-9501@MemberConnector-0000004c;2>AGI Script tieneGrab.php completed, returning 0
      -- <Local/SIP-9515@MemberConnector-0000004d;2>AGI Script tieneGrab.php completed, returning 0
      -- Executing [SIP-9515@MemberConnector:6] Set("Local/SIP-9515@MemberConnector-0000004d;2", "guardarCdr="1"") in new stack
      -- Executing [SIP-9501@MemberConnector:6] Set("Local/SIP-9501@MemberConnector-0000004c;2", "guardarCdr="1"") in new stack
      -- Executing [SIP-9501@MemberConnector:7] MixMonitor("Local/SIP-9501@MemberConnector-0000004c;2", "/var/www/html/rec2/recs/1382980321.207.gsm,b") in new stack
      -- Executing [SIP-9515@MemberConnector:7] MixMonitor("Local/SIP-9515@MemberConnector-0000004d;2", "/var/www/html/rec2/recs/1382980321.209.gsm,b") in new stack
      -- Executing [SIP-9501@MemberConnector:8] Dial("Local/SIP-9501@MemberConnector-0000004c;2", "SIP/9501,25,Tt") in new stack
      == Begin MixMonitor Recording Local/SIP-9515@MemberConnector-0000004d;2
      == Using SIP RTP CoS mark 5
      -- Executing [SIP-9515@MemberConnector:8] Dial("Local/SIP-9515@MemberConnector-0000004d;2", "SIP/9515,25,Tt") in new stack
      == Begin MixMonitor Recording Local/SIP-9501@MemberConnector-0000004c;2
      == Using SIP RTP CoS mark 5
      -- Called SIP/9501
      -- Local/SIP-9501@MemberConnector-0000004c;1 connected line has changed. Saving it until answer for SIP/9514-00000035
      -- Local/SIP-9501@MemberConnector-0000004c;1 connected line has changed. Saving it until answer for SIP/9514-00000035
      -- Called SIP/9515
      -- Local/SIP-9515@MemberConnector-0000004d;1 connected line has changed. Saving it until answer for SIP/9514-00000035
      -- Local/SIP-9515@MemberConnector-0000004d;1 connected line has changed. Saving it until answer for SIP/9514-00000035
      -- SIP/9501-00000036 is ringing
      -- Local/SIP-9501@MemberConnector-0000004c;1 is ringing
      -- SIP/9515-00000037 is ringing
      -- Local/SIP-9515@MemberConnector-0000004d;1 is ringing
      -- SIP/9515-00000037 answered Local/SIP-9515@MemberConnector-0000004d;2
      -- Local/SIP-9515@MemberConnector-0000004d;1 connected line has changed. Saving it until answer for SIP/9514-00000035
      -- Local/SIP-9515@MemberConnector-0000004d;1 answered SIP/9514-00000035
      -- Stopped music on hold on SIP/9514-00000035
      == Spawn extension (MemberConnector, SIP-9501, 8) exited non-zero on 'Local/SIP-9501@MemberConnector-0000004c;2'
      == MixMonitor close filestream (mixed)
      == End MixMonitor Recording Local/SIP-9501@MemberConnector-0000004c;2
      == Spawn extension (MemberConnector, SIP-9515, 8) exited non-zero on 'Local/SIP-9515@MemberConnector-0000004d;2'
      == MixMonitor close filestream (mixed)
      == End MixMonitor Recording Local/SIP-9515@MemberConnector-0000004d;2


      Ahora voy a probar quitar el flag b de mixmonitor y te comento.

      Comentario


      • #4
        Solucionado navaismo era el flag b, no deberia por que....pero bueno ahora graba bien. Saludos y gracias!

        Comentario


        • #5
          2 - tengo otro script en el que requiero borrar solo un numero detro de una tabla , osea que al llamar a una extensión reproducirá introduzca el numero y después lo digitamos y con una sentencia de sql lo deberia borrar.
          www.pass4sure.co.uk
          http://www.eccouncil.org/
          http://www.ucla.edu/
          http://en.wikipedia.org/wiki/EC-Council

          Comentario


          • #6
            Con un script AGI lo pieces hacer o bien desde el dialplan con READ y App_MySQL para versiones viejas o func_ODBC.

            Comentario

            Nube de Etiquetas

            Colapsar

            Principales Usuarios Activos

            Colapsar

            No hay usuarios activos superiores.
            Trabajando...
            X