<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>HI Adam,<br>
<br>
When the <tt>Terminated event is triggered, the <tt>dialog <tt>is
already in state <tt>5/Terminated </tt></tt></tt></tt><tt>and
it shoul<tt>d <tt>still be <tt>found</tt>able - is the term<tt>ination
<tt>of the dialog triggered by a BY<tt>E re<tt>quest or ?<br>
</tt></tt></tt></tt> <br>
</tt></tt></tt><br>
<tt>Regards,</tt><br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
<a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
<div class="moz-cite-prefix">On 03/07/2019 04:49 PM, Adam Overbeeke
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:229C15D3-DE85-434B-955A-2BC32200A95C@genesys.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \,serif";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
tt
{mso-style-priority:99;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi Bogdan, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">We are trying to access the dialog information during the event route. The function that we are using is </span><span style="font-size:9.0pt;font-family:Consolas;color:#172B4D">get_dialog_vals.</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> During my testing, I was able to get the expected parameters that was passed from the event route, but the dialog variables was returning nothing. This happens only when the state transitions to ENDED, all other states have the information. This makes me believe that the dialog was destroy. <o:p></o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">i.e. in this example: variableOne and variableTwo are dialog variables.<o:p></o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">event_route[E_DLG_STATE_CHANGED]
{<o:p></o:p></span></p>
<pre style="line-height:13.5pt"><span style="font-size:9.0pt;font-family:Consolas;color:#172B4D"> </span><span style="font-size:9.0pt;font-family:Consolas;color:#172B4D">fetch_event_params("hash_entry=$avp(eparm_hash_entry)");<o:p></o:p></span></pre>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("hash_id=$avp(eparm_hash_id)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("callid=$avp(eparm_callid)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("from_tag=$avp(eparm_from_tag)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("to_tag=$avp(eparm_to_tag)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("old_state=$avp(eparm_old_state)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
fetch_event_params("new_state=$avp(eparm_new_state)");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
if (
get_dialog_vals("$avp(d_names)","$avp(d_vals)","$avp(eparm_callid)")
) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
$var(i) = 0;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
while ( $(avp(d_names)[$var(i)]) != NULL ) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
$var(k) = $(avp(d_names)[$var(i)]);<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
$var(v) = $(avp(d_vals)[$var(i)]);<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
switch($var(k)) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
case "variableOne":<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
#// log statement here<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
break;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
case "variableTwo":<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
#// log statement here<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
break;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
}<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
$var(i) = $var(i) + 1;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
}<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.5pt"><span
style="font-size:9.0pt;font-family:Consolas;color:#172B4D">
}<o:p></o:p></span></p>
<p class="MsoNormal">}<o:p></o:p></p>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">^ when the state is ENDED, get_dialog_vals returns nothing back for the dialog’s callid.<o:p></o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hope it helps, <o:p></o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></pre>
<pre style="line-height:13.5pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Adam</span><span style="font-size:9.0pt;font-family:Consolas;color:#172B4D"><o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:12.0pt;color:black">From: </span></b><span
style="font-size:12.0pt;color:black">Bogdan-Andrei Iancu
<a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a><br>
<b>Date: </b>Thursday, March 7, 2019 at 5:37 AM<br>
<b>To: </b>OpenSIPS devel mailling list
<a class="moz-txt-link-rfc2396E" href="mailto:devel@lists.opensips.org"><devel@lists.opensips.org></a>, Adam Overbeeke
<a class="moz-txt-link-rfc2396E" href="mailto:Adam.Overbeeke@genesys.com"><Adam.Overbeeke@genesys.com></a><br>
<b>Subject: </b>Re: [OpenSIPS-Devel] E_DLG_STATE_CHANGED
missing dialog information for ENDED state.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi Adam,</span></tt><span
style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
</span><tt><span style="font-size:10.0pt">Sorry for the late
reply.</span></tt><span
style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
</span><tt><span style="font-size:10.0pt">How exactly are you
trying to retrieve the dialog info (during the TERMINATED
event) ?</span></tt><span
style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
</span><tt><span style="font-size:10.0pt">Regards,</span></tt><span
style="font-size:10.0pt;font-family:"Courier New""><br>
<br>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre> <a href="https://www.opensips-solutions.com" moz-do-not-send="true">https://www.opensips-solutions.com</a><o:p></o:p></pre>
<pre>OpenSIPS Summit 2019<o:p></o:p></pre>
<pre> <a href="https://www.opensips.org/events/Summit-2019Amsterdam/" moz-do-not-send="true">https://www.opensips.org/events/Summit-2019Amsterdam/</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 02/20/2019 04:55 PM, Adam Overbeeke
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hello all, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">We are trying to use the dialog event
routes and ran into some unexpected behavior. The issue is
that we cannot retrieve the dialog information when the
dialog state transitions to ENDED. We believe the dialog
have been destroyed or removed prior to firing the event
change. Is it possible to change this behavior in the
synchronous case? We understand design decision for
asynchronous handling but believe it should be possible to
retrieve the information in the synchronous case.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">If our assumptions are incorrect, we are
open to ideas on how we could get the dialog information
during the ENDED state. We are considering using a local
cache in the meantime, but that will duplicate a lot of
information in our system. My hopes are that we are just
missing some function call. We appreciate your
help/response.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Adam <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New
Roman ,serif",serif">Adam Overbeeke</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New
Roman ,serif",serif">Lead Voice Network Engineer,
PureCloud
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New
Roman ,serif",serif"><img
style="width:3.0312in;height:.0937in"
id="Picture_x0020_8"
src="cid:part3.844F9D42.83A8277F@opensips.org"
alt="cid:image001.png@01D2DB78.7C3D8250" class=""
height="9" border="0" width="291"></span><o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.genesys.com/"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:1.4895in;height:.552in"
id="Picture_x0020_7"
src="cid:part4.BA106529.281D3E63@opensips.org"
alt="cid:image002.png@01D2DB78.7C3D8250" class=""
height="53" border="0" width="143"></span></span></a><o:p></o:p></p>
<p class="MsoNormal"><a href="https://twitter.com/Genesys"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2604in;height:.2395in"
id="Picture_x0020_6"
src="cid:part6.772CC267.41BDD3BD@opensips.org"
alt="cid:image003.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="25"></span></span></a><a
href="http://www.linkedin.com/company/601919?trk=tyah"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2604in;height:.2395in"
id="Picture_x0020_5"
src="cid:part8.B82F4AB8.7FADFE23@opensips.org"
alt="cid:image004.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="25"></span></span></a><a
href="https://plus.google.com/+Genesyslab?rel=publisher"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2395in;height:.2395in"
id="Picture_x0020_4"
src="cid:part10.B803170F.30272A6A@opensips.org"
alt="cid:image005.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="23"></span></span></a><a
href="https://www.facebook.com/Genesys/"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2604in;height:.2395in"
id="Picture_x0020_3"
src="cid:part12.DA65FC19.40681A52@opensips.org"
alt="cid:image006.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="25"></span></span></a><a
href="https://www.youtube.com/Genesys"
moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2604in;height:.2395in"
id="Picture_x0020_2"
src="cid:part14.3C5518BD.E49A2AD4@opensips.org"
alt="cid:image007.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="25"></span></span></a><a
href="http://blog.genesys.com/" moz-do-not-send="true"><span
style="color:windowtext;text-decoration:none"><span
style="color:#0563C1"><img
style="width:.2395in;height:.2395in"
id="Picture_x0020_1"
src="cid:part16.21A217CE.1541F357@opensips.org"
alt="cid:image008.png@01D2DB78.7C3D8250" class=""
height="23" border="0" width="23"></span></span></a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Devel mailing list<o:p></o:p></pre>
<pre><a href="mailto:Devel@lists.opensips.org" moz-do-not-send="true">Devel@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
</blockquote>
<br>
</body>
</html>