Get the Uniqueid of Action Originate in the AMI

Home » Asterisk Users » Get the Uniqueid of Action Originate in the AMI
Asterisk Users 5 Comments

Hi to all.

I’m begin a use the AMI and i have the need to get the uniqueid from the
call i have generate using the Action Originate. Anyone can help me?

When I generate these commands:

action: Originate
channel: SIP/101
application: Dial
data: SIP/100,120,Ttr

The only response I get when the call is answered, is this:

Response: Success
Message: Originate successfully queued

Thanks a lots,

5 thoughts on - Get the Uniqueid of Action Originate in the AMI

  • El 08/11/10 13:12, Rodrigo Lang escribió:
    Hi,

    If you are using the originate action in asynchronous mode, you will
    receive the uniqueid of the originated call in the OriginateResponse
    event, not in the response of the action.

    Regards,

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Rodrigo Lang
    Sent: Monday, November 08, 2010 12:12 PM

    Hi to all.

    I’m begin a use the AMI and i have the need to get the uniqueid from the
    call i have generate using the Action Originate. Anyone can help me?

    When I generate these commands:

    action: Originate
    channel: SIP/101
    application: Dial
    data: SIP/100,120,Ttr

    The only response I get when the call is answered, is this:

    Response: Success
    Message: Originate successfully queued

    If you generate this from an AGI, you can query the output and get the
    uniqueid from that. If you are doing it via a Call file or some other
    method, you are probably out of luck.

  • Set event on while login into AMI and set your own uniqueid using action
    ID for that call .
    Example :
    action: login
    Username: your_user
    Secret: your_secret
    Event: On

    action: Originate
    channel: SIP/101
    application: Dial
    data: SIP/100,120,Ttr
    ActionId: yourID

    Hope that will help.

    On Mon, Nov 8, 2010 at 1:12 PM, Rodrigo Lang
    wrote:

  • The other thing you can do is put UserEvent() calls in your dialplan that can have pretty much anything you want in them.

    exten => s,5,UserEvent(DidQueue,${UNIQUEID} & ${CHANNEL})

  • Thanks a lot to all for the responses. I begin to use the event
    OriginateResponse, it’s what i need.

    Thanks again.

    Best regards,