D'Arcy J.M. Cain
2016-Aug-30 13:56 UTC
[asterisk-users] Multiple phones when one is unregistered
I have an extension that looks like this: exten => 5555551111,1,Verbose(Door buzzer calling) same => n,Dial(SIP/user1&SIP/user2&SIP/user3) The idea is that any of the three users can answer the phone to let someone in. The problem is that if, say, user2 unplugs his phone then the call immediately goes to his voice mail and the other two do not have the ability to open the door. Is there any way to direct only to phones in a list that are currently registered? I am sure that I can write a rather convoluted extension to check for registrations and create a dial command but I am hoping that there is an easier way so that I can create these types of extensions for other clients easily as well as being able to add and remove destinations quickly. Cheers. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
Willy Offermans
2016-Aug-30 14:34 UTC
[asterisk-users] Multiple phones when one is unregistered
Dear D'Arcy J.M. Cain and asterisk friends, On Tue, Aug 30, 2016 at 09:56:05AM -0400, D'Arcy J.M. Cain wrote:> I have an extension that looks like this: > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > The idea is that any of the three users can answer the phone to let > someone in. The problem is that if, say, user2 unplugs his phone then > the call immediately goes to his voice mail and the other two do not > have the ability to open the door. > > Is there any way to direct only to phones in a list that are currently > registered? I am sure that I can write a rather convoluted extension > to check for registrations and create a dial command but I am hoping > that there is an easier way so that I can create these types of > extensions for other clients easily as well as being able to add and > remove destinations quickly. >To my opinion, you need a queue with dynamic agents. SIP/userX subscribes and checkouts manually, or better SIP/userX adds to the specific queue at the moment she or he registers to the system. I know how to do the former, but I would like to know about the latter. If someone could comment on that, I would highly appreciate. -- Met vriendelijke groeten, With kind regards, Mit freundlichen Gruessen, De jrus wah, Will ************************************* W.K. Offermans Powered by .... (__) \\\'',) \/ \ ^ .\._/_) www.FreeBSD.org
Joshua Colp
2016-Aug-30 14:37 UTC
[asterisk-users] Multiple phones when one is unregistered
D'Arcy J.M. Cain wrote:> I have an extension that looks like this: > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > The idea is that any of the three users can answer the phone to let > someone in. The problem is that if, say, user2 unplugs his phone then > the call immediately goes to his voice mail and the other two do not > have the ability to open the door. > > Is there any way to direct only to phones in a list that are currently > registered? I am sure that I can write a rather convoluted extension > to check for registrations and create a dial command but I am hoping > that there is an easier way so that I can create these types of > extensions for other clients easily as well as being able to add and > remove destinations quickly.The Asterisk behavior is such that even if one of those users are unregistered the other two will continue to be called. Is something upstream from Asterisk doing the voicemail? -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Eric Wieling
2016-Aug-30 14:39 UTC
[asterisk-users] Multiple phones when one is unregistered
The dialplan below cannot go to voicemail, either something else is going on or the dialplan below is not the actual dialplan. Calls only go to voicemail when the dialplan runs the VoiceMail application. Paste the Asterisk console output of a call showing the problem, maybe someone can help. On 08/30/2016 09:56 AM, D'Arcy J.M. Cain wrote:> I have an extension that looks like this: > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > The idea is that any of the three users can answer the phone to let > someone in. The problem is that if, say, user2 unplugs his phone then > the call immediately goes to his voice mail and the other two do not > have the ability to open the door. > > Is there any way to direct only to phones in a list that are currently > registered? I am sure that I can write a rather convoluted extension > to check for registrations and create a dial command but I am hoping > that there is an easier way so that I can create these types of > extensions for other clients easily as well as being able to add and > remove destinations quickly. > > Cheers. >-- if at first you don't succeed, skydiving isn't for you
A J Stiles
2016-Aug-30 14:53 UTC
[asterisk-users] Multiple phones when one is unregistered
On Tuesday 30 Aug 2016, D'Arcy J.M. Cain wrote:> I have an extension that looks like this: > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > The idea is that any of the three users can answer the phone to let > someone in. The problem is that if, say, user2 unplugs his phone then > the call immediately goes to his voice mail and the other two do not > have the ability to open the door.There is nothing in that dialplan snippet you provided that would send anything to voicemail. In fact, if you used that snippet, it would give the exact behaviour you describe yourself as wanting! Here's a protip for you: It's *not* a massive corporate secret, which phone will ring when somebody dials what number. Obfuscating your real dialplan like that just makes it harder for other people to help you. -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
D'Arcy J.M. Cain
2016-Aug-30 15:31 UTC
[asterisk-users] Multiple phones when one is unregistered
On Tue, 30 Aug 2016 10:39:14 -0400 Eric Wieling <ewieling at nyigc.com> wrote:> The dialplan below cannot go to voicemail, either something else isOf course not. It's the individual extensions that have voice mail. I have a similar problem when one of those destinations is a cell phone but I know that there is no Asterisk solution for that problem. If the cell phone answers and goes into the cell phone voice mail I am screwed. I can't fix that unless I also run the cell phone company. In this case the extensions are all set up in the same asterisk server. Here is an example. [user1](client-phone) secret=NotTheRealSecret callerid=John Doe <5555551212> mailbox=user1 at VoiceMail context=pbxout-19212 And here is the extension that calls it. Sorry about the wrapping. user1,1,Verbose(0,Entering extension user1) same => n,GotoIf($["${DEVICE_STATE(SIP/9999906549)}" "UNAVAILABLE"]?DialCell) same => n(DialWifi),Verbose(0, ${CALLERID(all)} Calling ${EXTEN} and SoftPhone) same => n,Dial(SIP/user1&SIP/9999906549,30) same => n,Goto(VoiceMail) same => n(DialCell),GotoIf($["x7165550000" = "x"]?DialDesk) same => n,GotoIf($["${CALLERID(ani)}" = "7165550000"]?DialDesk) same => n,Verbose(0,${CALLERID(all)} Calling "${EXTEN}" and cell "7165550000") same => n,Dial(SIP/user1&SIP/thinktel/7165550000,30) same => n,Goto(VoiceMail) same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN}) same => n,Dial(SIP/user1,30) same => n(VoiceMail),Set(CDR(userfield)=VoiceMail) same => n,Set(_ACCOUNT=user1) same => n,VoiceMail(user1 at VoiceMail,u) same => n,Hangup() It's a complicated extension but I believe that the following is the essential part. user1,1,Verbose(0,Entering extension user1) same => n,Dial(SIP/user1,30) same => n,VoiceMail(user1 at VoiceMail,u) same => n,Hangup()> going on or the dialplan below is not the actual dialplan. Calls only > go to voicemail when the dialplan runs the VoiceMail application.> Paste the Asterisk console output of a call showing the problem, > maybe someone can help.Here is what the log shows. I can't put the unregistered user back at the moment. Perhaps I can do it overnight when no one is going to the building. [Aug 23 10:20:55] WARNING[-1][C-0001fee7] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) I am assuming that the voice mail is for the absent (unregistered) user.> > exten => 5555551111,1,Verbose(Door buzzer calling) > > same => n,Dial(SIP/user1&SIP/user2&SIP/user3)Other than sanitizing the buzzer phone number and the user names this is the full extension for the buzzer. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
D'Arcy J.M. Cain
2016-Aug-30 15:39 UTC
[asterisk-users] Multiple phones when one is unregistered
On Tue, 30 Aug 2016 15:53:04 +0100 A J Stiles <asterisk_list at earthshod.co.uk> wrote:> > exten => 5555551111,1,Verbose(Door buzzer calling) > > same => n,Dial(SIP/user1&SIP/user2&SIP/user3)> Here's a protip for you: It's *not* a massive corporate secret,I will give you the benefit of the doubt and assume that you are not trying to patronize me.> which phone will ring when somebody dials what number. Obfuscating > your real dialplan like that just makes it harder for other people to > help you.All I did was sanitize the buzzer phone number and the names of the users. Other than that the above is the complete dialplan. See my other message for details of those extensions. I didn't think that there was anything relevant in that but I could be wrong. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
Administrator TOOTAI
2016-Aug-30 15:56 UTC
[asterisk-users] Multiple phones when one is unregistered
Le 30/08/2016 ? 15:56, D'Arcy J.M. Cain a ?crit :> I have an extension that looks like this: > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > The idea is that any of the three users can answer the phone to let > someone in. The problem is that if, say, user2 unplugs his phone then > the call immediately goes to his voice mail and the other two do not > have the ability to open the door. > > Is there any way to direct only to phones in a list that are currently > registered? I am sure that I can write a rather convoluted extension > to check for registrations and create a dial command but I am hoping > that there is an easier way so that I can create these types of > extensions for other clients easily as well as being able to add and > remove destinations quickly.Something like exten => 5555551111,1,Verbose(Door buzzer calling) same => n,Set(toRing=) same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN USE"]?Set(toRing=${toRing}&SIP/user1) same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN USE"]?Set(toRing=${toRing}&SIP/user2) same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN USE"]?Set(toRing=${toRing}&SIP/user3) same => n,Dial(${toRing:1}) ;to remove the first & would do the work -- Daniel
D'Arcy J.M. Cain
2016-Aug-30 16:05 UTC
[asterisk-users] Multiple phones when one is unregistered
On Tue, 30 Aug 2016 17:56:35 +0200 Administrator TOOTAI <admin at tootai.net> wrote:> exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Set(toRing=) > same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN > USE"]?Set(toRing=${toRing}&SIP/user1) > same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN > USE"]?Set(toRing=${toRing}&SIP/user2) > same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN > USE"]?Set(toRing=${toRing}&SIP/user3) > same => n,Dial(${toRing:1}) ;to remove the first & > > would do the workThat looks good and is easy to add and delete from the list. I will give this a try one night this week. Not sure what that last line would do if all of the phones are off but if they are the buzzer won't be answered anyway. Thanks. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
D'Arcy J.M. Cain
2016-Sep-01 01:57 UTC
[asterisk-users] Multiple phones when one is unregistered
On Tue, 30 Aug 2016 17:56:35 +0200 Administrator TOOTAI <admin at tootai.net> wrote:> Something like > > exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Set(toRing=) > same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN > USE"]?Set(toRing=${toRing}&SIP/user1)Failed. I checked the online docs and the syntax seems to be correct but I get this: [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application 'ExecIf' for extension (unauthenticated, 5555551111, 3) Is there a module that I need to load? In case it matters I am running Asterisk 11.23.0 on NetBSD 7.0. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
Mark Wiater
2016-Sep-01 10:22 UTC
[asterisk-users] Multiple phones when one is unregistered
On 8/31/2016 9:57 PM, D'Arcy J.M. Cain wrote:> exten => 5555551111,1,Verbose(Door buzzer calling) >> same => n,Set(toRing=) >> same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN >> USE"]?Set(toRing=${toRing}&SIP/user1) > Failed. I checked the online docs and the syntax seems to be correct > but I get this: > > [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application > 'ExecIf' for extension (unauthenticated, 5555551111, 3)Set is a function, not an application. ExecIF executes an application. I'm a bit confused by this whole topic. The dialplan snippet in the original email> exten => 5555551111,1,Verbose(Door buzzer calling) > same => n,Dial(SIP/user1&SIP/user2&SIP/user3)should have rung the phones forever as long as one phone was active and not forwarding or DNDing. Mark
D'Arcy J.M. Cain
2016-Sep-01 10:55 UTC
[asterisk-users] Multiple phones when one is unregistered
On Thu, 1 Sep 2016 06:22:18 -0400 Mark Wiater <mark.wiater at greybeam.com> wrote:> On 8/31/2016 9:57 PM, D'Arcy J.M. Cain wrote: > > exten => 5555551111,1,Verbose(Door buzzer calling) > >> same => n,Set(toRing=) > >> same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN > >> USE"]?Set(toRing=${toRing}&SIP/user1) > > Failed. I checked the online docs and the syntax seems to be > > correct but I get this: > > > > [Aug 31 21:52:00] WARNING[-1][C-0001fed5] pbx.c: No application > > 'ExecIf' for extension (unauthenticated, 5555551111, 3) > > Set is a function, not an application. ExecIF executes an application.I wondered about that but the docs are not very explicit on the subject and I thought that the other poster was suggesting something that he had used/tested.> I'm a bit confused by this whole topic. The dialplan snippet in the > original email > > > exten => 5555551111,1,Verbose(Door buzzer calling) > > same => n,Dial(SIP/user1&SIP/user2&SIP/user3) > > should have rung the phones forever as long as one phone was active > and not forwarding or DNDing.So does the Dial command go directly to the registered device or does it use the extension? I was assuming that it was going to the extension's voice mail if it wasn't there but that's in the extension dialplan and I suspect that the extension is irrelevant and only the SIP registration matters. That would be a good thing since many extensions also ring the user's cell phone and that would be annoying if they were at home when someone came to the office door. Perhaps my problem was that one of the users was removed from sip.conf but their phone was still in the above plan. For example, user2 leaves the company, is removed from sip.conf but we forgot to remove him from the door buzzer extension. That might give me the behaviour that I was seeing. I think I have enough information now to analyze this problem if it happens again. Thanks for the help. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:darcy at Vex.Net VoIP: sip:darcy at Vex.Net
Mark Wiater
2016-Sep-01 11:04 UTC
[asterisk-users] Multiple phones when one is unregistered
On 9/1/2016 6:55 AM, D'Arcy J.M. Cain wrote:> So does the Dial command go directly to the registered device or does > it use the extension?Yes, that's why you provide the technology part (SIP/, IAX/, DAHDI/)> I was assuming that it was going to the > extension's voice mail if it wasn't there but that's in the extension > dialplan and I suspect that the extension is irrelevant and only the > SIP registration matters. That would be a good thing since many > extensions also ring the user's cell phone and that would be annoying > if they were at home when someone came to the office door.If the target device has a forward configured, I believe Asterisk will dutifully ring the forward number like it was told, but could be wrong. Otherwise, it'll only go to voicemail, in asterisk, if you tell it to in the dialplan. Could it be going to voicemail on a forward somewhere?> Perhaps my problem was that one of the users was removed from sip.conf > but their phone was still in the above plan.In my experience, that too should not be a problem. I've got the same dial command structure, ringing multiple SIP/extensions in one dial command. I have some instances where the SIP entry in sip.conf no longer exists, and some instances where the device is not registered, and asterisk just displays a warning and continues on.> For example, user2 leaves > the company, is removed from sip.conf but we forgot to remove him from > the door buzzer extension. That might give me the behaviour that I was > seeing.I don't think so. At least I don't see that. Mark