[asterisk-users] UNIQUEID not the same in Dialplan as passed to AGI
Danny Nicholas
danny at debsinc.com
Wed Sep 9 08:14:51 CDT 2009
To quote Steve Edwards from an earlier post this month "The UniqueID
consists of the origination time plus the number of calls for this instance
of the Asterisk execution". Looking at the log you posted, these are two
separate (as far as Asterisk is concerned) calls. If you look in your CDR,
you should see an entry for each. If you want to track a call via an AGI,
you should do this:
- exten => s,1,set(thisuid=${UNIQUEID})
- exten => s,2,AGI(youragi.agi|${thisuid})
Just a guess, but UNIQUEID is probably reassigned on these events;
Hangup
Fork
Transfer
(go ahead guys, correct away - like I said, it's just a guess).
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Örn Arnarson
Sent: Wednesday, September 09, 2009 7:56 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] UNIQUEID not the same in Dialplan as passed to AGI
Hi,
I've noticed that the UNIQUEID for a call is not the same in the
Dialplan (when executed e.g. exten => s,n,NoOp(${UNIQUEID}) as it is
when passed via STDIN to an AGI script.
Is this normal, and is this supposed to behave this way?
The UNIQUEID received in the AGI is usually .001 higher than the one
in the dial plan -- but sometimes it is also a second behind.
Here's an example from the dialplan, with the corresponding argument
passed to the AGI:
-- Executing [s at macro-internal-call:7]
NoOp("SIP/10.0.0.4-082a0658", "1252500374.334") in new stack
agi_uniqueid: 1252500374.335
And here's an example where the UNIQUEID is one second and one
fraction point behind:
-- Executing [s at macro-internal-call:7]
NoOp("SIP/10.0.0.4-0825ef60", "1252500762.337") in new stack
agi_uniqueid: 1252500763.338
Any advice would be greatly appreciated. Can I use something else as a
unique identifier for a call? I'm trying to tag calls, but it is
proving difficult with the ever-changing UNIQUEID.
I haven't found a rule as to when it is delayed by a second and when it
isn't.
Best regards,
Örn
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list