[asterisk-dev] Limiting Number of registrations

Olle E Johansson oej at edvina.net
Mon Feb 13 11:50:55 MST 2006


13 feb 2006 kl. 20.16 skrev Rafael Vidal Aroca:

>
>    Hi guys,
>
>    i've been playing with chan_sip.c trying to add an interesting  
> feature in asterisk for voip providers, that blocks a second SIP  
> peer against registering in the server.
>
>    That would work like that: first
>    client connects -> OK
>    second client tries to connect while the other is connect -> ERROR
>
>    So, i used _sip_show_peers, and checked if the user is on line.  
> If it is online, it rejects the register. Now a great problem  
> arises! The update is exactly like the first register, so after the  
> first register, the client can't keep the register correctly.
>      I don't know if i explained well, but the ideia is to block  
> simultaneos connections. Does anyone have an idea or hint of how  
> that could be done?
´
I've been trying various concepts over time, but nothing is fool  
proof. What if a customer looses power, everything reboots and he's  
got a new IP from the DHCP server? We won't allow that registration...

I think an external hook that optionally can be executed is better.  
That way, a system could send a warning e-mail to the customer or  
notify him in some way that he's confusing the system.

/O


More information about the asterisk-dev mailing list