That would be great this is what i want to do
This would be used for outgoing campaigns only.
I need to get the calldata(cdr) info from vicidial(the ${CDR(src)} must somehow be linked to Agent(name or Number) something like this:
date---src(agentinfo)--numberdialed--duration(billsec)
I will the create a table with the above fileds and add a available credit field
So every time the agent dials a number i need to check that he or she has sufficient credit to make the call.
If the agent does not have any credit (fail the outbound call and link to message "no funds available to make this call please contact your team leader"
In the long run i want to be able to work out the call costs per sale, and once this is done the door is open for more detailed reporting.
I see every call out links to starting deadagi
exten => _91011XXXXXXX,n,AGI(
agi://127.0.0.1:4577/call_log)
When the call is hanged up used the deadagi and an h extension as follows
exten => h,1,DeadAGI(
agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
What does this AGI do linking to port 4577, is that not comport related.
i need to link to this agi and get the data i need to add it to the custom database
so when the call ends i need the date agent(name or number) destination(number) and the duration of the call.
I hope this makes sense,