Cursos Asterisk en México

Cambiar id caller a una sola extension

Colapsar

Anuncio

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

  • Cambiar id caller a una sola extension

    Tengo asterisk 1.8 y todo funciona de maravilla, pero ahora me piden que a una sola de las extensiones le quite el identificador de llamadas, ya que el usuario no contesta ciertos numeros asi que no queremos darle esas opcion y queremos que diga llamada entrante en vez del numero para que conteste todo,

    yo puse esto en extension_custom.conf pero no me funciona podrian ayudarme y decirme donde esta mi error

    exten => 7035,n,GotoIf($["${CALLERID(name)}" != "XXXXXXXXXX" ] ?changecallerID)
    exten => 7035,n,(changecallerID),Set(CALLERID(name)="Llamad a entrante")

    Gracias

  • #2
    Quita la coma sobrante:

    Código:
    exten => 7035,n,(changecallerID),Set(CALLERID(name)="Llamad a entrante")
    se reemplaza por:

    Código:
    exten => 7035,n(changecallerID),Set(CALLERID(name)="Llamad a entrante")

    Aunque por lo que veo, todo sería más sencillo si reemplazas las 2 lineas por:
    Código:
    exten => 7035,n,ExecIf($["${CALLERID(name)}" != "XXXXXXXXXX" ]?Set(CALLERID(name)="Llamad a entrante"))
    y así te ahorras el salto.

    Saludos,
    dCAP Christian Cabrera R.
    Para aprender a usar Asterisk, asiste a uno de mis cursos Asterisk
    Si deseas asesoría pagada, por favor contáctame

    Comentario


    • #3
      Gracias por la respuesta pero sigue sin funcionarme, como te mecione yo lo pongo en extensions_custom.conf y no hace nada sigue apareciendo el caller id, esto es parte de lo que tengo en este archivo, no se si se me este pasando algo o como decirle a la extension que use este contexto

      ; 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.

      [from-internal-custom]
      exten => 1234,1,Playback(demo-congrats) ; extensions can dial 1234
      exten => 1234,2,Hangup()
      exten => h,1,Hangup()
      exten => 7035,n,ExecIf($["${CALLERID(name)}" != "XXXXXXXXXX" ]?Set(CALLERID(name)="Llamada entrante"))
      include => agentlogin
      include => conferences
      include => calendar-event
      include => weather-wakeup

      y con esta misma instruccion pude funcionar para las llamdas por extension o ahi tendria que poner esto ya que mis extensiones son de 4 digitos

      exten => 7035,n,ExecIf($["${CALLERID(name)}" != "XXXX" ]?Set(CALLERID(name)="Llamada entrante"))

      Comentario


      • #4
        puedes poner la salida en el CLI cuando haces la llamada y no funciona?
        Y te recomendaŕia usar Set(CALLERID(all)="Lllamada entrante" <9999>)
        Hector Alvarez
        dCAP Certified #2199
        http://mx.linkedin.com/in/alvarezhector/

        Comentario


        • #5
          Hice una llamada desde una extension con Zoiper y esto es lo que me muestra el CLI, en el telefono me dice Andrea Torres

          [root@PBX-Brico ~]# asterisk -r
          Verbosity is at least 3
          -- Remote UNIX connection disconnected
          -- Remote UNIX connection
          == Using SIP RTP TOS bits 184
          == Using SIP RTP CoS mark 5
          -- Executing [7035@from-internal:1] Macro("SIP/7052-00001b51", "exten-vm,7035,7035") in new stack
          -- Executing [s@macro-exten-vm:1] Macro("SIP/7052-00001b51", "user-callerid") in new stack
          -- Executing [s@macro-user-callerid:1] Set("SIP/7052-00001b51", "AMPUSER=7052") in new stack
          -- Executing [s@macro-user-callerid:2] GotoIf("SIP/7052-00001b51", "0?repor") in new stack
          -- Executing [s@macro-user-callerid:3] ExecIf("SIP/7052-00001b51", "1?Set(REALCALLERIDNUM=7052)") in new stack
          -- Executing [s@macro-user-callerid:4] Set("SIP/7052-00001b51", "AMPUSER=7052") in new stack
          -- Executing [s@macro-user-callerid:5] Set("SIP/7052-00001b51", "AMPUSERCIDNAME=Andrea Torres") in new stack
          -- Executing [s@macro-user-callerid:6] GotoIf("SIP/7052-00001b51", "0?repor") in new stack
          -- Executing [s@macro-user-callerid:7] Set("SIP/7052-00001b51", "AMPUSERCID=7052") in new stack
          -- Executing [s@macro-user-callerid:8] Set("SIP/7052-00001b51", "CALLERID(all)="Andrea Torres" <7052>") in new stack
          -- Executing [s@macro-user-callerid:9] ExecIf("SIP/7052-00001b51", "0?Set(CHANNEL(language)=)") in new stack
          -- Executing [s@macro-user-callerid:10] GotoIf("SIP/7052-00001b51", "0?continue") in new stack
          -- Executing [s@macro-user-callerid:11] Set("SIP/7052-00001b51", "__TTL=64") in new stack
          -- Executing [s@macro-user-callerid:12] GotoIf("SIP/7052-00001b51", "1?continue") in new stack
          -- Goto (macro-user-callerid,s,19) -- Executing [s@macro-user-callerid:19] Set("SIP/7052-00001b51", "CALLERID(number)=7052") in new stack
          -- Executing [s@macro-user-callerid:20] Set("SIP/7052-00001b51", "CALLERID(name)=Andrea Torres")in new stack
          -- Executing [s@macro-user-callerid:21] NoOp("SIP/7052-00001b51", "Using CallerID "Andrea Torres" <7052>") in new stack
          -- Executing [s@macro-exten-vm:2] Set("SIP/7052-00001b51", "RingGroupMethod=none") in new stack
          -- Executing [s@macro-exten-vm:3] Set("SIP/7052-00001b51", "VMBOX=7035") innew stack
          -- Executing [s@macro-exten-vm:4] Set("SIP/7052-00001b51", "__EXTTOCALL=7035") in new stack
          -- Executing [s@macro-exten-vm:5] Set("SIP/7052-00001b51", "CFUEXT=") in new stack
          -- Executing [s@macro-exten-vm:6] Set("SIP/7052-00001b51", "CFBEXT=") in new stack
          -- Executing [s@macro-exten-vm:7] Set("SIP/7052-00001b51", "RT=15") in new stack
          -- Executing [s@macro-exten-vm:8] Macro("SIP/7052-00001b51", "record-enable,7035,IN") in new stack
          -- Executing [s@macro-record-enable:1] GotoIf("SIP/7052-00001b51", "1?check") in new stack
          -- Goto (macro-record-enable,s,4)
          -- Executing [s@macro-record-enable:4] ExecIf("SIP/7052-00001b51", "0?MacroExit()") in new stack
          -- Executing [s@macro-record-enable:5] GotoIf("SIP/7052-00001b51", "0?Group:OUT") in new stack
          -- Goto (macro-record-enable,s,15)
          -- Executing [s@macro-record-enable:15] GotoIf("SIP/7052-00001b51", "1?IN")in new stack
          -- Goto (macro-record-enable,s,20)
          -- Executing [s@macro-record-enable:20] ExecIf("SIP/7052-00001b51", "1?MacroExit()") in new stack
          -- Executing [s@macro-exten-vm:9] Macro("SIP/7052-00001b51", "dial-one,15,tr,7035") in new stack
          -- Executing [s@macro-dial-one:1] Set("SIP/7052-00001b51", "DEXTEN=7035") in new stack
          -- Executing [s@macro-dial-one:2] Set("SIP/7052-00001b51", "DIALSTATUS_CW=") in new stack
          -- Executing [s@macro-dial-one:3] GosubIf("SIP/7052-00001b51", "0?screen,1") in new stack
          -- Executing [s@macro-dial-one:4] GosubIf("SIP/7052-00001b51", "0?cf,1") innew stack
          -- Executing [s@macro-dial-one:5] GotoIf("SIP/7052-00001b51", "1?skip1") innew stack
          -- Goto (macro-dial-one,s,8)
          -- Executing [s@macro-dial-one:8] GotoIf("SIP/7052-00001b51", "0?nodial") in new stack
          -- Executing [s@macro-dial-one:9] GotoIf("SIP/7052-00001b51", "0?continue")in new stack
          -- Executing [s@macro-dial-one:10] Set("SIP/7052-00001b51", "EXTHASCW=ENABLED") in new stack
          -- Executing [s@macro-dial-one:11] GotoIf("SIP/7052-00001b51", "0?next1:cwinusebusy") in new stack
          -- Goto (macro-dial-one,s,23)
          -- Executing [s@macro-dial-one:23] GotoIf("SIP/7052-00001b51", "1?next3:continue") in new stack
          -- Goto (macro-dial-one,s,24)
          -- Executing [s@macro-dial-one:24] ExecIf("SIP/7052-00001b51", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
          -- Executing [s@macro-dial-one:25] GotoIf("SIP/7052-00001b51", "0?nodial") in new stack
          -- Executing [s@macro-dial-one:26] GosubIf("SIP/7052-00001b51", "1?dstring,1:dlocal,1") in new stack
          -- Executing [dstring@macro-dial-one:1] Set("SIP/7052-00001b51", "DSTRING=") in new stack
          -- Executing [dstring@macro-dial-one:2] Set("SIP/7052-00001b51", "DEVICES=7035") in new stack
          -- Executing [dstring@macro-dial-one:3] ExecIf("SIP/7052-00001b51", "0?Return()") in new stack
          -- Executing [dstring@macro-dial-one:4] ExecIf("SIP/7052-00001b51", "0?Set(DEVICES=7035)") in new stack
          -- Executing [dstring@macro-dial-one:5] Set("SIP/7052-00001b51", "LOOPCNT=1") in new stack
          -- Executing [dstring@macro-dial-one:6] Set("SIP/7052-00001b51", "ITER=1") in new stack
          -- Executing [dstring@macro-dial-one:7] Set("SIP/7052-00001b51", "THISDIAL=SIP/7035") in new stack
          -- Executing [dstring@macro-dial-one:8] GosubIf("SIP/7052-00001b51", "1?zap2dahdi,1") in new stack
          -- Executing [zap2dahdi@macro-dial-one:1] ExecIf("SIP/7052-00001b51", "0?Return()") in new stack
          -- Executing [zap2dahdi@macro-dial-one:2] Set("SIP/7052-00001b51", "NEWDIAL") in new stack
          -- Executing [zap2dahdi@macro-dial-one:3] Set("SIP/7052-00001b51", "LOOPCNT2=1") in new stack
          -- Executing [zap2dahdi@macro-dial-one:4] Set("SIP/7052-00001b51", "ITER2=1") in new stack
          -- Executing [zap2dahdi@macro-dial-one:5] Set("SIP/7052-00001b51", "THISPART2=SIP/7035") in new stack
          -- Executing [zap2dahdi@macro-dial-one:6] ExecIf("SIP/7052-00001b51", "0?Set(THISPART2=DAHDI/7035)") in new stack
          -- Executing [zap2dahdi@macro-dial-one:7] Set("SIP/7052-00001b51", "NEWDIAL=SIP/7035&") in new stack
          -- Executing [zap2dahdi@macro-dial-one:8] Set("SIP/7052-00001b51", "ITER2=2") in new stack
          -- Executing [zap2dahdi@macro-dial-one:9] GotoIf("SIP/7052-00001b51", "0?begin2") in new stack
          -- Executing [zap2dahdi@macro-dial-one:10] Set("SIP/7052-00001b51", "THISDIAL=SIP/7035") in new stack
          -- Executing [zap2dahdi@macro-dial-one:11] Return("SIP/7052-00001b51", "") in new stack
          -- Executing [dstring@macro-dial-one:9] Set("SIP/7052-00001b51", "DSTRING=SIP/7035&") in new stack
          -- Executing [dstring@macro-dial-one:10] Set("SIP/7052-00001b51", "ITER=2")in new stack
          -- Executing [dstring@macro-dial-one:11] GotoIf("SIP/7052-00001b51", "0?begin") in new stack
          -- Executing [dstring@macro-dial-one:12] Set("SIP/7052-00001b51", "DSTRING=SIP/7035") in new stack
          -- Executing [dstring@macro-dial-one:13] Return("SIP/7052-00001b51", "") innew stack
          -- Executing [s@macro-dial-one:27] GotoIf("SIP/7052-00001b51", "0?nodial") in new stack
          -- Executing [s@macro-dial-one:28] GotoIf("SIP/7052-00001b51", "1?skiptrace") in new stack
          -- Goto (macro-dial-one,s,30)
          -- Executing [s@macro-dial-one:30] Set("SIP/7052-00001b51", "D_OPTIONS=tr")in new stack
          -- Executing [s@macro-dial-one:31] ExecIf("SIP/7052-00001b51", "0?SIPAddHeader(Alert-Info: )") in new stack
          -- Executing [s@macro-dial-one:32] ExecIf("SIP/7052-00001b51", "0?SIPAddHeader()") in new stack
          -- Executing [s@macro-dial-one:33] ExecIf("SIP/7052-00001b51", "0?Set(CHANNEL(musicclass)=)") in new stack
          -- Executing [s@macro-dial-one:34] GosubIf("SIP/7052-00001b51", "0?qwait,1") in new stack
          -- Executing [s@macro-dial-one:35] Set("SIP/7052-00001b51", "__CWIGNORE=") in new stack
          -- Executing [s@macro-dial-one:36] Set("SIP/7052-00001b51", "__KEEPCID=TRUE") in new stack
          -- Executing [s@macro-dial-one:37] Dial("SIP/7052-00001b51", "SIP/7035,15,t") in new stack

          Comentario


          • #6
            == Using SIP RTP TOS bits 184
            == Using SIP RTP CoS mark 5
            -- Called SIP/7035
            -- SIP/7035-00001b52 is ringing
            == Spawn extension (macro-dial-one, s, 37) exited non-zero on 'SIP/7052-00001b51' in macro 'dial-one'
            == Spawn extension (macro-exten-vm, s, 9) exited non-zero on 'SIP/7052-00001b51' in macro 'exten-vm'
            == Spawn extension (from-internal, 7035, 1) exited non-zero on 'SIP/7052-00001b51'
            -- Executing [h@from-internal:1] Macro("SIP/7052-00001b51", "hangupcall") in new stack
            -- Executing [s@macro-hangupcall:1] GotoIf("SIP/7052-00001b51", "1?endmixmoncheck") in new stack
            -- Goto (macro-hangupcall,s,9)
            -- Executing [s@macro-hangupcall:9] NoOp("SIP/7052-00001b51", "End of MIXMON check") in new stack
            -- Executing [s@macro-hangupcall:10] GotoIf("SIP/7052-00001b51", "1?nomeetmemon") in new stack
            -- Goto (macro-hangupcall,s,28)
            -- Executing [s@macro-hangupcall:28] NoOp("SIP/7052-00001b51", "End of MEETME check") in new stack
            -- Executing [s@macro-hangupcall:29] GotoIf("SIP/7052-00001b51", "1?noautomon") in new stack
            -- Goto (macro-hangupcall,s,34)
            -- Executing [s@macro-hangupcall:34] NoOp("SIP/7052-00001b51", "TOUCH_MONITOR_OUTPUT=") in new stack
            -- Executing [s@macro-hangupcall:35] GotoIf("SIP/7052-00001b51", "1?noautomon2") in new stack
            -- Goto (macro-hangupcall,s,41)
            -- Executing [s@macro-hangupcall:41] NoOp("SIP/7052-00001b51", "MONITOR_FILENAME=") in new stack
            -- Executing [s@macro-hangupcall:42] GotoIf("SIP/7052-00001b51", "1?skiprg") in new stack
            -- Goto (macro-hangupcall,s,45)
            -- Executing [s@macro-hangupcall:45] GotoIf("SIP/7052-00001b51", "1?skipblkvm") in new stack
            -- Goto (macro-hangupcall,s,48)
            -- Executing [s@macro-hangupcall:48] GotoIf("SIP/7052-00001b51", "1?theend") in new stack
            -- Goto (macro-hangupcall,s,50)
            -- Executing [s@macro-hangupcall:50] AGI("SIP/7052-00001b51", "hangup.agi")in new stack
            -- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
            -- <SIP/7052-00001b51>AGI Script hangup.agi completed, returning 0
            -- Executing [s@macro-hangupcall:51] Hangup("SIP/7052-00001b51", "") in newstack
            == Spawn extension (macro-hangupcall, s, 51) exited non-zero on 'SIP/7052-00001b51' in macro 'hangupcall'
            == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/7052-00001b51'
            PBX-Brico*CLI>



            Y lo que me recomiendas deberia de quedar asi en el 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.

            [from-internal-custom]
            exten => 1234,1,Playback(demo-congrats) ; extensions can dial 1234
            exten => 1234,2,Hangup()
            exten => h,1,Hangup()
            exten => 7035,n,ExecIf($["${CALLERID(name)}" != "XXXXXXXXXX" ]?Set(CALLERID(all)="Lllamada entrante" <9999>))
            include => agentlogin
            include => conferences
            include => calendar-event
            include => weather-wakeup

            Comentario


            • #7
              Yo veo dos cosas:

              1) Para que sea válido en freepbx deberías hacer un override al macro que marca hacia las extensiones, incluyendolo en el custom.conf no tiene mucho efecto dado que nunca llega ahí. Además debes notar que tu prioridad es n y no 1.

              2) Lo segundo es que tu estas poniendo la comparación del callerid contra un string de 10 equis: "XXXXXXXXXX" las comillas en la comparación son tomadas tal cual. Creo que deberías comparar contra un string vacío o anónimo.

              Comentario


              • #8
                Supongo que la instruccion deberia de quedar asi:

                exten => 7035,1,ExecIf($["${CALLERID(all)}" != "" ]?Set(CALLERID(all)="Lllamada entrante" <9999>))

                Solo debo encontrar en donde ponerla para que sea llamada.... podria ponerla directamente en el sip.conf???

                Comentario


                • #9
                  Paloma, creo que necesitas primero comprender un poco como se construyen los dialplan en asterisk, échale una leída a los capítulos 6 y 10 del libro Asterisk The Definitive Guide (http://it-ebooks.info/read/2332/)... despues de eso creo que podrás moverlo muy fácil...

                  Podrías modificar el macro-user-callerid y pongas:

                  exten=>same,n,ExecIf($[${EXTEN}=7035]?Set(CALLERID(all)="Llamada entrante" <9999>))
                  Hector Alvarez
                  dCAP Certified #2199
                  http://mx.linkedin.com/in/alvarezhector/

                  Comentario

                  Nube de Etiquetas

                  Colapsar

                  Principales Usuarios Activos

                  Colapsar

                  No hay usuarios activos superiores.
                  Trabajando...
                  X