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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110918/24c5e3f0/attachment.htm>
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-bounces at lists.digium.com [mailto:asterisk-users-bounces at 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.
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 <EWieling at 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-bounces at lists.digium.com [mailto: > asterisk-users-bounces at 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110918/f0d5a069/attachment.htm>
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. <jonsonplayer at 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 <EWieling at 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-bounces at lists.digium.com [mailto: >> asterisk-users-bounces at 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110919/48daa76b/attachment.htm>
If you can somehow waive the "same username" requirement, the solution is quite simple: exten => xxx,n,Dial(SIP/user1&SIP/user2&SIP/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/
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-bounces at lists.digium.com [mailto:asterisk-users-bounces at 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 <EWieling at 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-bounces at lists.digium.com [mailto:asterisk-users-bounces at 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
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 sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
> 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.