Page 1 of 1

Pass Full Status Name in Dispo Call URL

PostPosted: Tue Jan 12, 2010 10:42 pm
by aouyar
A few months ago I was trying to find a way to sync the Call Disposition to an external in-house CRM in a client site. I did not want to add code just for a specific application and I was trying to figure out a solution that might permit sending information to any external app in a transparent manner. I ended up adding some code that called an external URL from the updateDISPO function in vdc_dbquery.php. Nothing that I was proud enough to share, because it was still a hack with destination URL hard coded in a PHP include file.

I was quite surprised to see that the same functionality was implemented in the last revisions of Vicidial 2.2 in SVN. Thanks a lot Matt, it is as if you were reading my mind. Now I can get rid of the code I had hacked into vdc_dbquery.php. The only missing piece is a small improvement for passing the Full Status Name in the Dispo Call URL. The ugly hack that I am using at the moment executes an additional query to get status_name and appends it to the URL.

I've already registered a future request in Mantis and I will be sending you the patch to add the missing functionality:
http://www.vicidial.org/VICIDIALmantis/view.php?id=285

Hope we can get it into 2.2; it is a quite trivial improvement, but I think it's useful.

Thanks for developing such a flexible solution...

PostPosted: Wed Jan 13, 2010 7:37 pm
by aouyar
While I was developing a patch for this feature I encountered two bugs:
* A minor typo bug that can affect integration with VtigerCRM:
http://www.vicidial.org/VICIDIALmantis/view.php?id=286
* A critical bug in Start Call URL and Dispo Call URL functions. When any of the values passed to the URLs contains a space character, the rest of the URL is truncated, the remaining parameters are not passed to the external application. The bug is documented in issue 287:
http://www.vicidial.org/VICIDIALmantis/view.php?id=287

I have uploaded a patch to issue 287. The patch contains fixes for the documented issues and adds the feature for passing the dispo_name to the Dispo Call URL.

I will be glad if you could review the patch and consider it for inclusion.

PostPosted: Wed Jan 13, 2010 8:19 pm
by mflorell
You win, it's been committed to SVN.

Your patches are much cleaner than they used to be, I only had to add a few small things before SVN inclusion.

This will be in the next 2.2.0 RC

PostPosted: Thu Jan 14, 2010 2:14 pm
by aouyar
I am glad you liked the patch. ;-)