Summary:ASTERISK-01058: incominglimit not working
Reporter:scaredycat (scaredycat)Labels:
Date Opened:2004-02-20 06:03:31.000-0600Date Closed:2011-06-07 14:10:03
Versions:Frequency of
Description:I've defined an incominglimit=1 for each sip client phone so that only a single call can be made, however looking at my cdrs i see the following appearing:

2004-02-19 12:32:06,5717,5721
2004-02-19 12:32:16,15117,15122
2004-02-19 12:32:27,20220,20225

That suggests that it's not working to me...

Comments:By: Olle Johansson (oej) 2004-02-25 16:16:08.000-0600

Note the direction of incoming and outgoing:
* Incominglimit = number of calls the local extension can originate to Asterisk.
* Outgoinglimit = number of calls Asterisk will terminate to local extension.
It's from the viewpoint of the Asterisk PBX, not from the local extension.

See http://www.voip-info.org/wiki-Asterisk+sip+incominglimit
I can't see which one you're after. The outgoinglimit is disabled in source code. Sorry if I misunderstand you, but I can't see which direction you're calling here.

By: Brian West (bkw918) 2004-02-26 15:04:37.000-0600

If this is still an issue please post feedback.

By: scaredycat (scaredycat) 2004-02-29 19:13:48.000-0600

The problem is as I described, setting INCOMINGLIMIT=1 and the client is able to make multiple calls .. hence it's not actually limiting calls..


By: pliew (pliew) 2004-03-09 02:22:43.000-0600

sorry it took me a while to respond - been under a s**tload of work. incominglimit needs the field "username" set with the same value as the [xxxx] header for each sip ua ie


this is was set up when incominglimit was first included way ... back when.
I've got it working here fine.

By: Olle Johansson (oej) 2004-03-09 02:46:35.000-0600

That's bad. Check_auth takes it from the From: header, which is a bit better, but not good. At least we can rip out that part from check_auth and add to find_user to have *one* system.

After looking into the code, I'm more confused. It uses the username of the sip_pvt structure, which is set to the [username] in check_auth... But if it works, it works... Can't test right now. The code really needs to be cleaned up in regards to incoming and outgoinglimits.

edited on: 03-09-04 01:44

By: pliew (pliew) 2004-03-10 21:01:36.000-0600

I just had a quick look - maybe a quick way to stop confusion before really cleaning up the code is to:
in "find_user()" right at the top - instead of "strncpy(name, fup->username, sizeof(name) - 1);" before the strcasecmp, we should use "fup->name" as it is always defined.

By: Olle Johansson (oej) 2004-03-11 03:04:31.000-0600

Yes, that would be a good bug fix, more inline with the rest of the channel.

By: scaredycat (scaredycat) 2004-03-16 08:08:26.000-0600

Ok, well

this is now working (I nevva dun niffink honest guv) ... I know not why

no config changes


By: scaredycat (scaredycat) 2004-03-16 08:32:50.000-0600

Oh, add just to add this is currently saving my bacon so please do NOT remove it... (/me spies talk of removing this code elsewhere)


By: Olle Johansson (oej) 2004-03-16 08:39:44.000-0600

It's a good feature, but the code needs cleaning up and fixing for outboundlimits. I don't like having stuff in documentation and configs that really doesn't work...

By: scaredycat (scaredycat) 2004-03-16 09:18:22.000-0600

Agreed, but I'd rather it was removed when new code was written and tested. If it's taken out before then it starts to cost me $$$$$$ :(

By: Brian West (bkw918) 2004-04-17 22:51:46

If this is still a problem please find me and we will reopen.  

House Keeping