Re: [asterisk-users] single registration per user

2011-09-20 Thread Olle E. Johansson

18 sep 2011 kl. 22:23 skrev Catalin S.:

 Hello Eric,
  
 Is about outgoing calls from multiple devices with the same username at aprox 
 same time. The overwritten is for incomming calls. I want to prevent using 
 the same account in multiple devices at same time. The solution with IP will 
 not apply because users may be behind nat or will change everytime multiple 
 access points. Do you have any other clues?

There is no real good way to prevent this. How can Asterisk now which 
registration that is the valid one? If a device reboots and gets a new IP from 
DHCP, we do not want to prevent that new registration to prevent the old one 
from another IP, but the very same device. There's no device ID used in the 
registration, only the SIP account. 

This also applies to OpenSER/kamailio/OpenSIPS. We can prevent multiple 
simultaneous registrations in those, but that will also mean that phones that 
reboot will be blocked until all registrations expire in the server.

/O


Edvina SIP Masterclass covering SIP, Asterisk  Kamailio - Oxford, UK, Nov 
7-11. *  http://www.telespeak.co.uk
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-20 Thread Ishfaq Malik
On Tue, 2011-09-20 at 11:26 +0200, Olle E. Johansson wrote:
 18 sep 2011 kl. 22:23 skrev Catalin S.:
 
  Hello Eric,
   
  Is about outgoing calls from multiple devices with the same username at 
  aprox same time. The overwritten is for incomming calls. I want to prevent 
  using the same account in multiple devices at same time. The solution with 
  IP will not apply because users may be behind nat or will change everytime 
  multiple access points. Do you have any other clues?
 
 There is no real good way to prevent this. How can Asterisk now which 
 registration that is the valid one? If a device reboots and gets a new IP 
 from DHCP, we do not want to prevent that new registration to prevent the old 
 one from another IP, but the very same device. There's no device ID used in 
 the registration, only the SIP account. 
 
 This also applies to OpenSER/kamailio/OpenSIPS. We can prevent multiple 
 simultaneous registrations in those, but that will also mean that phones that 
 reboot will be blocked until all registrations expire in the server.
 
 /O
 
 
 Edvina SIP Masterclass covering SIP, Asterisk  Kamailio - Oxford, UK, Nov 
 7-11. *  http://www.telespeak.co.uk
 --
Surely the only way to prevent this is tight control of the usernames
and passwords, i.e. configuring all devices yourself without the user(s)
knowing what the un/pass for them are. Is there a good reason you can't
do this?

Regards

Ish
-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-19 Thread Alex Balashov
If you can somehow waive the same username requirement, the solution 
is quite simple:


   exten = xxx,n,Dial(SIP/user1SIP/user2SIP/user3...SIP/usern,xxx)

--
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-19 Thread Eric Wieling
No, I have no suggestions.  What you are describing has nothing whatsoever to 
do with registration.  Registration only applies to calls from Asterisk to the 
phone.  It has nothing to do with calls from the phone to Asterisk.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Catalin S.
Sent: Sunday, September 18, 2011 4:23 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] single registration per user

Hello Eric,
 
Is about outgoing calls from multiple devices with the same username at aprox 
same time. The overwritten is for incomming calls. I want to prevent using the 
same account in multiple devices at same time. The solution with IP will not 
apply because users may be behind nat or will change everytime multiple access 
points. Do you have any other clues?

Thank you for answers,
Best regards.


On Sun, Sep 18, 2011 at 8:37 PM, Eric Wieling ewiel...@nyigc.com wrote:


Asterisk only allows one device per peer to register.  If a 2nd device 
registers, the first registration is overwritten.

You can use permit/deny to limit which IPs a device can register from.


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Catalin S.
Sent: Sunday, September 18, 2011 4:07 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] single registration per user

Hello,

I use asterisk 1.8.6.0 and I have aprox 100 extensions. I want to lock 
every extension to a single registration per device. Many of users tried to log 
on my asterisk from 2, 3 devices and I want allow only one.
Is there any solution for fix this?

Thank you.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-19 Thread Steve Edwards

On Sun, 18 Sep 2011, Catalin S. wrote:

Is about outgoing calls from multiple devices with the same username at 
aprox same time. The overwritten is for incomming calls. I want to 
prevent using the same account in multiple devices at same time. The 
solution with IP will not apply because users may be behind nat or will 
change everytime multiple access points. Do you have any other clues?


If your intent is to limit the number of outgoing calls from a username, 
how about the GROUP and GROUP_COUNT functions?


If the GROUP_COUNT(username) is 0, set GROUP(username) and allow the call.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-19 Thread Dave Platt
 Is about outgoing calls from multiple devices with the same username at
 aprox same time. The overwritten is for incomming calls. I want to prevent
 using the same account in multiple devices at same time. The solution with
 IP will not apply because users may be behind nat or will change everytime
 multiple access points. Do you have any other clues?

As others have noted, this doesn't really have anything to do with
registration per se.

Registration by a user, tells where calls *to* that user should be
sent (IP address and port).

Authorization to initiate an outbound call through Asterisk doesn't
depend on the device having registered.  It depends on the device
sending an INVITE with the appropriate user-ID, and the device's
ability to respond to the corresponding security challenge from
Asterisk.  Any device having the appropriate ID and secret can
thus authenticate on the outbound call... Asterisk won't (unless
you jump through a lot of hoops) know whether this is the same
device that has currently registered with that ID.

I can think of several approaches which might work:

(1) Set call-limit=1 in the SIP user definition for this user.
This will (if I'm reading the documentation correctly) limit
Asterisk to only one call to this user/peer at a time.  There
used to be separate limits for incoming and outgoing calls,
but that was eliminated several versions ago.

(2) As others have suggested, do it in the dialplan using the GROUP
function.  Perhaps the simplest way to do this would be to
set up a dialplan context which each of these users is bound to.
In its s ruleset, set the GROUP() value to be the user-ID, and
then check the number of members in the group... if it's more than
1, jump to a rule which does a Congestion() or plays a You are
a cheater and I make rude motions in your direction recorded message
or hangs up or ...

If the group-count test succeeds, jump to another dialing context
which actually does the dialing based on the $EXTEN passed by the
caller.

This would be a bit like example 2 in the page at
http://www.voip-info.org/wiki/view/Asterisk+func+group but you
would use a specific group name per user e.g. $CHANNEL(peername)
rather than a group per outbound trunk.

(3) Do something like (2), but instead of using the GROUP feature to
limit calls, compare the caller's IP address with the IP address
currently registered by the calling user e.g. compare
$CHANNEL(peerip) with $SIPPEER($CHANNEL(peername),ip).

This wouldn't be as robust as approach (2) - there would probably be
moments when a second device could make a call - and so I don't really
encourage it.



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-18 Thread Eric Wieling
Asterisk only allows one device per peer to register.  If a 2nd device 
registers, the first registration is overwritten.  

You can use permit/deny to limit which IPs a device can register from.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Catalin S.
Sent: Sunday, September 18, 2011 4:07 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] single registration per user

Hello,

I use asterisk 1.8.6.0 and I have aprox 100 extensions. I want to lock every 
extension to a single registration per device. Many of users tried to log on my 
asterisk from 2, 3 devices and I want allow only one.
Is there any solution for fix this?

Thank you.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] single registration per user

2011-09-18 Thread Catalin S.
Hello Eric,

Is about outgoing calls from multiple devices with the same username at
aprox same time. The overwritten is for incomming calls. I want to prevent
using the same account in multiple devices at same time. The solution with
IP will not apply because users may be behind nat or will change everytime
multiple access points. Do you have any other clues?

Thank you for answers,
Best regards.

On Sun, Sep 18, 2011 at 8:37 PM, Eric Wieling ewiel...@nyigc.com wrote:

 Asterisk only allows one device per peer to register.  If a 2nd device
 registers, the first registration is overwritten.

 You can use permit/deny to limit which IPs a device can register from.

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] On Behalf Of Catalin S.
 Sent: Sunday, September 18, 2011 4:07 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] single registration per user

 Hello,

 I use asterisk 1.8.6.0 and I have aprox 100 extensions. I want to lock
 every extension to a single registration per device. Many of users tried to
 log on my asterisk from 2, 3 devices and I want allow only one.
 Is there any solution for fix this?

 Thank you.

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] single registration per user

2011-09-18 Thread Sam Govind
Hmmm..this could be a complex solution - Use OpenSIPS to handle
registration. On each new register attempt see if a user AOR or other
records exists already - if yes deny registration.

On Mon, Sep 19, 2011 at 1:23 AM, Catalin S. jonsonpla...@gmail.com wrote:

 Hello Eric,

 Is about outgoing calls from multiple devices with the same username at
 aprox same time. The overwritten is for incomming calls. I want to prevent
 using the same account in multiple devices at same time. The solution with
 IP will not apply because users may be behind nat or will change everytime
 multiple access points. Do you have any other clues?

 Thank you for answers,
 Best regards.


 On Sun, Sep 18, 2011 at 8:37 PM, Eric Wieling ewiel...@nyigc.com wrote:

 Asterisk only allows one device per peer to register.  If a 2nd device
 registers, the first registration is overwritten.

 You can use permit/deny to limit which IPs a device can register from.

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:
 asterisk-users-boun...@lists.digium.com] On Behalf Of Catalin S.
 Sent: Sunday, September 18, 2011 4:07 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] single registration per user

 Hello,

 I use asterisk 1.8.6.0 and I have aprox 100 extensions. I want to lock
 every extension to a single registration per device. Many of users tried to
 log on my asterisk from 2, 3 devices and I want allow only one.
 Is there any solution for fix this?

 Thank you.

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users