Execute AGI on event

Discussion in 'General' started by asepulveda, May 11, 2009.

  1. asepulveda

    Joined:
    Jun 23, 2008
    Messages:
    400
    Likes Received:
    0
    Hi everyone!
    Hope you can help me with this problem ,
    I have a call center solution , the idea is to execute an AGI when an agent take a call from the queue , this AGI will send the Caller ID and the agent number to another program that will return the client information into the agent screen, the agents are static so the program will send the info to the ip that match with the agent number ,

    the problem here is that i have been reading that there is not any way of executing an AGI with an event , Someone have any idea?? Can i execute an AGI or script to make this when the agent take the call?

    This call center use queue and ring all strategy because there are many calls every day so the free agent take the call.

    Help Please!!!

    Rewards
     
  2. asepulveda

    Joined:
    Jun 23, 2008
    Messages:
    400
    Likes Received:
    0
    Ok , after a day of making some test i finally be able to execute an agi when an agent hang up a call ,

    for more info take a look to http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue

    First of all you create your queue , in freepbx or manually , then you make your dial plan , like this:

    exten => s,1,Answer
    exten => s,2,SetMusicOnHold(default)
    exten => s,3,DigitTimeout,5
    exten => s,4,ResponseTimeout,10
    exten => s,5,Background(welcome)
    exten => s,6,Queue(sales,t,,,,enumlookup.agi)

    finally i get this in terminal


    AGI Script dialparties.agi completed, returning 0
    -- Executing [s@macro-dial:7] Dial("Local/468@from-internal-235e,2", "SIP/468|15|trM(auto-blkvm)") in new stack
    -- Called 468>
    -- Local/468@from-internal-235e,1 is ringing
    -- SIP/468-08964ea0 is ringing
    -- SIP/468-08964ea0 is ringing
    -- SIP/468-08964ea0 is ringing
    -- SIP/468-08964ea0 answered Local/468@from-internal-235e,2
    -- Executing [s@macro-auto-blkvm:1] Set("SIP/468-08964ea0", "__MACRO_RESULT=") in new stack
    -- Executing [s@macro-auto-blkvm:2] DBdel("SIP/468-08964ea0", "BLKVM/100/SIP/469-08907318") in new stack
    -- DBdel: family=BLKVM, key=100/SIP/469-08907318
    -- Local/468@from-internal-235e,1 answered SIP/469-08907318
    -- Stopped music on hold on SIP/469-08907318
    -- Launched AGI Script /var/lib/asterisk/agi-bin/enumlookup.agi
    -- enumlookup.agi: Looking up on e164.org via dns_get_record
    -- enumlookup.agi: Setting DIALARR to
    -- AGI Script enumlookup.agi completed, returning 0
    -- Executing [h@macro-dial:1] Macro("Local/468@from-internal-235e,2", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("Local/468@from-internal-235e,2", "w") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("Local/468@from-internal-235e,2", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("Local/468

    I use enumlookup.agi only for test

    Now my new problem is to create an agi that can take caller id and the agent number or the extension number that
    hank up , any ideas? did some one have an example of how to do this??

    rewards
     
  3. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    the "Queue" command doesn't give back any parameter, like the Ext of agent that you want!..
    I think you should choose a language to programming, you can do more in that environment,
     
  4. asepulveda

    Joined:
    Jun 23, 2008
    Messages:
    400
    Likes Received:
    0
    Well , the AGI cammand on the queue is just to be able to execute a program , when the agent hang up , i read that taking the caller id is not so hard , the hard stuff is taking the agent or extensión number that hang up
     
  5. asepulveda

    Joined:
    Jun 23, 2008
    Messages:
    400
    Likes Received:
    0
    I solve this!! thanks for your help , you were rigth , queue command does not give any parameter , i make some agi work and dial plan work , tomorrow i post he solution
     
  6. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    I am happy for you,;)

    Good Luck
     
  7. josegb

    Joined:
    May 15, 2009
    Messages:
    8
    Likes Received:
    0
    Le estaria muy agradecido si pusiera la solución que ha encontrado, yo necesito algo similar a ese problema.
    Gracias.
     
  8. haamed

    Joined:
    Jul 23, 2007
    Messages:
    251
    Likes Received:
    0
    Please write in English ;)
     
  9. asepulveda

    Joined:
    Jun 23, 2008
    Messages:
    400
    Likes Received:
    0
    Que tal josé , claro que si te puedo apoyar , platicame que es lo que necesitas hacer y de esta forma es mas fácil ue te oriente.

    saludos


    Hi Jose, off course i can help you, tell me more about what you want to do so I can help you better.

    cheers
     
  10. josegb

    Joined:
    May 15, 2009
    Messages:
    8
    Likes Received:
    0
    Gracias por tu ofrecimiento. Te cuento lo que necesito hacer.
    Necesito lanzar un AGI en el momento que el receptor de la llamada pulse una determinada combinación de teclas en el teléfono, por ejemplo, *44.
    ¿sabes como hacer esto?
    Gracias y un saludo.
     

Share This Page