yes exactly.<br><br><div class="gmail_quote">2008/4/14 UV &lt;<a href="mailto:uv@talknet.com.au">uv@talknet.com.au</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">












<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Excellent.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">So just to clarify, from the "Event-Name:
CHANNEL_ORIGINATE" event, every thereafter will include the custom variable_{vars}.
According to this, I'd only miss the two Event-Names: CHANNEL_CREATE and CHANNEL_OUTGOING
(which I don't really need).</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks!</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Anthony Minessale<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, April 15, 2008 3:31
AM<div><div></div><div class="Wj3C7c"><br>
<b><span style="font-weight: bold;">To:</span></b>
<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users]
event BACKGROUND too late inORIGINATEscenario?</div></div></span></font></p>

</div><div><div></div><div class="Wj3C7c">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">I looked at the code and
there is really only one place i can push the variables in sooner and that is
before the CHANNEL_ORGINATE event.&nbsp; This event is fired as soon as the
channel is created while it&#39;s waiting for it to ring etc.&nbsp; I moved the
code that adds the variables from the {foo=bar} to right before this
event.&nbsp; This is the earliest event you will be able to track an outbound
call that you initiated.&nbsp; Any others that do not contain your param must
be discarded because there is no way to get your information into the channel
any sooner in the lifecycle of the channel.&nbsp; <br>
<br>
The change is in trunk so you will get that along with the other updates when
we commit the fix to windows build.<br>
<br>
Note you can also pick your own job-uuid by adding the job-uuid header to your
request using this with the suggestion the other guy gave you you can sync them<br>
<br>
api originate {my_uuid=ABC1234}sofia/default/<a href="mailto:1000@domain.com" target="_blank">1000@domain.com</a><br>
job-uuid: ABC1234<br>
<br>
This will add the variable_my_uuid line to every event set to ABC1234 and the
final job_uuid in the BACKGROUND event will also be ABC1234<br>
<br>
<br>
<br>
<br>
</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
On Mon, Apr 14, 2008 at 12:08 PM, UV &lt;<a href="mailto:uv@talknet.com.au" target="_blank">uv@talknet.com.au</a>&gt;
wrote:</span></font></p>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Thanks, Michael!<br>
Your advise seemed to be a workaround to most events although not all<br>
(missing some new, init and few others).<br>
<br>
I&#39;ll update to the newest version as soon as there&#39;s a fix for the win32<br>
build (doesn&#39;t work for me either).<br>
<br>
Btw, Will that little race fixing allow me to correlate the BGPAI JOB-UUID<br>
to these missing events? It&#39;s not that I don&#39;t get those events - I just<br>
don&#39;t know what request initiated them...<br>
<br>
Cheers,<br>
UV</span></font></p>

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
On Behalf Of Michael<br>
Jerris<br>
Sent: Tuesday, April 15, 2008 2:30 AM<br>
To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] event BACKGROUND too late in<br>
ORIGINATEscenario?</span></font></p>

</div>

<div>

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">You can set your own
unique id reference as a variable to the<br>
originate using the {my_uuid=1234567ABCD} syntax and then track all<br>
events off that variable that should be included on every event.<br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate" target="_blank">http://wiki.freeswitch.org/wiki/Freeswitch_IVR_Originate</a><br>
<br>
Also, we just fixed a little race that might have allowed you to get<br>
events before you got the background uuid so you probably want to<br>
update to most recent code.<br>
<br>
Mike<br>
<br>
<br>
On Apr 14, 2008, at 11:39 AM, UV wrote:<br>
<br>
&gt; We&#39;re busy integrating a heavy-duty call-control engine on top of the<br>
&gt; Freeswitch and I&#39;m not sure if what&#39;s happening is by design or a bug:<br>
&gt;<br>
&gt; When originating a call via the &quot;bgapi originate&quot; call<br>
&gt; (mod_commands) the<br>
&gt; BACKGROUND event invoked only AFTER the call successfully terminated<br>
&gt; (answered/rejected).<br>
&gt; Because only the BACKGROUND event has the correlation between the<br>
&gt; JOB-UUID<br>
&gt; of the BGAPI command and the UNIQUE-ID, it&#39;s impossible to intercept<br>
&gt; all the<br>
&gt; events until that point (create, outgoing, ring, codec-exchange, etc).<br>
&gt;<br>
&gt; This becomes a real problem when originating multiple calls in a<br>
&gt; short time.<br>
&gt; It&#39;s impossible to distinguish which event belongs to which<br>
&gt; origination<br>
&gt; request. Resorting to pull that info from the DB or through SHOW<br>
&gt; CHANNELS<br>
&gt; might still cost missing few events.<br>
&gt;<br>
&gt; Anyone has any ideas on how to track an ORIGINATE call setup flow?<br>
&gt;<br>
&gt;<br>
&gt; Here&#39;s an extract from the log (just took the relevant parts):<br>
&gt; bgapi originate sofia/default/1001 &amp;park<br>
&gt;<br>
&gt; Reply-Text: +OK Job-UUID: &lt;UUID-A&gt;<br>
&gt;<br>
&gt; Channel-State: CS_NEW<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_CREATE<br>
&gt;<br>
&gt; Channel-State: CS_INIT<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_OUTGOING<br>
&gt;<br>
&gt; Channel-State: CS_INIT<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_ORIGINATE<br>
&gt;<br>
&gt; Channel-State: CS_INIT<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_STATE<br>
&gt;<br>
&gt; Channel-State: CS_RING<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: PRESENCE_IN<br>
&gt;<br>
&gt; Channel-State: CS_RING<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_STATE<br>
&gt;<br>
&gt; Channel-State: CS_HOLD<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: PRESENCE_IN<br>
&gt;<br>
&gt; Channel-State: CS_HOLD<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_STATE<br>
&gt;<br>
&gt; Channel-State: CS_HOLD<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CODEC<br>
&gt;<br>
&gt; Channel-State: CS_HOLD<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CODEC<br>
&gt;<br>
&gt; Channel-State: CS_HOLD<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_ANSWER<br>
&gt;<br>
&gt; API-Command: originate<br>
&gt; Event-Name: API<br>
&gt;<br>
&gt; Job-UUID: &lt;UUID-A&gt;<br>
&gt; Job-Command: originate<br>
&gt; Event-Name: BACKGROUND_JOB<br>
&gt; +OK &lt;UUID-B&gt;<br>
&gt;<br>
&gt; Channel-State: CS_EXECUTE<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: PRESENCE_IN<br>
&gt;<br>
&gt; Channel-State: CS_EXECUTE<br>
&gt; Unique-ID: &lt;UUID-B&gt;<br>
&gt; Event-Name: CHANNEL_STATE<br>
&gt;<br>
&gt; Thanks,<br>
&gt; UV<br>
&gt;<br>
&gt; No virus found in this outgoing message.<br>
&gt; Checked by AVG.<br>
&gt; Version: 7.5.519 / Virus Database: 269.22.12 - Release Date: 10-<br>
&gt; Apr-08 12:00<br>
&gt; AM<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></font></p>

</div>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">No virus found in this incoming message.</span></font></p>

<div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Checked by AVG.<br>
Version: 7.5.519 / Virus Database: 269.22.12 - Release Date: 10-Apr-08 12:00<br>
AM<br>
<br>
<br>
No virus found in this outgoing message.<br>
Checked by AVG.<br>
Version: 7.5.519 / Virus Database: 269.22.12 - Release Date: 10-Apr-08 12:00<br>
AM<br>
<br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></font></p>

</div>

</div>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400 </span></font></p>

<p><font face="Times New Roman" size="2"><span style="font-size: 10pt;">No virus
found in this incoming message.<br>
Checked by AVG.<br>
Version: 7.5.519 / Virus Database: 269.22.12 - Release Date: 10-Apr-08 12:00 AM</span></font></p>

</div></div></div>

</div><div><div></div><div class="Wj3C7c">


<br>

<p><font size="2">No virus found in this outgoing message.<br>
Checked by AVG.<br>
Version: 7.5.519 / Virus Database: 269.22.12 - Release Date: 10-Apr-08 12:00 AM<br>
</font> </p>
</div></div><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400