Well After tempnut2 was put in to live there were about 5 conferences being used so far...
sigh............
This week was very interesting as I got a bug to fix in our email to fax system and also with the conference server.
The one with conference server was straight forward and I knew about that before hand , But didn't get a time to fix it once and for all. It just a poor DTMF handling logic though
First I worked on the bug with the email to fax system where we allow people to send attachments in many formats like txt,html,rtf,png,jpg,bmp,pdf,tiff,doc,docx,ppt,xls
withing an email and send it out as a fax to the destination. All these formats were converted to pdf at processing before sending it out to fax server.
Problem was with txt and rtf formats where they were not actually tested before with the system.
When I started to investigate the problem with .rtf attachments after spending two three hours on a php script which is doing the email decoding and dispatch the attachment to the fax server What I realize was that any raw data of an attachment is pass through a php base64_decode() function which was causing .rtf files being corrupted.
The real problem was that it assumed that any attachment of an email is subjected to MIME encoding when email send to a server where as .rtf/.txt does not.
So the actual problem was that the .rtf files are not subject to any encoding as it send as plain text format in an email attachment.
.rtf documents have an html style syntax where everything in .rtf enclose within a {}.
So It just a matter of by passing the bas64_decode() function only for .rtf files....
ooooopzzzzzzzzzz... also for .txt files as well.
So All I have done for patch this is the below simple logic in email decoding script.
if($attachment== "rtf"){
$attachment = stripslashes($attachment); # get rid of \\
# some other string substitutions for specific email clients like outlook
}
else if($attachment== "rtf"){
$attachment= $attachment
}
else{
$attachment = base64_decode($attachment);
}
And here we go........ I applied the patch to production yesterday and all went good :)
Hmmm ......................................
about the problem with the conference server was that I have used wait_for_digit AGI function to capture the dtmf inputs on conference authentication in AGI script.
I used the stream_file function to play relevant voice prompts, problem was that If user start to input stuff while announcement is in progress I miss the first digit that user press
It's like below,
$agi->stream_file("enter-confroom");
$room = get_hash_terminate_input($agi);
So to fix it, I used the below solution which worked on fly :)
$intkey = $agi->stream_file("enter-confroom","0123456789"); # any digit will interrupt the voiceprompt [0-9]
$key = get_interrupt_key($intkey);
$room = get_hash_terminate_input($agi,$key);
get_interrupt_key($intkey) function handles the interrupt key well, as even if the user press a key or he just wait till voice prompts over doesn't matter :)
Hmmmm thats all about bug fixing............................ :D
I'm gonna stop for today........................................
Saturday, September 25, 2010
Tuesday, September 14, 2010
Its' show time :)
Hmmm,
After spending on few busy weeks finally my latest project was put on live on tempnut2.
This is about voip teleconferencing.
Just like other projects , All I got for this project from my manager was,
"pasan , our current conference server is just a junk. we don't make any money out of it, make a new conference server which is more better".
So As the first task What I have done was quickly went through the current server. There were many problems with the system and used really bad programing techniques to address the requirements.
After first 3 days , I have completely sort out what need to be done and started to design a new architecture for a conference server.
I have used the below technologies to finally make it a finishing product at the end,
asterisk
php/mysql
proftpd
Mainly the conference server back-end engine was written using asterisk dial-plan , MeetMe application and php AGI scripts.
The tricky part for providing administrator menu was done by use of feature map facility in asterisk.
/etc/asterisk/features.conf
This allowed me to provide users (administrator) a menu driven system fire by specifed DTMF sequence.
On the first attempt , I tried to use MEETME_AGI_BACKGROUND and didn't work for me as I got sip channels for incoming calls which were cause no audio when we run a AGI script in background for MeetMe application.
So I come up with the feature map facility in asterisk to provide admin menu while in a conference.
After about 2 weeks time I have completed the conference engine, and thereafter it took about 2 and 1/2 months to put it to a production server as the it had many dependencies from various ppl.
all configuration related to conferencing is fully database driven and used odbc to integrate with asterisk via /etc/asterisk/extconfig.conf
specially our sysadmin manager is very strict on security aspects of the servers.
So I have to spend much time when setting up a ftp server for downloading conference recordings with proftpd.
Finally able to setup a secure server with the guidance from sysadmins.
Yesterday We put the server live and waiting for receiving new orders from customers :)
Many people have helped me on making this project a success.
I would like to thank all of them for their support.
specially web front-end applications for ordering and managing teleconferencing were done my other 2 php guys.
So that credit goes to them.
As I thought in the first It was not at all difficult to setup a stable interactive teleconference server using asterisk
So finally thanks Mark :) and *
After spending on few busy weeks finally my latest project was put on live on tempnut2.
This is about voip teleconferencing.
Just like other projects , All I got for this project from my manager was,
"pasan , our current conference server is just a junk. we don't make any money out of it, make a new conference server which is more better".
So As the first task What I have done was quickly went through the current server. There were many problems with the system and used really bad programing techniques to address the requirements.
After first 3 days , I have completely sort out what need to be done and started to design a new architecture for a conference server.
I have used the below technologies to finally make it a finishing product at the end,
asterisk
php/mysql
proftpd
Mainly the conference server back-end engine was written using asterisk dial-plan , MeetMe application and php AGI scripts.
The tricky part for providing administrator menu was done by use of feature map facility in asterisk.
/etc/asterisk/features.conf
This allowed me to provide users (administrator) a menu driven system fire by specifed DTMF sequence.
On the first attempt , I tried to use MEETME_AGI_BACKGROUND and didn't work for me as I got sip channels for incoming calls which were cause no audio when we run a AGI script in background for MeetMe application.
So I come up with the feature map facility in asterisk to provide admin menu while in a conference.
After about 2 weeks time I have completed the conference engine, and thereafter it took about 2 and 1/2 months to put it to a production server as the it had many dependencies from various ppl.
all configuration related to conferencing is fully database driven and used odbc to integrate with asterisk via /etc/asterisk/extconfig.conf
specially our sysadmin manager is very strict on security aspects of the servers.
So I have to spend much time when setting up a ftp server for downloading conference recordings with proftpd.
Finally able to setup a secure server with the guidance from sysadmins.
Yesterday We put the server live and waiting for receiving new orders from customers :)
Many people have helped me on making this project a success.
I would like to thank all of them for their support.
specially web front-end applications for ordering and managing teleconferencing were done my other 2 php guys.
So that credit goes to them.
As I thought in the first It was not at all difficult to setup a stable interactive teleconference server using asterisk
So finally thanks Mark :) and *
Subscribe to:
Posts (Atom)
