Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (65 sloc) 2.61 KB
<?xml version="1.0" encoding="UTF-8"?>
<beans>
<bean id="createCallStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
CREATE TABLE IF NOT EXISTS `${mysql.table.call}` (
`id` int(11) NOT NULL auto_increment,
`uniqueid_src` varchar(32) NOT NULL,
`uniqueid_dst` varchar(32) NOT NULL,
`channel_src` varchar(64) NOT NULL,
`channel_dst` varchar(64) NOT NULL,
`clid_name` varchar(64) NOT NULL,
`clid_num` varchar(64) NOT NULL,
`status` varchar(64) default NULL,
`time_dial` int(11) default NULL,
`time_answer` int(11) default NULL,
`cause` int(11) default NULL,
`cause_txt` varchar(32) default NULL,
`eventStart` text NOT NULL,
`eventEnd` text,
`dialstring` varchar(64) NOT NULL,
`created` timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `status` (`status`),
KEY `uniqueid` (`uniqueid_src`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
</value></constructor-arg>
</bean>
<bean id="hangupCallStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
UPDATE `${mysql.table.call}` SET `cause`=:cause,`cause_txt`=:causeTxt WHERE `uniqueid_src`=:uniqueidSrc
</value></constructor-arg>
</bean>
<bean id="insertStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
INSERT INTO `${mysql.table.call}` (
`dialstring`, `clid_name`, `clid_num`, `channel_src`, `channel_dst`,
`eventStart`, `uniqueid_src`, `uniqueid_dst`
) VALUES(
:dialString, :clidName, :clidNum, :channelSrc, :channelDst,
:eventStart, :uniqueidSrc, :uniqueidDst
)
</value></constructor-arg>
</bean>
<bean id="dialedTimeStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
UPDATE `${mysql.table.call}` SET `time_dial`=:timeDial WHERE `uniqueid_src`=:uniqueidSrc
</value></constructor-arg>
</bean>
<bean id="answeredTimeStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
UPDATE `${mysql.table.call}` SET `time_answer`=:timeAnswer WHERE `uniqueid_src`=:uniqueidSrc
</value></constructor-arg>
</bean>
<bean id="endCallStatement" class="PDOStatement" scope="prototype"
factory-bean="pdoMysql" factory-method="prepare">
<constructor-arg><value>
UPDATE `${mysql.table.call}` SET `eventEnd`=:eventEnd, `status`=:status WHERE `uniqueid_src`=:uniqueidSrc
</value></constructor-arg>
</bean>
</beans>