Author Topic: [SOLVED] Events: Stop ringing extension  (Read 6669 times)

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
[SOLVED] Events: Stop ringing extension
« on: August 20, 2012, 08:29:49 pm »
I'm trying to create an event that allows me to ring all phones once somebody is at the front door.

I can get it to ring, but i just want it to ring 2~3 times. Any idea how i can do that?
Is there somewhere an (detailled) explanation of the different options?
For example what can i do with the strings?  :-\


My (failed) test:
  • Respond to Event
  • What device?: doorbell
  • Commands:
  •      Asterisk PBX_Application: Extension 206 (fe)
  •      LinuxMCE Delay: 4
  •      Asterisk PBX_Hangup: noidea (extension?)


« Last Edit: December 04, 2012, 03:35:12 pm by brononius »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Events: Stop ringing extension
« Reply #1 on: October 09, 2012, 12:14:06 pm »
Hey,

I noticed an update in the wiki for the doorbell.
>>> http://wiki.linuxmce.org/index.php?title=Doorbell&diff=32740&oldid=prev

Somebody has a solution on this topic?  :-[
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: Events: Stop ringing extension
« Reply #2 on: October 09, 2012, 03:08:07 pm »
Yes, posde did a fix today. The event template was wrong, so it did not match the doorbell device correctly.

br,
sambuca

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Events: Stop ringing extension
« Reply #3 on: October 09, 2012, 05:58:16 pm »
I'm not sure that that is my problem. :$
I've got a normal input switch at my front door (like a light switch). Not a phone system or so.
So once this 'security device' is triggered, my phone starts ringing (see above). So far, so good.

But the phone should only ring twice (or so).
And it would be nice if i could control the name on the display of the iphones (fe from front-door).

The idea is that the doorbell button rings a group of phones (fe all house, all external...).
This way, when the house is in sleep mode, only the phones 'all externall' are ringing.
Depends on a status of some things.

Some background: my girlfriend works often nights. So in the day, she's sleeping. And at that moment, the phones in the house should be quite, and the phones in the garage/office/... should be ringing when somebody is at the front door.


In the asterisk, there's a 'PBX hangup'. But i can't figure out how it works (channel id is not the same as the extension)...
« Last Edit: October 09, 2012, 06:01:40 pm by brononius »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Events: Stop ringing extension
« Reply #4 on: October 09, 2012, 07:37:07 pm »
I doubt there is the ability to define something to only ring twice.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Events: Stop ringing extension
« Reply #5 on: October 24, 2012, 12:43:19 pm »
I'm trying to find out how "Asterisk - PBX_Application" is written/used.
Any idea where i can found this out?

Is this a file-script, or doens't this work like this?
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: Events: Stop ringing extension
« Reply #6 on: December 04, 2012, 03:34:48 pm »
I found a solution that works for me. ;)

First create some scripts files:

more /scripts/sys_call_doorbell_201_org.call
Code: [Select]
Channel: Local/201@from-internal
callerid: "Deurbel" <200>
WaitTime: 3
Context: outgoing
Extension: 200
Priority: 1

more /scripts/sys_call_doorbell_205_org.call
Code: [Select]
Channel: Local/205@from-internal
callerid: "Deurbel" <200>
WaitTime: 3
Context: outgoing
Extension: 200
Priority: 1

...
Create this for all you phone extension. Or at least fo the phones you want to have in this scenario.
 
Then you can create a script to call the phones. You can put nice sequences in it, all depending on your house.

more /scripts/sys_call_launch_doorbell_normal.sh
Code: [Select]
#!/bin/bash
 
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_205_org.call /scripts/sys_call_doorbell_205.call
mv /scripts/sys_call_doorbell_205.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_206_org.call /scripts/sys_call_doorbell_206.call
mv /scripts/sys_call_doorbell_206.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_202_org.call /scripts/sys_call_doorbell_202.call
mv /scripts/sys_call_doorbell_202.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_203_org.call /scripts/sys_call_doorbell_203.call
mv /scripts/sys_call_doorbell_203.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_207_org.call /scripts/sys_call_doorbell_207.call
mv /scripts/sys_call_doorbell_207.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_208_org.call /scripts/sys_call_doorbell_208.call
mv /scripts/sys_call_doorbell_208.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_205_org.call /scripts/sys_call_doorbell_205.call
mv /scripts/sys_call_doorbell_205.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_206_org.call /scripts/sys_call_doorbell_206.call
mv /scripts/sys_call_doorbell_206.call /var/spool/asterisk/outgoing/.
And another scenario for 'night' simulation:

more /scripts/sys_call_launch_doorbell_atelier.sh
Code: [Select]
#!/bin/bash
 
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_203_org.call /scripts/sys_call_doorbell_203.call
mv /scripts/sys_call_doorbell_203.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_208_org.call /scripts/sys_call_doorbell_208.call
mv /scripts/sys_call_doorbell_208.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.

Once this is build, you can start using them when somebody push the doorbel. It just a matter of triggering the right scenario (app server / spawn application)...
See attachments for more information on this...

ps you can even call your cellphone when somebody hits the doorbell... ;)
« Last Edit: December 04, 2012, 03:37:26 pm by brononius »
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: [SOLVED] Events: Stop ringing extension
« Reply #7 on: December 05, 2012, 08:02:01 am »
Very nice!

Maybe worth a page in the wiki- How to ring phones from doorbell

or something similar.

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: [SOLVED] Events: Stop ringing extension
« Reply #8 on: December 05, 2012, 08:39:10 am »
Maybe worth a page in the wiki

For the moment, i'm gathering everything on my own intranet: linuxmce and eibd+events...  :-\ 
For me personally, the linuxmce wiki is to much chaos. I can't find an overview in it. But this is another topic...

I'm thinking to create a kind of 'event' scenario's. Situations from the real life... Where people can see what's possible with linuxmce...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: [SOLVED] Events: Stop ringing extension
« Reply #9 on: December 05, 2012, 08:44:24 am »
Agreed... the wiki is a bit chaotic but one day someone will pull it all together and then it will help if the material is there to be organised ;-)

If the page is there, google will index it.

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [SOLVED] Events: Stop ringing extension
« Reply #10 on: December 05, 2012, 10:03:36 am »
Another question is whether we should add workarounds and hacks to the wiki. Even if they are clearly marked as such, it's only a matter of time before someone thinks that it is a recommended or supported way of doing things.

I assume that you have added a feature request for this?

br,
sambuca

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: [SOLVED] Events: Stop ringing extension
« Reply #11 on: December 05, 2012, 10:52:50 am »
I vote yes. (to hacks and workarounds on the wiki)... and try to encourage people to mark them as such
Perhaps I'm biased because everything I do is a hack ;)


brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: [SOLVED] Events: Stop ringing extension
« Reply #12 on: December 05, 2012, 11:13:01 am »
I vote, i don't care... :-[

I had a problem, linuxMCE couldn't provide me a solution 'out-of-the-box', and i found a solution.

Is it a good solution? I'm sure there are better ways. But what is good?
This is just one of the biggest advantages of Linux(mce).  That you're free to do whatever you want with it.


And i didn't added a feature request. Since i don't have a clue what/how/why/where this is.
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE