Call-limit not working on sip trunks

Hi there

I cannot get call-limit to work with my external sip trunks.
I get ‘0’ returned always using 'sip show inuse’
It works fine with all my sip phones and SPA-3000.

I have set type=peer as is required.

[ITSP1]
username=username
secret=secret
type=peer
host=sip.internode.on.net
context=ITSP1
call-limit=1
fromuser=fromuser
fromdomain=sip.internode.on.net
insecure=no
port=5060
canreinvite=no

[ITSP2]
username=username
secret=secret
type=peer
host=byo.engin.com.au
context=ITSP2
call-limit=1
fromuser=fromuser
fromdomain=byo.engin.com.au
insecure=invite
port=5060
canreinvite=no

I am having problems with both trunks.
I am using Asterisk version 1.2.7.1

Does anyone have any ideas ???

i think i remember seeing something about this on the bugtracker (or at least other reports of this occurring) but it was with SIP trunks only - SIP peers work fine, obviously.

you might scan the bugtracker quick, see if you can find anything on the issue…if i come across anything myself, i’ll let you know.

wes, you’re too modest. didn’t you contribute a bug fix for call-limit ?

Thanks wes for the reply.
I could not find any specific bugs related to trunks only. I will try to do some debugging to see what is happening.
I did read your contribution to the call-limit function with queues but it did not seem relevant to this problem.
I thought I had this working but it seems since I changed something now it doesnt. Maybe it was my imagination.

I like call-limit and with the SIPPEER function it allows you to provide great call control, especially for phones that assume you want call waiting like the SPA-941.

My only other option is to use the GROUP and GROUP COUNT functions but I would rather not.
PS can I use GROUP’s to limit incoming calls as well?

re: the group function - yes, i believe it works just like call-limit, but isn’t a global setting (ie, you can’t use group functions on queue calls, for instance, which is why call-limit works better for us).

if it wasn’t the bugtracker, it was either the users or dev mailing list - sorry i can’t be more specific, but i have a feeling as though i’ve seen something like this before…just can’t remember where.

Looks like I will have to use GROUP until it is fixed or I find a solution

Thanks
Mike