Hello all,<div><br></div><div>I'm having problems with Dialog module, again... I tried the following:</div><div><br></div><div><div>modparam("dialog", "profiles_no_value", "e164 ; domain")</div>
<div> </div><div>if(is_method("INVITE")) {</div><div> create_dialog();</div><div> t_on_failure("INVITE");</div><div>} </div><div><br></div><div>if (is_in_profile("e164")) {</div>
<div> xlog("L_INFO","I'm e164");</div><div>}</div><div><br></div><div>get_profile_size("e164","$avp(size)");</div><div>xlog("L_INFO","e164 profile size: $avp(size)");</div>
<div><br></div><div>if (($oU =~ "^\+?[1-9][0-9]{4,14}$") || (is_in_profile("e164"))) {</div><div> set_dlg_profile("e164");</div><div> route("e164");</div><div>} else if (($od =~ "^<a href="http://mydomain.com">mydomain.com</a>$") || (is_in_profile("domain"))) {</div>
<div> set_dlg_profile("domain");</div><div> route("domain");</div><div>} else {</div><div> xlog("L_ERR","User in request uri ($oU) is not an E.164 number nor the domain ($od) is recognized.");</div>
<div> xlog("L_ERR","error(404) Not found");</div><div> sl_send_reply("404", "Not found");</div><div> exit;</div><div>}</div></div><div><br></div><div>I tested with an e164 profile call, but I don't see the log "I'm e164" 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("INVITE")) {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>create_dialog();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>t_on_failure("INVITE");</div><div>} </div><div><br></div><div># I'm forcing these just to check if dlg_flag would work, it is not part of my logic</div>
<div>set_dlg_flag("1");</div><div>if (is_dlg_flag_set("1")) {</div><div> xlog("L_INFO","dlg flag 1 is set");</div><div>}</div><div><br></div><div>if (($oU =~ "^\+?[1-9][0-9]{4,14}$") || (is_dlg_flag_set("1"))) {</div>
<div> # calling an E.164 number</div><div> xlog("L_INFO","calling E.164");</div><div> set_dlg_flag("1");</div><div> route("e164");</div><div>} else if (($od =~ "^<a href="http://mydomain.com">mydomain.com</a>$") || (is_dlg_flag_set("2"))) {</div>
<div> # calling mydomain</div><div> set_dlg_flag("2");</div><div> route("mydomain");</div><div>} else {</div><div> xlog("L_ERR","User in request uri ($oU) is not an E.164 number nor the domain ($od) is recognized.");</div>
<div> xlog("L_ERR","error(404) Not found");</div><div> sl_send_reply("404", "Not found");</div><div> exit;</div><div>}</div></div></div><div><br></div><div>Using the dlg flags, I can only see the log "dlg flag 1 is set" for the INVITE. The function is_dlg_flag_set("1") does not return true for ACK and BYE.</div>
<div><br></div><div>I'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>