Hi <br><br>Browsed the code very briefly, the function for dlg_isflagset is traced back to:<br><br>w_dlg_setflag()--> dlg_get_dlg_ctx() --> _dlg_ctx<br><br><br>is _dlg_ctx set in anywhere for onreply_route? <br><br>
<br><br><br>Kind regards<br><br>Min Wang<br><br><br><br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 12:09 PM, Min Wang <span dir="ltr"><<a href="mailto:ser.basis@gmail.com">ser.basis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi all<br>
<br>
In kamailio 1.5.2, I used dlg_isflagset inside a ONREPLY_ROUTE.<br>
<br>
////////////////scripts//////////////////<br>
<br>
Route[1]{<br>
...<br>
Dlg_manage();<br>
Dlg_setflag("1");<br>
...<br>
<br>
}<br>
<br>
onreply_route[1] {<br>
<br>
#dlg_get("$ci", "$ft", "$tt");<br>
#xlog("L_INFO", " Dialog: $dlg(h_id) . $dlg(h_entry)\n");<br>
<br>
if (dlg_isflagset("1")) {<br>
xlog("L_INFO", " here is it \n");<br>
}<br>
<br>
}<br>
<br>
/////////////////////////////////////////<br>
<br>
<br>
<br>
The dlg_isflagset seems do not match anything until there is<br>
<br>
dlg_get("$ci", "$ft", "$tt");<br>
<br>
before it.<br>
<br>
Questions are:<br>
<br>
(1) Is it the correct usage or a pontential bug.<br>
<br>
(2) How dialog is cheched/matched in the onreply_route internally?<br>
<br>
<br>
<br>
Kind Regards<br>
<font color="#888888"><br>
<br>
Min Wang<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>