Sunteți pe pagina 1din 2

We need a daemon written in C which will interact with Asterisk server and Mysql database.

 This 
daemon will get instructions from MySQL table and execute the task on Asterisk server. The contractor 
will be responsible for the installation of Asterisk, all the call related modules/libraries, and the daemon 
developed on our Centos based server.  
 
Mysql Tables are: 
1) User1‐ user1Id, opCode, opCodeOperated, phoneNumber, ivrText, parameter1, parameter2 
2) User1Response‐ user1Id, response 
3) User2‐ user2Id, user1Id, opCode, opCodeOperated, phoneNumber, ivrText, duration, 
parameter1 , parameter2 , parameter3 , parameter4  
4) User2Response‐ user2Id, response 

 
Properties of Daemon: 
 Daemon will act on opCode with rows having opCodeOperated=0 in User1 and User2 tables; 
After executing the task specified by opCode on Asterisk server, it will update the value of 
opCodeOperated to 1.  This helps daemon to differentiate the tasks that are pending from the 
tasks that are done. 
 This daemon will also monitor the status of user calls, and will report every status change to the 
response column in the corresponding UserResponse table.  
 Daemon uses a text‐to‐speech solution to convert the assigned text into audio file and play.  

opCode  opCode value  Corresponding action that daemon will take 


applicable to 
tables 
User1, User2  call  daemon calls the phoneNumber  
User1, User2  callDrop  daemon drops the call 
User1, User2  playIvr  Daemon plays the ivrText  
             User2  conference  daemon puts the 2 calls corresponding to user1Id and 
user2Id into conference 
             User2  conferenceBreak  daemon ends the conference without dropping the 
calls 
User1  add  daemon adds the value in parameter1 column to 
parameter2 column 
             User2  webService1  daemon calls a PHP based webService1 and passes 
(parameter1,  parameter1, parameter2, & parameter3 
parameter2, 
parameter3) 
             User2  webService2  daemon calls a PHP based webService2 and passes 
(parameter1,  parameter1, parameter2, parameter3, & parameter4 
parameter2, 
parameter3, 
parameter4) 
Note: After completing the assigned task daemon will update opCodeOperated=1 in the 
respective User table.  
 

Whenever there is a status change for a user, daemon will update the response in the 
corresponding UserResponse table. 
Status Change  Daemon will update  Some status changes will require ivrText in 
the response in  User table to be played  
UserResponse table  
Call connects  callConnected  daemon will play ivrText till new instruction 
Call drops  callDropped  ‐ 
ivrText starts to play  ivrStarted  ‐ 
ivrText completes  ivrCompleted  daemon will replay ivrText till new instruction 
 
Conference starts (2  confStarted  ‐ 
active calls joined into a 
conference) 
Conference ends (but  confEnded  daemon will play ivrText till new instruction 
both calls active) 
Presses a key‐ x  keyPressed_x  ‐ 
 

S-ar putea să vă placă și