-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
145 lines (136 loc) · 7.59 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<h1 id="odin-project">ODIN project</h1>
<p>Monitoring system for Asterisk IPBX. This project is has 4 parts</p>
<blockquote>
<p>Http Server: Web server for monitoring iPBX states by web interface. This application is base inot nodejs.</p>
</blockquote>
<blockquote>
<p>OdinAMI : Dispatcher Asterisk AMI Events to the different types of client. REDIS message queue used as message dispatcher.</p>
</blockquote>
<blockquote>
<p>OdinF1COM : F1COM server some kind of glue beetwen OdinAMI and F1COM clients</p>
</blockquote>
<blockquote>
<p>FastAGI : There are two FastAGI servers for incomming call and for call monitoring.</p>
</blockquote>
<h2 id="web-server">Web Server</h2>
<p>Nodejs web server based. Client part of the application implemented with angularsjs.</p>
<h3 id="odinami">OdinAMI</h3>
<p>Python twisted server based on starpy. Monitor the states of an Asterisk IPBX to different type of clent and accept(dispatch) request to Asterisk IPBX.</p>
<h3 id="odinf1com">OdinF1COM</h3>
<p>Python twisted server. Its role is to manage F1COM protocol for outgoing and incomming calls. Configuration file contains values for different parameters. Theses parameters are divided into several sections. Section names and settings are very meaningful to use. Please see the configuration file odinf1com.conf into config directory</p>
<p>Configuration of Asterisk dialplan is very important for the application. Please pay a littele attention for the dialplan configuration. Dialplan example is presented below:</p>
<pre><code>[incomming-calls-for-queue]
exten = _X.,1,NoOp(incomming-calls-for-queue)
same => n,Answer
same => n,UserEvent(incommingcall,Context:from-white-house, channel: ${CHANNEL},
extention:${EXTEN},calleridnum:${CALLERID(num)},calleridname:${CALLERID(name)},uniqueid: ${CDR(uniqueid)})
same => n,Goto(queues,6500,1)
same => n,Hangup()</code></pre>
<p>Generated UserEvent is important for the incomming call processing don't forget to include the context to yours spans contexts. You must configured a queue like below:</p>
<pre><code>[6500]
fullname = WaitingQueue
strategy = ringall
timeout = 15
wrapuptime = 15
autofill = no
autopause = no
joinempty = yes
leavewhenempty = no
reportholdtime = no
maxlen = 10
musicclass = default
eventwhencalled = yes</code></pre>
<p>Important thing that provide <b>joinempty = yes</b> queue's parameter for leave the new incomming into the queue on waiting.</p>
<h3 id="odinmonitoring-a-call-audio-recorder-rc1-compatible.">OdinMonitoring, a call audio recorder RC1 compatible.</h3>
<p>Please install samba package for use a windows shared folder, this is a good choise to save disk space" of the iPBX host. Example for debian based OS : <b>apt-get install smbclient cifs-utils</b></p>
<p>MySql driver must be installed into Windows host. Source ODBC must be created, please check user's rights of the mysql server.</p>
<p>Example to mount a windows shared folder :</p>
<pre><code> mount -t cifs //192.168.3.97/RC1/Db/Data/Audio /home/rc1/ -o username=toto,password=tata,file_mode=0777,dir_mode=0777 where 192.168.3.81 is the windows host et RC1 a shared folder.</code></pre>
<p>iPBX dialplan configuration :</p>
<p>Edit the global section into extentions.conf file and ajust or create variables :</p>
<pre><code>MIXMON_FASTAGI_ADR=127.0.0.1:4576
RC1_DIR = /home/rc1/
MIXMON_DIR = /var/spool/asterisk/monitor/</code></pre>
<p>Follow the sample macro examples.</p>
<p>Macro macro-record-enable can be found into extentions_custom.conf file. This macro initialize the recording process :</p>
<pre><code>[macro-record-enable]
exten => s,1,NoOp(macro-record-enable)
exten => s,n,StopMixMonitor()
exten => s,n(check),AGI(agi://${MIXMON_FASTAGI_ADR})
exten => s,n,MacroExit()
exten => s,999(record),Noop(You can playback a voice recording message)
exten => s,1000(record),MixMonitor(${MIXMON_DIR}${MONITOR_CALL_FILE_NAME},b)
;end of [macro-record-enable]</code></pre>
<p>Macro macro-record-stop stop recording process and can(must) be called into h extention of the context. If the recording was started the fastagi monitor script inoked and the call recording stopped.</p>
<pre><code>[macro-record-stop]
exten => s,1,NoOp(macro-record-stop)
exten => s,n,GotoIf($["${MONITOR_CALL_FILE_NAME}" = ""]?exit:)
exten => s,n,StopMixMonitor()
exten => s,n,AGI(agi://${MIXMON_FASTAGI_ADR})
exten => s,n(exit),MacroExit()
;end of [macro-record-stop]</code></pre>
<p>Macro macro-record-rc1-converter can be used for the conversation the asterisk wav file to rc1 compatible format</p>
<pre><code>[macro-record-rc1-converter]
exten => s,1,NoOp(record-rc1-converter)
exten => s,n,GotoIf($["${MONITOR_CALL_FILE_NAME}" = ""]?exit:)
exten => s,n,StopMixMonitor()
exten => s,n,System(/usr/bin/sox ${MIXMON_DIR}${MONITOR_CALL_FILE_NAME} -r 8000 -b 8 -c 1 -e a-law ${RC1_DIR}${MONITOR_CALL_FILE_NAME})
exten => s,n(exit),MacroExit()
;end of [macro-record-enable]</code></pre>
<p>Example :</p>
<pre><code> [record-exampe-context]
include = parkedcalls
same => n,Macro(record-enable)
same => n,NoOp(Monitor file :${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})
same => n,Dial(SIP/6005&SIP/6006,60,tTkK)
same => n,Hangup()
exten = h,1,Macro(record-stop)
same => n,Macro(record-rc1-converter)
same => n,NoOp(Monitor file hangup : ${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})</code></pre>
<p>Dialplan example :</p>
<pre><code>[from-external-recording]
exten = _X.,1,NoOp(from-external-recording : ${CALLERID(all)})
same => n,Macro(record-enable)
same => n,NoOp(Monitor file :${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})
;same => n,Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)
same => n,Set(TIMEOUT(absolute)=60)
same => n,Dial(SIP/6005&SIP/6006,60,tTkK)
same => n,Hangup()
exten = h,1,Macro(record-stop)
same => n,Macro(record-rc1-converter)
same => n,NoOp(Monitor file hangup : ${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})
[from-external-f1com]
exten = _X.,1,NoOp(from-external-recording-f1com : ${CALLERID(all)})
same => n,UserEvent(incommingcall,Context:from-external, channel: ${CHANNEL}, extention:${EXTEN},calleridnum:${CALLERID(num)},calleridname:${CALLERID(name)},uniqueid: ${CDR(uniqueid)})
same => n,Macro(record-enable)
same => n,NoOp(Monitor file :${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})
;same => n,Set(CHANNEL(hangup_handler_push)=hangup-handler,s,1)
same => n,AGI(agi://127.0.0.1:4575)
same => n,Set(TIMEOUT(absolute)=60)
same => n,Goto(queues,6500,1)
same => n,Hangup()
exten = h,1,Macro(record-stop)
same => n,Macro(record-rc1-converter)
same => n,NoOp(Monitor file hangup : ${MIXMON_DIR}${MONITOR_CALL_FILE_NAME})
[hangup-handler]
exten => s,1,NoOp(Hangup handler)
same=> n,Macro(record-stop)
same=> n,Macro(record-rc1-converter)
same=> n,Return()
[from-somewhere]
include = parkedcalls
;exten = _X.,1,Goto(from-external-f1com,${EXTEN},1)
exten = _X.,1,Goto(from-external-recording,${EXTEN},1)</code></pre>
<h3 id="installation">Installation</h3>
<p>Please transfer odin_[version].tar.gz file into /opt directory of the target host.</p>
<p>Execute tar xvzf odin_[version].tar.gz</p>
<p>Change the directory : cd /opt/odin/install</p>
<p>Execute ./install.sh and follow instructions.</p>
<h2 id="directory-layout">Directory Layout</h2>
<pre><code>odin/ --> all application components and library
client/ --> web client files
server/ --> Nodejs web server
pyodin/ --> AMI and F1COM servers
scripts/ --> Test scripts, not for production
test/ --> Test source files and libraries</code></pre>
<h2 id="contact">Contact</h2>