LinuxMCE Forums

General => Users => Topic started by: brononius on August 20, 2012, 08:29:49 pm

Title: [SOLVED] Events: Stop ringing extension
Post by: brononius 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:


Title: Re: Events: Stop ringing extension
Post by: brononius 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?  :-[
Title: Re: Events: Stop ringing extension
Post by: sambuca 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
Title: Re: Events: Stop ringing extension
Post by: brononius 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)...
Title: Re: Events: Stop ringing extension
Post by: Marie.O on October 09, 2012, 07:37:07 pm
I doubt there is the ability to define something to only ring twice.
Title: Re: Events: Stop ringing extension
Post by: brononius 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?
Title: Re: Events: Stop ringing extension
Post by: brononius 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... ;)
Title: Re: [SOLVED] Events: Stop ringing extension
Post by: jamo 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.
Title: Re: [SOLVED] Events: Stop ringing extension
Post by: brononius 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 (http://oniriabe.dyndns.org:1111/intranet/index.php/weetjes/linux/linuxmce/195-linuxmce) and eibd+events (http://oniriabe.dyndns.org:1111/intranet/index.php/weetjes/linux/linuxmce/254-eib)...  :-\ 
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...
Title: Re: [SOLVED] Events: Stop ringing extension
Post by: jamo 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.
Title: Re: [SOLVED] Events: Stop ringing extension
Post by: sambuca 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
Title: Re: [SOLVED] Events: Stop ringing extension
Post by: jamo 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 ;)

Title: Re: [SOLVED] Events: Stop ringing extension
Post by: brononius 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.