Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - brononius

Pages: 1 ... 4 5 [6] 7 8 ... 27
76
Users / Re: [SOLVED] Events: Stop ringing extension
« 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.

77
Users / Re: [SOLVED] Events: Stop ringing extension
« 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...

78
Users / Re: Events: Stop ringing extension
« 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... ;)

79
Installation issues / Re: Phone line goes down?
« on: December 04, 2012, 03:11:20 pm »
I've improved this workaround a bit. No longer with 'timed event', but with a real service restart check:

Intro: When LinuxMCE is restarted, the SIP provider isn't regristed anymore. You need to place 1 outgoing call, and then it's solved. Of course, when you reload the router (=restart the linuxmce service), then you need to replace an outside phonecall.

Since it's a bit hard to keep this in mind for the rest of your life, i've added a kind of check script. This script is placed in the crontab, and checks each x-minutes if the service 'asterisk' has been restarted. If it isn't, it does nothing. If it is, i'll place a file into /var/spool/asterisk/outgoing and will call this number.

In this example below, change 0123456789 with your external number. I've put my own phonenumber in here. So it's just initate the call, and drops it after 1 second.



more /scripts/sys_call_outside_org.call
Code: [Select]
Channel: Local/0123456789@trusted
WaitTime: 1
Context: outgoing
Extension: 200
Priority: 1

more /scripts/sys_call_check.sh
Code: [Select]
#!/bin/bash

if tail -20 /var/log/asterisk/full | grep "chan_sip.c: SIP channel loading"
then
  : # colon is a null and is required
  #Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The service for Asterisk has been apparantly been restarted." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/asterisk/full
else
    echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/asterisk/full
fi


if tail -100 /var/log/pluto/18_Asterisk.log | grep "Got a reload command from 0"
then
  : # colon is a null and is required
  #Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Asterisk has been apparantly been restarted by Linxumce." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/pluto/18_Asterisk
.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............................." >> /var/log/pluto/18_Asterisk.log

else
    echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/pluto/18_Asterisk.log
fi

more /scripts/sys_call_launch.sh
Code: [Select]
#!/bin/bash
sleep 60
cp /scripts/sys_call_outside_org.call /scripts/sys_call_outside.call
mv /scripts/sys_call_outside.call /var/spool/asterisk/outgoing/.

more /etc/crontab
Code: [Select]
<knip>
*/7 * * * *     root    /scripts/sys_call_check.sh &> /dev/null
</knip>


Comments to improve this more are of course welcome...

80
Users / Re: DAY/NIGHT = Time or 'timeframe'?
« on: December 04, 2012, 02:52:43 pm »
OK, i figured it out...

  • Add a "Respond To Events"
  • Insert a description
  • Choose from dropdown 'New Event': Sunrise (or sunset)
  • Add you command

So in fact, when you look now at the event, you'll see that the "criteria" are empty.

81
Feature requests & roadmap / Re: Status / overview page?
« on: December 04, 2012, 02:49:11 pm »
UPDATE: Before i ran a script to read the sunrise/-set from the log files. This wasn't best practice since it was a higher load for the system, just to get this value.
I found out that php has a command date_sunrise and date_sunset that calculs your sunrise timing. This based on your lattitude and longitude. And let these values now be in the database.

So i've update the status page:
  • first grep the latt and long from the db
  • get the offset from the timezone
  • use this with date_sunrise
  • ...

http://oniriabe.dyndns.org:1111/status/

82
Users / Trigger script with respond to events
« on: December 01, 2012, 08:47:40 am »
Perfect!!!!
This opens a whole new box of oppurtunities to play around with...  ::)

Didn't understand the term 'spawn'. But now i do... ;)

83
Users / [SOLVED] Trigger script with respond to events
« on: November 30, 2012, 01:57:03 pm »
What's the best way to start a homemade script with respond to events?
I couldn't figure out what kind of event command i need to use.
Is this #28 PK_CommandGroup (int)

fe when you push a light switch, it should trigger '/scripts/startprinting.sh'

84
Users / Re: DAY/NIGHT = Time or 'timeframe'?
« on: November 27, 2012, 08:44:20 am »
There are events for sunset and sunrise, you can use those instead.
http://wiki.linuxmce.org/index.php/Event_criteria#Time_of_Day.

I fail to understand it. :$

So i choose a 'respond to events' and in events, i add 'Time of Day = DAY'?
Doesn't this say that it will be triggerd the whole day? Or only at sunrise?

I've also tried to add an advanced event, and in 'New event' i've chosen 'general > sunrise'.
But when i check now the events, this is empty? Is this normal?

85
Users / Re: LMCE right for me?
« on: November 26, 2012, 08:02:09 am »
All things are possible. I'm using them in a reallife situation (home automation, IP-phones, IP-camera's, data...)

The only thing i really miss in the whole LinuxMCE story is a nice backup system for you data.
But this can be solved with some tricks. I use fe a NAS with rdiff to backup all my data/config nightly.



86
Users / Re: LMCE & security
« on: November 26, 2012, 07:57:32 am »
Usually there is a router before the core anyways

You can mostly add additional security features on this router (fe buildin firewall).
Or to be 100% safe, add a real firewall device in front of it. Of course, this is an extra device (power consumption, configuration work...)

87
Users / [SOLVED] DAY/NIGHT = Time or 'timeframe'?
« on: November 26, 2012, 07:53:17 am »
Hey,

I'm using several 'respond to events' where i choose DAY/NIGHT to happen different things. fe:
  • lights on when i come home at night
  • lights not on when i come home at day
This is working great btw

Now i was trying to make some things happen when night falls. But for one or the other reason, it seems to fail.
I added:
  • Timed events
  • Days of week: 1,2,3,4,5,6,7
  • Time: NIGHT
  • ...

I'm wondering if we can use the term NIGHT/DAY as actually time, or is this only for a kind of timeframe?

88
Installation issues / Re: Phone line goes down?
« on: November 20, 2012, 06:40:09 pm »
Okay, maybe not as it should be, but this is a temporary workaround...  :-X


I've created a 'respond to event'.

Criteria
  • Day of the week: 1,2,3,4,5,6,7
  • Time of day: 6:55

Commands: Asterisk - PBX Application
  • application: ring
  • Number: 01990

This will automaticlly calls each day in the morning a number of my provider. The number gives me information about the latest caller.
I specially choose this number since it will automaticlly kill the call once it gave the information (+/- 10sec). And of course because it's a free number.

Of course, it would be nicer that it only calls once (if the line went down, if the server rebooted). But i couldn't figure out how i can trace that with 'respond to events'. So for the moment, a daily call should do it...
But if somebody could tell me how i could it elseway, glad...

89
Installation issues / Re: Phone line goes down?
« on: November 20, 2012, 11:42:23 am »

But no solution so far for the bug at asterisk...  :(

Maybe i should create a small script that performs an outgoing call each time the server boots?
This way the line will be registred?

90
Installation issues / Update went wrong?
« on: November 07, 2012, 07:08:13 pm »
Hey,

Just (2012-11-07) did an 'apt-get upgrade', and several things where updated for linuxcme (fe i saw a lot of things on the db and website).

But when i now restart the server, it's in a kind of loop.
  • In the begin, i see that he's has problems with the network interface. And from another machine i'm not able to reach it anymore.
  • The server itself keeps on retrying to connect with the DCErouter. I'm not able to connect with cli (fe with alt-f2).

I've connected another harddisk (with a working linuxmce from last week), and this one starts up fine.
So somewhere their went something wrong with the network drivers.
Any idea how i can 'bypass'/restore this?


Pages: 1 ... 4 5 [6] 7 8 ... 27