[asterisk-dev] Limiting Number of registrations
Alexander Lopez
alex.lopez at opsys.com
Mon Feb 13 13:55:30 MST 2006
Expand your rules to check for remote IP and Device IP both of these are
available with the functions for SIP.
First Conpare the the EXTERNAL Ip's if they match a currently registered
account, then check the INTERNAL IP, if it holds true then allow the
(re)-registration. If not block.
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of
> Rafael Vidal Aroca
> Sent: Monday, February 13, 2006 2:16 PM
> To: asterisk-dev at lists.digium.com
> Subject: [asterisk-dev] Limiting Number of registrations
>
>
> 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?
>
> thanks
>
> --
> Rafael Vidal Aroca
> 3WT - Wireless Web World Tech
> rafael at 3WT.com.br
> Tel/Fax: +55 16 3371-7761
> Cel: +55 16 8126-8014
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list