Author Topic: Don't ring any phones during sleeping mode?  (Read 6401 times)

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Don't ring any phones during sleeping mode?
« on: November 02, 2010, 04:28:02 pm »
Hello,

I have the following problem:
a) In the admin, in phone lines / settings, I have configured most of my extensions (those in bedrooms anyway) not to ring when in sleeping mode
b) In the admin under telecom / call routing, I have configured for calls to go straight to voicemail when my users are in sleeping mode. I did the same for priority callers as a precaution, although I have no priority callers configured.

Now when I call the house, most of my extensions will not ring, as expected. After a few rings, the IVR kicks in. One of the prompts is "To call everybody in the house, press 0". When the caller presses 0, all extensions in the house start ringing, including those that were disabled in step a), so everybody wakes up.

How can I prevent Asterisk from ringing any more extensions after IVR/Press0 than it is ringing before the IVR? (or it could go straight to voicemail at that point, that would be fine too).

Jean

PS: I *think* this was working how I wanted when I was running 710, but I can't figure out how to change this behavior in 810. I'm probably just not looking in the right place...

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #1 on: November 05, 2010, 12:11:28 am »
MAybe not of much help, but...

try to check logs - it must say what is executing and you could figure out, why it comes to that point...

Regards,
Bulek.
Thanks in advance,

regards,

Bulek.

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #2 on: November 10, 2010, 05:20:57 pm »
Create a ticket and I'll take a look at it, from what I had found in there several months ago I doubt the logic was ever in place to handle it.

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: Don't ring any phones during sleeping mode?
« Reply #3 on: November 10, 2010, 06:49:09 pm »
Check the call routing options under telecomm.


HTH


Tim
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #4 on: January 30, 2011, 07:15:16 pm »
Sorry, it took me a while to look at this with the holidays and all.

The relevant code is in extensions_pluto_dial.conf

When someone selects the "Call everybody in the house" option in the ivr menu, there is simply a dial command without any conditions that dials any phone in the house. I think this behavior is wrong for the reasons stated in my initial post, however I'm not exactly sure what the best solution is.

In my case, if I replace the Dial statement by:

exten => 0,1,AGI(pluto-gethousemode.agi)
exten => 0,2,Goto(from-pluto-custom,103-hm${HOUSEMODE},1)

Then instead of ringing all phones, it will only ring those configured for the housemode, for the duration entered in the admin (# of seconds to ring before IVR) and then return to the IVR (basically it does the same as it just did before getting to the IVR). For me this behavior is acceptable, but I don't know if it is for everyone. I have a "# of seconds to ring before IVR" set to 25 in my system. My idea is that when someone calls, the phones ring, like normal phones, and if someone is there, they will pickup. The IVR is only supposed to be used if nobody is home.

So before opening a trac ticket to provide this change/patch, we need to understand if this solution is suitable for everyone. For example, does everyone have a "# of seconds to ring before IVR" > 0, or are there people who go immediately to the IVR, and expect callers to be able to choose the option "call everyone in the one" if they want to ring all phones versus calling one particular user?

Another possible solution, which I could try to implement, would be to make the "call everybody in the house" option of the IVR optional. It could be enabled or disabled in the admin. In my case I would disable it, and that would suit me as well.

Please let me know your thoughts.

Jean

PS: can anyone tell me where the code is that generates extensions_pluto_dial.conf based on the config entered in the admin?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #5 on: January 30, 2011, 09:39:28 pm »
I'm okay with the proposed first option. Would love a patch... Unfortunately, I am not entirely sure where you would make the changes.. look in src/Asterisk and src/Telecom_Plugin.

-Thom

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #6 on: February 03, 2011, 05:30:09 pm »
So the file that controls this is pluto/bin/create_pluto_dialplan.pl, which is actually much easier for me to change since it doesn't have to be compiled.

Unfortunately I am unable to create a trac ticket, the trac server says "Submission rejected as potential spam (SpamBayes determined spam probability of 94.09%)"

Attached is the patch I made, perhaps someone can create the ticket for me?

Jean

jeangot

  • Guru
  • ****
  • Posts: 233
    • View Profile
Re: Don't ring any phones during sleeping mode?
« Reply #7 on: February 03, 2011, 06:32:32 pm »
Nevermind, it seems that the ticket in trac was created after all, since I received some emails. It actually created 2 tickets: 974 and 975, so one needs to be deleted.