[OpenSIPS-Users] Dialog profiles and flags not matching

Vlad Paiu vladpaiu at opensips.org
Thu May 24 11:07:52 CEST 2012


Hello,

Indeed, when the BYE is internally processed by OpenSIPS and matched to 
the proper dialog, the dialog is also removed from the profiles it 
belonged to.
The dialog is not yet destroyed from memory, as you can still access 
stuff like dialog variables, etc, it is just removed from the profiles.

Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com


On 05/23/2012 08:51 PM, Mariana Arduini wrote:
> Ok, I'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.
>
> Is that expected? Is the dialog finished before I can check any 
> profile information?
>
> Thanks,
> Mariana
>
> On Wed, May 23, 2012 at 11:47 AM, Mariana Arduini 
> <marianarduini at gmail.com <mailto:marianarduini at gmail.com>> wrote:
>
>     Hello all,
>
>     I'm having problems with Dialog module, again... I tried the
>     following:
>
>     modparam("dialog", "profiles_no_value", "e164 ; domain")
>     if(is_method("INVITE")) {
>         create_dialog();
>         t_on_failure("INVITE");
>     }
>
>     if (is_in_profile("e164")) {
>         xlog("L_INFO","I'm e164");
>     }
>
>     get_profile_size("e164","$avp(size)");
>     xlog("L_INFO","e164 profile size:  $avp(size)");
>
>     if (($oU =~ "^\+?[1-9][0-9]{4,14}$") || (is_in_profile("e164"))) {
>         set_dlg_profile("e164");
>         route("e164");
>     } else if (($od =~ "^mydomain.com <http://mydomain.com>$") ||
>     (is_in_profile("domain"))) {
>         set_dlg_profile("domain");
>         route("domain");
>     } else {
>         xlog("L_ERR","User in request uri ($oU) is not an E.164 number
>     nor the domain ($od) is recognized.");
>         xlog("L_ERR","error(404) Not found");
>         sl_send_reply("404", "Not found");
>         exit;
>     }
>
>     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.
>
>     Then I tried using dlg flags as following:
>
>     if(is_method("INVITE")) {
>     create_dialog();
>     t_on_failure("INVITE");
>     }
>
>     # I'm forcing these just to check if dlg_flag would work, it is
>     not part of my logic
>     set_dlg_flag("1");
>     if (is_dlg_flag_set("1")) {
>         xlog("L_INFO","dlg flag 1 is set");
>     }
>
>     if (($oU =~ "^\+?[1-9][0-9]{4,14}$") || (is_dlg_flag_set("1"))) {
>         # calling an E.164 number
>         xlog("L_INFO","calling E.164");
>         set_dlg_flag("1");
>         route("e164");
>     } else if (($od =~ "^mydomain.com <http://mydomain.com>$")  ||
>     (is_dlg_flag_set("2"))) {
>         # calling mydomain
>         set_dlg_flag("2");
>         route("mydomain");
>     } else {
>         xlog("L_ERR","User in request uri ($oU) is not an E.164 number
>     nor the domain ($od) is recognized.");
>         xlog("L_ERR","error(404) Not found");
>         sl_send_reply("404", "Not found");
>         exit;
>     }
>
>     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.
>
>     I'm using the profile and flags after creating the dialog, as
>     described in the docs. What am I doing wrong?
>
>     Thanks,
>     Mariana.
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120524/c93462d4/attachment.htm>


More information about the Users mailing list