[SR-Users] hanging active dialog...

Daniel-Constantin Mierla miconda at gmail.com
Fri Aug 23 17:31:04 CEST 2013


The example is the raw command to send, but kamctl takes care to format 
it. You should do:

kamctl fifo profile_list_dlg callers

or


kamctl fifo profile_list_dlg callers _URI_

Replace the _URI_ with the value that was in $fu.

Cheers,
Daniel

On 8/23/13 3:34 PM, Gertjan Wolzak wrote:
>
> I have tried with kamctl...
>
> But because I found the documentation not very clear, I think I am 
> doing it wrong.
>
> Let's take the 8.6:
>
>                      :profile_list_dlgs:_reply_fifo_file_
>
> inbound_calls
>
>                _empty_line_
>
> Where the parameters are profile and value, whereby the value is optional.
>
> I tried : kamctl fifo :profile_list_dlgs: 
> _/reply_fifo_file/_inbound_calls callers
>
> Im pretty sure that is not correct.
>
> Been looking for the correct why on google, but can find a clear 
> explanation.
>
> Gertjan.
>
> *From:*sr-users-bounces at lists.sip-router.org 
> [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of 
> *Daniel-Constantin Mierla
> *Sent:* vrijdag 23 augustus 2013 15:06
> *To:* Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] hanging active dialog...
>
> Have you listed the profile via kamctl or kamcmd? The commands are in 
> the readme:
>
> http://kamailio.org/docs/modules/stable/modules/dialog.html#idp3737432
>
> Is the afferent profile listing any dialog?
>
> Cheers,
> Daniel
>
> On 8/23/13 2:50 PM, Gertjan Wolzak wrote:
>
>     Hello Carlos,
>
>     I have been looking at your module, can't wait to work with it,
>     especially the prepaid part.
>
>     But as this system is in production, can't just start
>     experimenting, want to.... But cant.
>
>     So just have to wait for some tips on the cli....
>
>     But thanks.
>
>     Rgds,
>
>     Gertjan
>
>     *From:*sr-users-bounces at lists.sip-router.org
>     <mailto:sr-users-bounces at lists.sip-router.org>
>     [mailto:sr-users-bounces at lists.sip-router.org] *On Behalf Of
>     *Carlos Ruiz Díaz
>     *Sent:* vrijdag 23 augustus 2013 14:37
>     *To:* Kamailio (SER) - Users Mailing List
>     *Subject:* Re: [SR-Users] hanging active dialog...
>
>     I don't know what exactly happened in your case but if you don't
>     have time to investigate you can try cnxcc module [1] channel
>     control to achieve the same goal.
>
>     Take a look at the sample configuration file located in [2]
>
>       
>
>     xlog("L_INFO",  "Setting  up  channel  based  
>
>       credit  control")/;/
>
>       
>
>       
>
>               $var(max_chan)    *=*  2;
>
>       
>
>               $var(retcode)    = cnxcc_set_max_channels("$var(client)", "$var(max_chan)");
>
>       
>
>       
>
>               if ($var(retcode)  *=*= -1) {
>
>       
>
>                       xlog("Error setting up credit control");
>
>                       return;
>
>       
>
>               }
>
>       
>
>       
>
>              $var(count)      *=*  -1;
>
>       
>
>       
>
>              if  (!cnxcc_get_channel_count("$var(client)",  "$var(count)"))  {
>
>       
>
>                      xlog("Error  getting  customer's  channel  count"
>
>     )/;/
>
>       
>
>              }
>
>       
>
>       
>
>              xlog("L_INFO",  "CNXCC  ROUTE:  $var(client)  has  $var(count)  call(s)")/;/
>
>       
>
>       
>
>               if  ($var(retcode)  <  -1)  {
>
>       
>
>                       xlog("Too  many  channels  for  custome
>
>       r")/;/
>
>       
>
>                       sl_send_reply(403,  "Forbidden")/;/
>
>       
>
>       
>
>                       if  (!cnxcc_terminate_all("$var(client)"))  {
>
>       
>
>                                xlog("Error  terminating  customer's  calls")/;/
>
>       
>
>                       }
>
>       
>
>       
>
>                       exit/;/
>
>               }
>
>       
>
>       
>
>     [1]http://kamailio.org/docs/modules/devel/modules/cnxcc.html
>
>     [2]https://github.com/caruizdiaz/cnxcc/blob/master/example/kamailio-cnxcc.cfg
>
>       
>
>     Regards,
>
>     Carlos
>
>       
>
>     On Fri, Aug 23, 2013 at 5:16 AM, Gertjan Wolzak
>     <g.wolzak at foize.com <mailto:g.wolzak at foize.com>> wrote:
>
>     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
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
>     -- 
>     Carlos
>
>     http://caruizdiaz.com
>
>     +595981146623
>
>
>
>
>     _______________________________________________
>
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
>     sr-users at lists.sip-router.org  <mailto:sr-users at lists.sip-router.org>
>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> -- 
> Daniel-Constantin Mierla -http://www.asipto.com
> http://twitter.com/#!/miconda  <http://twitter.com/#%21/miconda>  -http://www.linkedin.com/in/miconda

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

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


More information about the sr-users mailing list