Mauro Sergio Ferreira Brasil
2009-Aug-26 14:07 UTC
[asterisk-users] Multiple user registration ...
Hello there! We are planning to use Asterisk on our VoIP platform, and we are spending some brains on a way to provide the following facility: let some SIP user (extension) registrate with more than one client (ATA, SoftPhone, VoipCelular, etc) - what isn't a problem at all -, initiate calls from any of this devices that are registrated with the same user - no problems on tests too -, but also receive INVITE requests on "all" devices if someone calls this user - yeah... here the thing gets creepy. The demand is quite simple: let a user registrate with multiple devices using the same SIP user on such way that if someone call him, all these registered devices will ring and the first to take the call will be "the lucky one". The demand, as I've said, is quite simple and logical (translated to our living world), but the reality is a very different history. On our tests, always is the last registered application/device that receives the call indication. And only the last one. We are making some tests trying to "kind of deceive" Asterisk on second, third, and additional, registrations so it receives from Realtime "fake" extensions numbers on such a way that we can use all these fake extensions to build a queue dinamicaly (through ARA) and provide the desired "ring on all" functionality. I think this will lead us to lots of SIP sinalization and multi user registration problems, but that was the best shot we had here until now. I would like to know if anyone had the same demand and, maybe, have found any viable solution to it. Thanks and best regards, -- __At., _ *Technology and Quality on Information* Mauro S?rgio Ferreira Brasil Coordenador de Projetos e Analista de Sistemas + mauro.brasil at tqi.com.br <mailto:@tqi.com.br> : www.tqi.com.br <http://www.tqi.com.br> ( + 55 (34)3291-1700 ( + 55 (34)9971-2572
Is your goal here to have multiple devices ring when an extension is dialed and the first one to answer take the call? If so, see the Dial command Dial(Technology/resource&Technology/resource&Technology/resource...[|timeout][|options][|URL]). When multiple technology/resource entries are listed, the first one to answer will take the call. That accomplishes your goal, if I understand you correctly. The nice part about doing it this way (with each device independently registered) is that you gain a substantial amount of granularity in controlling where calls go and you don't have to find creative ways (read: unsupported) to trick Asterisk or endpoints. If you're developing your own GUI to have people set up their devices, you can easily create a wizard that walks them through setting up each device and associating them together through either channel variables or other tables in a database. I use this methodology in 1.4 and it works quite reliably. For a good reference, check out http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial or from your Asterisk console try: 'core show application dial<enter>' It's not perfect because you can have devices that do funny things with a SIP INVITE, but in most cases it works very well. Regards, Elliot -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mauro Sergio Ferreira Brasil Sent: Wednesday, August 26, 2009 10:08 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Multiple user registration ... Hello there! We are planning to use Asterisk on our VoIP platform, and we are spending some brains on a way to provide the following facility: let some SIP user (extension) registrate with more than one client (ATA, SoftPhone, VoipCelular, etc) - what isn't a problem at all -, initiate calls from any of this devices that are registrated with the same user - no problems on tests too -, but also receive INVITE requests on "all" devices if someone calls this user - yeah... here the thing gets creepy. The demand is quite simple: let a user registrate with multiple devices using the same SIP user on such way that if someone call him, all these registered devices will ring and the first to take the call will be "the lucky one". The demand, as I've said, is quite simple and logical (translated to our living world), but the reality is a very different history. On our tests, always is the last registered application/device that receives the call indication. And only the last one. We are making some tests trying to "kind of deceive" Asterisk on second, third, and additional, registrations so it receives from Realtime "fake" extensions numbers on such a way that we can use all these fake extensions to build a queue dinamicaly (through ARA) and provide the desired "ring on all" functionality. I think this will lead us to lots of SIP sinalization and multi user registration problems, but that was the best shot we had here until now. I would like to know if anyone had the same demand and, maybe, have found any viable solution to it. Thanks and best regards, -- __At., _ *Technology and Quality on Information* Mauro S?rgio Ferreira Brasil Coordenador de Projetos e Analista de Sistemas + mauro.brasil at tqi.com.br <mailto:@tqi.com.br> : www.tqi.com.br <http://www.tqi.com.br> ( + 55 (34)3291-1700 ( + 55 (34)9971-2572 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users This message is intended only for the use of the individual (s) or entity to which it is addressed and may contain information that is privileged, confidential, and/or proprietary to Calling Circles LLC and its affiliates. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, forwarding or copying of this communication is prohibited without the express permission of the sender. If you have received this communication in error, please notify the sender immediately and delete the original message.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mauro Sergio Ferreira Brasil wrote:> We are planning to use Asterisk on our VoIP platform, and we are > spending some brains on a way to provide the following facility: let > some SIP user (extension) registrate with more than one client (ATA, > SoftPhone, VoipCelular, etc) - what isn't a problem at all -, initiate > calls from any of this devices that are registrated with the same user - > no problems on tests too -, but also receive INVITE requests on "all" > devices if someone calls this user - yeah... here the thing gets creepy. > The demand is quite simple: let a user registrate with multiple devices > using the same SIP user on such way that if someone call him, all these > registered devices will ring and the first to take the call will be "the > lucky one".Instead of trying to make Asterisk do this unnatural act, why not register each device with a separate id, then use the dial function to call all of them? e.g. exten => 122,1,Dial(SIP/1&SIP/2&SIP/3) You could use some creating scripting to decide which devices to ring based on the dialed extension. Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKlU65CFu3bIiwtTARAu0DAJ4szfX1dp/BNZojIKhgIL/tIhkjvQCeLXCf A+Dys6+LgrNhL/zQpU8Vuwk=1Y6q -----END PGP SIGNATURE-----
Dear Mauro, Your requirement seems Clone line feature for asterisk. The same question I've asked here in this group, a months later but could't get well. But actually implemented it now! It is done using AMI. Here is its basic psudo code. # ami-event.pl Connect to AMI Read the AMI Events Parse the events If it is registration Event then store the Username/IP/Ports/Technology in Database # dial plan run agi script to get all strings eg. first Device:?????? SIP/User at 192.168.0.123:5061 second Device:? SIP/User at 10.0.0.150:6060 The complete script is attached. Muhammad Faheem Software Engineer AxVoice Inc. 307,Y Commercial, DHA Lahore, Pakistan +92-333-4793314 http://www.axvoice.com --- On Wed, 8/26/09, Mauro Sergio Ferreira Brasil <mauro.brasil at tqi.com.br> wrote: From: Mauro Sergio Ferreira Brasil <mauro.brasil at tqi.com.br> Subject: [asterisk-users] Multiple user registration ... To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Date: Wednesday, August 26, 2009, 7:07 PM Hello there! We are planning to use Asterisk on our VoIP platform, and we are spending some brains on a way to provide the following facility: let some SIP user (extension) registrate with more than one client (ATA, SoftPhone, VoipCelular, etc) - what isn't a problem at all -, initiate calls from any of this devices that are registrated with the same user - no problems on tests too -, but also receive INVITE requests on "all" devices if someone calls this user - yeah... here the thing gets creepy. The demand is quite simple: let a user registrate with multiple devices using the same SIP user on such way that if someone call him, all these registered devices will ring and the first to take the call will be "the lucky one". The demand, as I've said, is quite simple and logical (translated to our living world), but the reality is a very different history. On our tests, always is the last registered application/device that receives the call indication. And only the last one. We are making some tests trying to "kind of deceive" Asterisk on second, third, and additional, registrations so it receives from Realtime "fake" extensions numbers on such a way that we can use all these fake extensions to build a queue dinamicaly (through ARA) and provide the desired "ring on all" functionality. I think this will lead us to lots of SIP sinalization and multi user registration problems, but that was the best shot we had here until now. I would like to know if anyone had the same demand and, maybe, have found any viable solution to it. Thanks and best regards, -- __At.,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ???_ *Technology and Quality on Information* Mauro S?rgio Ferreira Brasil Coordenador de Projetos e Analista de Sistemas + mauro.brasil at tqi.com.br <mailto:@tqi.com.br> : www.tqi.com.br <http://www.tqi.com.br> ( + 55 (34)3291-1700 ( + 55 (34)9971-2572 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net 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/20090827/14361913/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ami-events.pl-running Type: application/octet-stream Size: 6726 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090827/14361913/attachment.obj
Yes, Its my Name! Well, my DB server and asterisk servers are on different locations. For optimization I've used Files instead of Database queries. Secondly the /var/lib/asterisk/user folder is a simple folder if it does not exists on your asterisk machine then simple create it on the specified location or simply change the folder path in the perl script. Before File handling I've used Databases for maintaing active registered users with multiple IP/Ports. The attatched perl script uses database for maintain active registration. The structure of cloneline table should be. DB: Cloneline table:users(Username,IP1,Port1,Ip2,Port2) all varchars(30) Please adjust the table fields appropriately. Hope this code block will solve you problems. Muhammad Faheem Software Engineer AxVoice Inc. 307,Y Commercial, DHA Lahore, Pakistan +92-333-4793314 http://www.axvoice.com --- On Fri, 8/28/09, Mauro Sergio Ferreira Brasil <mauro.brasil at tqi.com.br> wrote: From: Mauro Sergio Ferreira Brasil <mauro.brasil at tqi.com.br> Subject: Re: [asterisk-users] Multiple user registration ... To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Date: Friday, August 28, 2009, 5:38 PM Thank you very much for all your help, Muhammad! (please let me know if I should call you Faheem, instead). I'll make some tests with this script on my premises as soon as possible. Having a look on it, I couldn't realize how it really works in conjunction with Asterisk. I mean, it seems that the line cloning is acchieved by the creation/update of a file (with a name that matches the SIP user name) inside folder "/var/lib/asterisk/users". The point is that I couldn't find any similar folder on my test server, and a search on Google by this folder didn't returned any usefull results. Am I missing something here ? Suppose I want to acchieve this feature by database update. I've noticed here that it will be a problem considering that field "name" at "sip_buddies", that is my Realtime table for SIP users, have a UNIQUE_KEY constraint. Moreover, I don't know what will happen on Realtime (probably an error or undesired behavior) that seems to be expecting just one record user record information. Have you tried database approach ? Thanks again and best regards, Mauro. Faheem escreveu:> Mauro, > > Yes, you will receive simultaneous ring on all devices which are > registered with the same SIP User Account. > > If a SIP user is registered on multiple devices i.e. only one SIP > account is used and only one extension is used here in my > implementation, then he will ring on all registered SIP enabled > devices/softphones. > > Also I've tested it with following combinations of SIP enabled > devices/Softphones. > > 1) Both ports of SPA2100 are registered with one SIP account(Same IP > address but different ports) > 2) The same SIP user is registered with one port of SAP2100 and the > same user is registered with Xten (multiple IP addresses) > 3) The same SIP User is registered with two different SIP Dialers. > > Here in these three cases I've sucessfully able to receive concurrent > ring on the registered devices/softphones. Also CDR are working correctly. > > The perl script works perfectly with my customization, you need to > modify it according to? your requirements. > > > Muhammad Faheem > Software Engineer > AxVoice Inc. > 307,Y Commercial, > DHA Lahore, Pakistan > +92-333-4793314 > http://www.axvoice.com > > ------------------------------------------------------------------------ > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2009 - October 13 - 15 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >? ? http://lists.digium.com/mailman/listinfo/asterisk-users-- __At.,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ???_ *Technology and Quality on Information* Mauro S?rgio Ferreira Brasil Coordenador de Projetos e Analista de Sistemas + mauro.brasil at tqi.com.br <mailto:@tqi.com.br> : www.tqi.com.br <http://www.tqi.com.br> ( + 55 (34)3291-1700 ( + 55 (34)9971-2572 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net 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/20090828/e7525c95/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: ami-events.pl-21-08 Type: application/octet-stream Size: 10115 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090828/e7525c95/attachment.obj