trigger elastix by inbound email?

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#1
Is there a FAQ or how to for dummies to trigger some action/context with an email sent to elastix.


I would like to avoid opening the https port to the outside also I would like to be able to link embedded email capable applications to elastix.

Example: send a voice message when my burglar alarm has some issues or if my backup server has a hard drive failure.
 

telecomtechnician

Joined
Jan 8, 2008
Messages
422
Likes
0
Points
16
#2
Hi there

This is absolutly possible, but there is some programming and modification of the elastix interface involved. That means, PHP, MYSQL and other programs to touch.

Take a look at the agenda TAB and start playing with it.

Waiting for your comments

David Medina
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#3
Patrick, if you want to send a mail on each event (alarm, ...Etc). I don't think that it's Elastix, but Linux, no?
With Elastix, it's possible to send a message (voice) to the phone on event, (A alarm -> send a phone number).
It's right?
Like David say it, you can use the same way that Agenda. Leave a file into /var/spool/asterisk/outgoing/
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#4
ok, now the question will be how can I execute a macro when postfix receive an email in a specific mailbox to be able to format a proper event message in the outgoing asterisk folder?
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#5
I'm trying to play with the event.call files without success so far.

I've tried to modify an event.call file that was created by the agenda by only changing the time on it (touch -t), but nothing is happening at the new specific time.

Is there anything I'm missing? Or it there another file that need to be modified
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
who owns the event.call file?
does it "disappear" at the time it was touched to?
 

wiseoldowl

Joined
Aug 19, 2008
Messages
251
Likes
0
Points
0
#7

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#8
dicko said:
who owns the event.call file?
does it "disappear" at the time it was touched to?
the file is owned by asterisk:asterisk
and the file will disappear after the initial time set up by the agenda module, not the one set up by touch -t
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#9
by looking at the event_submit.php, the application is also adding the event in the sql database.

is asterisk looking at the database in addition of the outgoing folder?

still investigating.
 

Patrick_elx

Joined
Dec 14, 2008
Messages
1,120
Likes
0
Points
0
#10
thanks to wiseoldowl I found the problem.

Creating and moving call files
Because Asterisk can grab these files at any time (e.g. when the file is only 1/2 written), do not create the file directly in the /var/spool/asterisk/outgoing directory. Do something like this:

* create the call file in a different directory - e.g. /var/spool/asterisk/temp1234
* chown asterisk:asterisk /var/spool/asterisk/temp1234 (if temp1234 was created by root and Asterisk is running as username asterisk)
* mv /var/spool/asterisk/temp1234 /var/spool/asterisk/outgoing

This works because the Unix move operation (mv command) merely moves the "inode"
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,981
Messages
131,060
Members
17,703
Latest member
elvis martinez
Top