[SR-Users] hanging active dialog...

Gertjan Wolzak g.wolzak at foize.com
Fri Aug 23 11:16:39 CEST 2013


 

Goodmorning All,

 

I use the following route to check for concurrent calls by the same user, if
a concurrent call is tried it is not allowed.

 

route[CONCURRENT]

{

        xlog("SCRIPT: Conccurrent call check");

 

        if(!get_profile_size("caller","$fu","$avp(nrcalls)"))

        {

                sl_send_reply("403", "Call not matching profile");

                exit;

        }

        xlog("SCRIPT: caller value for $fu is $avp(nrcalls)");

        if($avp(nrcalls)>= 1)

        {

                sl_send_reply("403", "Active calls limit exceeded");

                exit;

        }

        dlg_manage();

        if(!set_dlg_profile("caller","$fu"))

        {

                sl_send_reply("500", "No new channels in this profile");

                exit;

        }

 

        xlog("SCRIPT: caller value for $fu is now $avp(nrcalls)");

 

}

 

Now I had a situation where a user could not call because the
get_profile_size for this user gave the value 1. So another call was not
allowed.

But the user did not have a call active. As no dialogs were active, checked
that.

 

I assume there can be a lot of reasons why this happens, also I want to use
the "I don't want to know the cause" method to solve this.

 

So I looked at the dialog module documentation, to see if I can just clear
the profile size for this specific user.

 

I wanted to use the profile_list_dlgs(8.6) to get the dialog details, then
the dlg_terminate_dlg(8.4) to, you guessed it, terminate that dialog.

 

But it's not clear to me how I can give those commands..

 

Is there a way to give those commands on the cli, if so can someone please
write down some examples.

 

Would be really appreciated.

 

Rgds,

 

Gertjan

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130823/6e3e2cf9/attachment.html>


More information about the sr-users mailing list