Page 1 of 1

New Method in Agent API - external_dial_lead

PostPosted: Tue Oct 13, 2009 2:38 am
by aouyar
Working at a client site I had to implement a New Agent API Method for integrating with the Custom CRM Application of the Client.The client needed Click2Dial functionality from the CRM Application.

The actual implementation of the external_dial method of Agent API permits searching of previously inserted leads and the add_lead method of Admin API permits adding leads for dialing.

Click2Dial can be implemented as follows using the existing API Methods:
- add_lead
- external_pausa
- external_dial

The only impediment is that the add_lead method requires the list_id and this piece of information is not readily available to external applications. (It seems more sensible to me to avoid giving direct access to vicidial tables from external applications, in an ideal world all accesses should be through controlled API calls.)

I have merged the add_lead an external_dial methods to implement an external_dial_lead method. The new method simply accepts lead information additional to the agent information passed to external_dial. The external_dial_lead method checks the Manual Dial List of the actual campaign of the agent_user and adds the lead to this list before placing the call, therefore it does not require that the external application pass the list_id.

The original code had quite deep nested if-then-else statements so I had to reorganise the code a bit to be able to get hold of the code. I could post the code to Mantis if anyone considers this approach of value.

PostPosted: Wed Oct 14, 2009 9:06 pm
by mflorell
Wow, you have been busy :)

Please do post the code and I will take a look at it next week.

PostPosted: Wed Oct 14, 2009 11:39 pm
by aouyar
Hi Matt,

Check issue #241 for the modified api.php file. I will be looking forward to feedback y suggestions next week.

Bye

PostPosted: Sat Oct 31, 2009 12:09 am
by williamconley
Brilliant. I like this guy.

PostPosted: Mon Nov 02, 2009 4:54 pm
by aouyar
Did you try the code? Are you using it? Any feedback?

PostPosted: Mon Nov 02, 2009 6:52 pm
by mflorell
No chance yet, trying to finish two large client projects

PostPosted: Mon Nov 02, 2009 11:26 pm
by aouyar
I was actually asking for the opinion of williamconley, because of his previous comment. ;-)

PostPosted: Mon Nov 02, 2009 11:57 pm
by williamconley
not as yet, i had skipped using that portion of the api for a customer because that piece of the code was missing (or rather that "function"). now that you've added it i will be revisiting that shortly and verifying it and reworking the "workaround" quickie we installed to use that method instead. and if that makes it into the base code, it won't need to be "fixed" on the next version upgrade, it'll just keep workin.

i was just absolutely thrilled that a new producer was in the mix. the more contributors (especially new ones!) the better the project gets.

PostPosted: Tue Nov 03, 2009 1:37 am
by aouyar
Not a real producer yet; just trying to help out with some bits and pieces. ;-) The code for internationalization of the agent interface is my most serious try for a contribution at the moment.

I am trying to sort out an issue in Manual Dial at the moment. Could you have a look at the issue #248 in Mantis to see if you could give me a clue?

TIA

PostPosted: Tue Nov 03, 2009 3:29 am
by williamconley
Do not sell that accomplishment short. Little nitpicky cr@p like that is great to dive in for.

I'd love to look, but I have just finished my 19 hour workday ... (and you didn't post a link! LOL I'm not sure I can navigate that far with this energy level!)

PostPosted: Tue Nov 03, 2009 2:40 pm
by aouyar
Hi,

Here is the link in case you have some time in your next work day:
http://www.vicidial.org/VICIDIALmantis/view.php?id=248

You can also check the following for two previous bug fix attemps (patches included):
http://www.vicidial.org/VICIDIALmantis/view.php?id=227
http://www.vicidial.org/VICIDIALmantis/view.php?id=237

I already have a fix for issues 227 and 237, but but it is with issue 248 that I am seriously in need of guidance.

Bye

PostPosted: Thu Nov 05, 2009 10:14 am
by williamconley
for that you should post a whole new thread. including your entire setup of course ...

PostPosted: Sat Nov 07, 2009 7:50 am
by aouyar
Minor Bugs in AGENTDIRECT Queues and Call Menus in Trunk
http://www.vicidial.org/VICIDIALforum/v ... php?t=9291

Dead calls not detected on Manual Dial and Fast Dial
http://www.vicidial.org/VICIDIALforum/v ... php?t=9441

Returning to the original topic, if anyone is using the the api method external_dial lead, just let me know about it. ;-)