Ok, I&#39;ve added match_dialog() before testing for the profile and now it works for the ACK, but not for the BYE. Even the profile size is set back to 0 when I get the BYE.<div><br></div><div>Is that expected? Is the dialog finished before I can check any profile information?</div>

<div><br></div><div>Thanks,</div><div>Mariana<br><br><div class="gmail_quote">On Wed, May 23, 2012 at 11:47 AM, Mariana Arduini <span dir="ltr">&lt;<a href="mailto:marianarduini@gmail.com" target="_blank">marianarduini@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<div><br></div><div>I&#39;m having problems with Dialog module, again... I tried the following:</div><div><br>

</div><div><div>modparam(&quot;dialog&quot;, &quot;profiles_no_value&quot;, &quot;e164 ; domain&quot;)</div>
<div>    </div><div>if(is_method(&quot;INVITE&quot;)) {</div><div>    create_dialog();</div><div>    t_on_failure(&quot;INVITE&quot;);</div><div>}     </div><div><br></div><div>if (is_in_profile(&quot;e164&quot;)) {</div>


<div>    xlog(&quot;L_INFO&quot;,&quot;I&#39;m e164&quot;);</div><div>}</div><div><br></div><div>get_profile_size(&quot;e164&quot;,&quot;$avp(size)&quot;);</div><div>xlog(&quot;L_INFO&quot;,&quot;e164 profile size:  $avp(size)&quot;);</div>


<div><br></div><div>if (($oU =~ &quot;^\+?[1-9][0-9]{4,14}$&quot;) || (is_in_profile(&quot;e164&quot;))) {</div><div>    set_dlg_profile(&quot;e164&quot;);</div><div>    route(&quot;e164&quot;);</div><div>} else if (($od =~ &quot;^<a href="http://mydomain.com" target="_blank">mydomain.com</a>$&quot;) || (is_in_profile(&quot;domain&quot;))) {</div>


<div>    set_dlg_profile(&quot;domain&quot;);</div><div>    route(&quot;domain&quot;);</div><div>} else {</div><div>    xlog(&quot;L_ERR&quot;,&quot;User in request uri ($oU) is not an E.164 number nor the domain ($od) is recognized.&quot;);</div>


<div>    xlog(&quot;L_ERR&quot;,&quot;error(404) Not found&quot;);</div><div>    sl_send_reply(&quot;404&quot;, &quot;Not found&quot;);</div><div>    exit;</div><div>}</div></div><div><br></div><div>I tested with an e164 profile call, but I don&#39;t see the log &quot;I&#39;m e164&quot; for sequential requests. However, the get_profile_size shows 0 for the INVITE and 1 for both the ACK and BYE. I also tried with only one profile in the list, still no success.</div>


<div><br></div><div>Then I tried using dlg flags as following:</div><div><br></div><div><div><div>if(is_method(&quot;INVITE&quot;)) {</div><div><span style="white-space:pre-wrap">        </span>create_dialog();</div>
<div><span style="white-space:pre-wrap">        </span>t_on_failure(&quot;INVITE&quot;);</div><div>} </div><div><br></div><div># I&#39;m forcing these just to check if dlg_flag would work, it is not part of my logic</div>
<div>set_dlg_flag(&quot;1&quot;);</div><div>if (is_dlg_flag_set(&quot;1&quot;)) {</div><div>    xlog(&quot;L_INFO&quot;,&quot;dlg flag 1 is set&quot;);</div><div>}</div><div><br></div><div>if (($oU =~ &quot;^\+?[1-9][0-9]{4,14}$&quot;) || (is_dlg_flag_set(&quot;1&quot;))) {</div>


<div>    # calling an E.164 number</div><div>    xlog(&quot;L_INFO&quot;,&quot;calling E.164&quot;);</div><div>    set_dlg_flag(&quot;1&quot;);</div><div>    route(&quot;e164&quot;);</div><div>} else if (($od =~ &quot;^<a href="http://mydomain.com" target="_blank">mydomain.com</a>$&quot;)  || (is_dlg_flag_set(&quot;2&quot;))) {</div>


<div>    # calling mydomain</div><div>    set_dlg_flag(&quot;2&quot;);</div><div>    route(&quot;mydomain&quot;);</div><div>} else {</div><div>    xlog(&quot;L_ERR&quot;,&quot;User in request uri ($oU) is not an E.164 number nor the domain ($od) is recognized.&quot;);</div>


<div>    xlog(&quot;L_ERR&quot;,&quot;error(404) Not found&quot;);</div><div>    sl_send_reply(&quot;404&quot;, &quot;Not found&quot;);</div><div>    exit;</div><div>}</div></div></div><div><br></div><div>Using the dlg flags, I can only see the log &quot;dlg flag 1 is set&quot; for the INVITE. The function is_dlg_flag_set(&quot;1&quot;) does not return true for ACK and BYE.</div>


<div><br></div><div>I&#39;m using the profile and flags after creating the dialog, as described in the docs. What am I doing wrong?</div><div><br></div><div>Thanks,</div><div>Mariana.</div>
</blockquote></div><br></div>