limit_max as default setting

Status
Not open for further replies.

simcard

Member
Jan 22, 2017
49
4
8
Hi guys,

We're looking to set a default 'limit_max' as a default setting so that any new domain created (any any others we copy it to) takes on a default number of outgoing calls per extension.

I've tried adding the following the following default setting:

Categor: limits
Subcategor: limit_max
Typ: numeric
Value: 2
Enable: true
Description: n/a

The setting successfully shows in all the domains after copying it to all domains, however it doesn't seem to do anything. I've logged out and back in to clear the session. I tried adding a new domain, still no luck and obviously that's not how to set a default limit_max.

I came across https://www.sip247.com/content/using-resource-limits-fusionpbx-4x which seems to confirm that's not how limit_max is set and explain what can be set as a limit, although I'm not sure if that's an exhaustive list.

There seems to be a default setting somewhere for it, as it's currently set to 5 for every new extension we create. I can't seem to find anything of relevance in default settings (searched for keywords 'limit', 'max' and '5').

I bet this one is a simple one, but for love nor money I can't work it out.

Has anyone successfully been able to do this? Any guidance to offer?

cheers,

A
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I think you have misread the article, limit_max should not be mentioned anywhere in that article, the article is for a specific set of limits in FUSIONPBX <-- that is the key. Those limits are purely limits defined within fusionpbx and the GUI for limiting the creation of resources.,

What you are referring to I believe is limiting concurrent calls, something which is handled by freeswitch itself.

Anyway, that's defined in the templates themselves, be aware that when you do mod this, it only limits outbound calls as far as I'm aware.

To bring this into play edit /var/www/fusionpbx/app/extensions/extension_edit.php

On my system it is line 983, change it to suit:

if (strlen($limit_max) == 0) { $limit_max = '5'; }
 
  • Like
Reactions: simcard

simcard

Member
Jan 22, 2017
49
4
8
Thanks for that DD.

I realised the error of my ways some ours later when I went over it all again; what I was hoping for was for some way to set the limit_max value in the database as a global/domain setting, but looking through the extension_edit.php code it appears fixed per your post.

Not a huge fan of editing files as I suspect they'll be overwritten with any updates; but it does the job for now.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
They will get overwritten but if you are careful, you can do a git stash first then restore.
 

rusguns

New Member
Jun 1, 2017
10
1
1
33
DigitalDaz, thanks for your reply... I have a question for inbound traffic... is there a default limit for concurrent calls per incomming DID?
 

Incubugs

Member
Apr 7, 2018
175
10
18
49
Hi rusguns, i wanted this fuction as well , i dont think its possible to achieve in fusionpbx, however what i have done is run my sip trunks through ASTPP, we use this for multitennat billing but it also ive the ability to limit inbound calls on a sip trunk. hope this helps, you just register your fusionpbx to astpp as a user and do the limits in astpp, works well just get your acl settings right and set astpp to proxy media.
 
  • Like
Reactions: rusguns
Status
Not open for further replies.