Need help with the following Please

Discussions about new features or changes in existing features

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Need help with the following Please

Postby davidh » Mon Sep 06, 2010 5:59 pm

i want to create a reporting application with the following features

-- budget for outbound calls(here i want to add credit for a agent limiting him or her to just the amount specified for outbound calls)
--this will be adjustable per agent or per campaign
--if the callers or campaigns credit is finished(link to recording(contact admin or your teamleader)

Here is the problems i am facing:
--when the user logs on and makes a via the webgui, there is a agi script that links to context [default] in the extensions.conf file.
--it then calls another remote agi call_log
--the problem i am facing is i can only get the ${EXTEN}variabl for the exteral number to dial there is no reference to a variable within the dialplan(that i know of) that will give me info on the agent nor the campaign.

If i can get this i can link the call to a check to see if the user/campaign has credit to make the call.

If one can get the info above the door is open to more detailed reporting as to cost per agent, cost per campaign ect.

If anyone knows how i can get this to work, i would be forever in your debt, i am learning asterisk agi( but kinda hit a brick wall with pearl.

future modules would include setting up costing tables for your different trunks.

any help welcome



:?:
davidh
 
Posts: 26
Joined: Wed Jan 28, 2009 3:03 am

Postby mflorell » Mon Sep 06, 2010 7:56 pm

Moved to Features because this is not really a support issue.

I think we need to know more about what exactly your goals are:

- Will the costs be per lead or per call?
- Will the costs change per lead, per agent, per campaign, per trunk?
- I have never heard of an account system like this, can you explain the business model for this?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby davidh » Wed Sep 08, 2010 3:04 pm

I was wondering if someone can help me with the following

I want to build a Application report on call_info.

Here is what i think I know(correct me if i am wrong please)
1:When a agent logs in he/she received a call on softphone, if all is well agent logs on and can start dialing(working like a charm).
2:Note the campaign is set to manual dial.
3:the link between vicidial agent(web client/softphone) and the asterisk is done by using the meetme application from asterisk in conjunction with some agi(perl)?/still TRYING figuring out the layout.
4:When the agent hits the dial next lead the customer number is passed to the
default context.
5.Asterisk then routes the call to a agi(call_log), then if it finds the number in the context it goes ahead and diales the number.
6.When the agent ends the call it is send to the hangup(h) extension in asterisk, in turn a FastAGI_call_log gets executed.

This is what i basically want to do:

1:When the call gets to the asterisk dial plan i want to try and get more info from the agisending the call to the dialplan, currently i am only getting the number of the customer to dial.
2:The most importend data that i would require is the agent(name/number) the extension of the phone user is using.
3.I would use the agent info to link to a database table say called call_credit. Meaning if a call comes from vicidial and i can read the variable(agent name) I can link to my custom db table and see if he has credit available to make this call, if his credit is almost up warn him before continueing with the call.
4.If i can get this information i can also link it to our call management system.

The reason i want to set a credit on some agent is that we are renting out space in our callcentre to exernal companies, saves me the time of logging all their calls and exelling untill i am blue.

Please let me know if it is possible to pass more call data to the asterisk dialplan just before making the call.

Summary of details that will help:
--calldate(not that important)
--agentinfo(name or number)
--campaign(name)
--number to dial(allready passing this info)-working
--billsec

Any help pointers would be great

by the way thx for a briliant app.
davidh
 
Posts: 26
Joined: Wed Jan 28, 2009 3:03 am

Postby williamconley » Wed Sep 08, 2010 6:42 pm

1) there is a billing system in VICIdial already

2) you ALSO get the CallerID NAME which is what VICIdial uses to track the call, this can be tracked through the LIVE call tables to get pretty much anything you want to know about the call (which is what vicidial uses the field for). The reason they use the CallerID NAME is because that field is uniformly ignored by all providers (there are some exceptions to prove that it's a rule, but they are few and far between).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mflorell » Wed Sep 08, 2010 6:46 pm

There is a billing system in ViciDial?

I don't remember saying this. You should be able to account for time, but we don't have anything close to a billing system. In fact when we build vicidial hosting(vicihost.net) we built a separate billing system that does not interact with Asterisk or ViciDial directly at all.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby williamconley » Wed Sep 08, 2010 7:11 pm

strange, i remember you saying there was one ... let me look that up!!

ok, not "billing" but keeping track of minutes and disallowing based on used up account?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mflorell » Wed Sep 08, 2010 8:07 pm

Nope, nothing like that in ViciDial. That's what we built for vicihost, but it's a constantly evolving internal distributed system that is not really suited to an open source project.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby williamconley » Wed Sep 08, 2010 8:11 pm

now i regret not looking into it immediately (but when i have no paying client ...). probably just read it wrong. sorry to mis-speak. :(
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Ok i found a work around to getting the agent name

Postby davidh » Sat Sep 11, 2010 8:21 pm

I just started learning php and mysql, so the perl is greek to me. Here is how i got the agent info to the asterisk dialplan before making the call.

I picked up that every call gets passed to the manager and uses the vicidial_list table to log info regarding the call and the status thereoff.

For testing i loaded the asterisk-addons to get the asteriks MYSQL app going.

Now before every call in asterisk i do a mysql query, to get the agents information, i then in turn use this to cross reference a custom database to see if the agent has call_credit available to make the call.

This i think will be a nice feature to add, you can then limit the call_credit per agent or per campaign.

I know this is not pretty but it's a start.

Here goes I added this to my asterisk dialplan


exten => _91011XXXXXXX,1,MYSQL(Connect connid localhost usertest userpass asterisk) ;connect to database
exten => _91011XXXXXXX,2,MYSQL(Query resultid ${connid} SELECT\ 'user'\ FROM\ 'vicidial_list'\ WHERE\ 'phone_number'=\'${EXTEN:2}\'\ AND\ 'status'=\'INCALL\')
exten => _91011XXXXXXX,3,MYSQL(Fetch fetchid ${resultid} agentinfo)
exten => _91011XXXXXXX,4,NoOp(THE AGENT NAME IS *****${agentinfo}******)
exten => _91011XXXXXXX,5,MYSQL(Clear ${resultid})
exten => _91011XXXXXXX,6,MYSQL(Disconnect ${connid})
exten => _91011XXXXXXX,7,NoOp(CALLEDID ====******************${CALLERID(all)})
exten => _91011XXXXXXX,8,AGI(agi://127.0.0.1:4577/call_log)
exten => _91011XXXXXXX,9,Dial(SIP/cc101,55,To) ;testing to extension cc101
exten => _91011XXXXXXX,10,Hangup :)

I tested it with manual dial and autodial works like a charm
davidh
 
Posts: 26
Joined: Wed Jan 28, 2009 3:03 am

here is the output of the asterisk cli

Postby davidh » Sat Sep 11, 2010 8:32 pm

:D ASTERISK OUTPUT

Manager 'sendcron' logged on from 127.0.0.1
-- Executing MeetMe("Local/8600051@default-b754,2", "8600051|F") in new stack
> Channel Local/8600051@default-b754,1 was answered.
-- Executing MYSQL("Local/8600051@default-b754,1", "Connect connid XXX.XXX.XXX.XXX dave davepass asterisk") in new stack
-- Executing MYSQL("Local/8600051@default-b754,1", "Query resultid 1 SELECT user FROM vicidial_list WHERE phone_number='0716628000' AND status='INCALL'") in new stack
-- Executing MYSQL("Local/8600051@default-b754,1", "Fetch fetchid 2 agentinfo") in new stack
-- Executing NoOp("Local/8600051@default-b754,1", "THE AGENT NAME IS *****agent1001******") in new stack
-- Executing MYSQL("Local/8600051@default-b754,1", "Clear 2") in new stack
-- Executing MYSQL("Local/8600051@default-b754,1", "Disconnect 1") in new stack
-- Executing NoOp("Local/8600051@default-b754,1", "CALLEDID ====******************"M0912032843000000021" <0000000000>") in new stack
-- Executing AGI("Local/8600051@default-b754,1", "agi://127.0.0.1:4577/call_log") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing Dial("Local/8600051@default-b754,1", "SIP/cc101|55|To") in new stack
-- Called cc101

:D
davidh
 
Posts: 26
Joined: Wed Jan 28, 2009 3:03 am


Return to Features

Who is online

Users browsing this forum: No registered users and 37 guests