LinuxMCE Forums
May 22, 2013, 04:58:49 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Events: Stop ringing extension  (Read 1071 times)
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« on: August 20, 2012, 07: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?  Undecided


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 » Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #1 on: October 09, 2012, 11:14:06 am »

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?  Embarrassed
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
sambuca
Guru
****
Posts: 420


View Profile
« Reply #2 on: October 09, 2012, 02: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
Logged
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #3 on: October 09, 2012, 04: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, 05:01:40 pm by brononius » Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #4 on: October 09, 2012, 06:37:07 pm »

I doubt there is the ability to define something to only ring twice.
Logged

brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #5 on: October 24, 2012, 11:43:19 am »

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?
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #6 on: December 04, 2012, 03:34:48 pm »

I found a solution that works for me. Wink

First create some scripts files:

more /scripts/sys_call_doorbell_201_org.call
Code:
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:
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:
#!/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:
#!/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... Wink
« Last Edit: December 04, 2012, 03:37:26 pm by brononius » Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
jamo
Guru
****
Posts: 352


View Profile WWW
« 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.
Logged
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« 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...  Undecided 
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...
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
jamo
Guru
****
Posts: 352


View Profile WWW
« 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.
Logged
sambuca
Guru
****
Posts: 420


View Profile
« 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
Logged
jamo
Guru
****
Posts: 352


View Profile WWW
« 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 Wink

Logged
brononius
Guru
****
Posts: 360


Trying to keep it simple and centralized...


View Profile WWW
« Reply #12 on: December 05, 2012, 11:13:01 am »

I vote, i don't care... Embarrassed

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.
Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!