Quick Database Centric Web Based Application Development

I have integrated Asterisk(AGI, AMI, API, ARA) with Oracle 11g Database using OCI C/C++.
Please join my community ‘Asterisk, SS7 @ CentOS’ on orkut:

Good for you… but what this has to do with “Asterisk Support” ??

I can support any one who wants to integrate Asterisk with Oracle database. I think there is no harm in it.

Do we have some moderators in the house :wink:

Thanks viewers for your encouraging emails. Instead of answering every email, let me write about the most common FAQ:
My asterisk integration with oracle is based on the Oracle’s database centric computing approach. I basically use Oracle Application Express (HTML DB) to quickly build web based GUI (Forms and Reports) and PL/SQL to quickly write and process the business logic, AGI, AMI commands and API events on the basis of data stored in the database. I am using PL/SQL to generate logic to automatically configure Asterisk in real time thru its ARA integration with Oracle. The data centric approach is several time faster than traditional PHP, Perl etc based programming and offloads Asterisk (and the Server where Asterisk is installed) for call handling task. Thanks to Asterisk architecture (AGI, AMI, API, ARA).

Viewers, thanks once again for sending emails. But most of the emails are regarding why we should adopt database centric development. Let me elaborate further in this forum again:
There are basically two most common aproaches in the field of asterisk development.

  1. Asterisk-LAMP (MySQL, Perl, PHP, Python, Ruby on Linux) Approach. But the main issue with this approach is that its very difficult to implement serious business logic in Perl, PHP, Python, Ruby as the languages are not suitable for middle tier software development. And at the same time business logic in MySQL procedures are yet to be time tested (since stored procedures are just introduced and are still unstable).

  2. Asterisk-Java Approach. Java has a very good middle tier software development support for Business Logic e.g. EJB. But the issue with this approach is that it has large learning curve and time consuming development effort besides it can not adopt quick changes in business logic since Object Oriented Designing and Development is long term strategical effort.

Besides the above two database centric approaches, the approach which I have adopted is very quick in adapting business logic changes since the business logic is implemented in Oracle PL/SQL. And the PL/SQL stored procedures are automatically called in order to implement Asterisk AGI, API, AMI, ARA. This framework is very quick to adopt business changes and provide enterpise level data security, performance and reliablility. Software integrating Asterisk with Oracle Database is written in C/C++ while using ASTXX, OCCI libraries. The IVR call flow tree is built into the the database tables including the automatic calling the user defined stored procedures at each of the IVR call flow tree step (or node or leave), thus speeding upt the entire IVR call flow development. Now the developer has to care about PL/SQL and business logic only, not the Asterisk AGI, API, AMI, ARA and the Asterisk Application programming. And the call routing decisions can be taken by the stored procedures based on the data stored in the database. It also helps in fast integrating multiple asterisk boxes thru single database implementation.The approach is very much suitable for CRM with complex business logic and with heavy inbound or outbound call trafifc.

Please read “Besides the above two database centric approaches,” as “Besides the above two appraoches,”.

Sorry for the mistake.

One interesting email was about mod_plsql, I must like to share my answer to it in the public forum:

mod_plsql is an apache module just like mod_perl, mod_php, mod_python, mod_ruby or mod_java. The main difference is that it is dependent on oracle database. Oracle PL/SQL stored procedured are executed from mod_plsql in order to create the web pages residing in the data base tables. The contents of the web pages can be created in run time. Besides this sessions, cookies etc all are handled in the database.

You may download the latest free open source mod_plsql and its documentation from the following URL:
downloaddatabase.com/databas … -plsql.htm


@Charu, can we do database centric Asterisk AGI, API software development in MySQL or MS SQL Server too? I mean to say that in order to implement business logic, can we call MySQL or MS SQL Server Stored Procedure in Asterisk AGI or API? If yes, please tell me how to implement it in Asterisk AGI and API.

You have to connect to database in your Asterisk AGI, API. Infact I have written program in C/C++ to connect in program (which also uses Asterisk AGI, API libraries) to MySQL, MS SQL Server databases. I used Astxx libraries to do Asterisk AGI, API programming and I used mysql-connector-c+±1.0.2-alpha library to connect to MySQL 5.1 and CTLib library available in FreeTDS drivers to connec to MS SQL Server 2005/2008. You may call any stored procedure directaly in Asterisk AGI, API program using the above mentioned libraries. I have tested the above mentioned approach and found it practical and very useful to do database centric development for Asterisk. But I think that Oracle OCI C/C++ libraries and Oracle PL/SQL Stored procedures are more verstile than that of the MySQL and MS SQL.

Thanks for your reply on MySQL, MS SQL-Asterisk intergation. I am a SAP ABAP/Java developer. I have to integrate Asterisk with SAP Business Processes, Isn’t it better to use VoiceXML plugin for Asterisk to integrate it with SAP than using database stored procedures for it.

Yes, It depends, If you are ready to pay for Genesys (the Voice XML Gateway) and the VoiceObjects (third party software for SAP Netweaver in order to connect VoiceXML with SAP Business Intelegence-BI, SAP Portal), then you may use VoiceXML. Since you are providing mission applications, you also have to use any reliable commercial Asterisk VoiceXML plugin to connect to SAP. I can tell you out of my experience that in your case the database centric approach can be more cheap and reliable. Since you can always connect SAP Netweaver XI/PI thru using SAP Java Connector by implementing it in Oracle Java Stored Procedures. And if you are still using old SAP R/3 you can connect SAP RFC thru Oracle External Stored Procedures. Infact you dont have any cheap and reliable choice to use Voice XML with SAP R/3. But I have implemented and tested that Oracle Database Centric Stored Procedure approach works well with Asterisk integration with SAP Netweaver XI/PI or SAP R/3. This is one another reason one should use Asterisk PBX (instead of Avaya, Siemens, Alcatel Lucent, Samsung like propietary PBXs, Genesys Gateways etc) with SAP like ERPs and CRMs.

Yes, I agree with you that we have to pay hefty amount for Genesys, VoiceObjects if we dont implement Asterisk besides paying hefty amount for proprietary PBX. But I have one question in mind, can we do multi-asterisk box installation with a single command control and single instance of business logic implementation?

You can do multi-asterisk box asterisk implementaion using Data Centric Asterisk Development Approach. The business logic, IVR Call Flow, configurations (SIP.conf, User.conf, meetme.conf etc) all resides into the database. Even API events( according to the requirements) all logged into the database. The decision regarding call routing or transfer are implemented in stored procedures. The same data is accessed by the AGI program to be implemented in extensions.conf in multiple asterisk boxes as AGI program implemented in all the boxes is connected to the same database. Hence single instance of business logic is available to all the boxes.
The database centric approach actually saves money by using standard cheap hardware for all the asterisk boxes as no business logic computing is done on asterisk boxes. The burden of business logic and decision making computing shifts to database. Only the database server computer needs to be porweful. In this way you can do thousands of port of asterisk implementaion on multiple asterisk boxes which are interconnected (in case of AGI business logic, API event handling, AMI commands and ARA configuration) by means of single database server. You need not to change AGI business logic, API event handling, AMI commands and ARA configuration for every asterisk box too.

How easy it is to develop, implement and maintain stored procedures for Asterisk AGI, API,AMI,ARA as compared to developing, implementing and maintaining samething in PHP,Perl,Python,Ruby or Java?

I am not eliminating PHP,Perl,Ruby,Python or Java, what I am talking about is to write business logic in the stored procedures, though Asterisk AGI,API,AMI can still be done in PHP,Perl,Ruby,Python or Java. Database centric approach is way of soft coding the Asterisk development and offloading the asterisk boxes from business logic processing. I have done Asterisk AGI,API,AMI,ARA programming in C/C++, but any one is free to do it his/her language of choice. And database connectivity to all the databases is available in all the above mentioned languages so from any language anyone can call stored procedures.

My company has some Synway SHT series hardware and my boss wanted to install them on asterisk. Synway guys claim that their hardware is Asterisk compatible, but I could not find any help on the internet, will you please suggest how to install the above hardware.

Umedh, first of all I recommend Digium hardware for use with Asterisk. Though I have tried the Synway hardware, but I have left the company where I installed the Synway hardware. But if you really want, please visit the following URL to get more information on how to install Synway SHT series hardware with Asterisk, you will also come to know about the reality of Synway hardware Asterisk compatibility issues:

synway.net/feedback.asp?info … 05&n_id=68

I want to go for Asterisk with Oracle since we are using Oracle Database in our organization. My company dont want to invest in ERP/CRM type of big ticket products. We want separate customer support center but with our own web based enterprise class CRM software integrated with Asterisk. Any suggestions?