Page 1 of 1

autodial transfer agis not working

PostPosted: Wed Dec 03, 2008 10:57 am
by pedrograna
Im tryng to enable de auto dial in VERSION: 2.0.5-143 running in asterisk 1.4.22.
In manual mode its all working ok.
But when i switch to auto dial in ratio 1 the calls never reachs an agent hangups after de agi-VDAD_ALL_outbound.agi

Where I can find data about whats going on with the agi?

The autodial configuration its:

Dial Method: ratio HELP
Auto Dial Level: 1 (0 = off) ADAPT OVERRIDE
Available Only Tally: N
Drop Percentage Limit: 3 %
Maximum Adapt Dial Level: 3.0 number only
Latest Server Time: 2100 4 digits only
Adapt Intensity Modifier: 0
Dial Level Difference Target: 1
Concurrent Transfers: auto
Queue Priority: 50

My extensions.conf:

;Outbound dialing

exten = _6XXXXXX.,1,AGI(agi://127.0.0.1:4577/call_log)
exten = _6XXXXXX.,n,Dial(SIP/NameRemoved/${EXTEN},180,oTt)
exten = _6XXXXXX.,n,Hangup

;Transfer agi..

exten => 8378,1,AGI(agi://127.0.0.1:4577/call_log)
exten => 8378,2,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,5,Hangup

Asterisk CLI output

-- SIP/NameRemoved-081f9390 answered Local/NumRemoved@default-e9b9,2
> Channel Local/NumRemoved@default-e9b9,1 was answered.
-- Executing [8378@default:1] AGI("Local/917864729111@default-e9b9,1", "agi://127.0.0.1:4577/call_log") in new stack
== Manager 'sendcron' logged off from 127.0.0.1
-- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
-- Executing [8378@default:2] AGI("Local/NumRemoved@default-e9b9,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:3] AGI("Local/NumRemoved@default-e9b9,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:4] AGI("Local/NumRemoved@default-e9b9,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:5] Hangup("Local/NumRemoved@default-e9b9,1", "") in new stack
== Spawn extension (default, 8378, 5) exited non-zero on 'Local/NumRemoved@default-e9b9,1'
-- Executing [h@default:1] DeadAGI("Local/NumRemoved@default-e9b9,1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------)") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ----------) completed, returning 0
== Spawn extension (default, NumRemoved, 2) exited non-zero on 'Local/NumRemoved@default-e9b9,2'

PostPosted: Thu Dec 04, 2008 1:54 am
by williamconley
i have a temporary workaround for this (improved from my prior version) but it's not recommended. only for "emergencies" (like losing your job or a lot of money if your dialer doesn't work in the morning, that sort of thing).

just in case you don't get your issue resolved.

PostPosted: Thu Dec 04, 2008 7:53 am
by mflorell
Try adding sip-silence Playback as shown in the example extensions.conf.

If you are using a recent SVN trunk checkout then this is default for the example extensions.conf entries.

PostPosted: Thu Dec 04, 2008 9:42 am
by pedrograna
Sip silence added but still not working.
Theres anywere else were i can find a clue?


Extensions


exten => 8378,1,Playback(sip-silence)
exten => 8378,2,AGI(agi://127.0.0.1:4577/call_log)
exten => 8378,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,5,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,6,Hangup


CLI Output

- SIP/NameRemoved-08289c70 answered Local/NumRemoved@default-de2e,2
> Channel Local/NumRemoved@default-de2e,1 was answered.
-- Executing [8378@default:1] Playback("Local/NumRemoved@default-de2e,1", "sip-silence") in new stack
== Manager 'sendcron' logged off from 127.0.0.1
-- <Local/NumRemoved@default-de2e,1> Playing 'sip-silence' (language 'en')
-- Executing [8378@default:2] AGI("Local/NumRemoved@default-de2e,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 [8378@default:3] AGI("Local/NumRemoved@default-de2e,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:4] AGI("Local/NumRemoved@default-de2e,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
== Manager 'sendcron' logged off from 127.0.0.1
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:5] AGI("Local/NumRemoved@default-de2e,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0
-- Executing [8378@default:6] Hangup("Local/NumRemoved@default-de2e,1", "") in new stack
== Spawn extension (default, 8378, 6) exited non-zero on 'Local/NumRemoved@default-de2e,1'
-- Executing [h@default:1] DeadAGI("Local/NumRemoved@default-de2e,1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16---------------)") in new stack
-- AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... EBUG-----1

PostPosted: Fri Dec 05, 2008 1:23 pm
by pedrograna
Any coments on this?
Could anyone tell me what log i have to look at.

PostPosted: Fri Dec 05, 2008 1:40 pm
by pedrograna
Searching in the log agiout.date i find this line:

2008-12-03 13:29:36|agi-VDAD_ALL_outbound.agi|NNNNNNNNNN No agent record found!!!

But i have one agent logged in how can i fix that?

PostPosted: Fri Dec 05, 2008 2:30 pm
by pedrograna
Im now tring with agi-VDADtransfer.agi
and agiout exits with
+++++ VDAD START DIALPLAN DUPLICATE: EXITING- 4

agi output

2008-12-05 17:27:24|agi-VDADtransfer.agi| -- priority = 4stguiclient/agiout.2008-
2008-12-05 17:27:24|agi-VDADtransfer.agi| -- rdnis = unknown
2008-12-05 17:27:24|agi-VDADtransfer.agi| -- request = agi-VDADtransfer.agi
2008-12-05 17:27:24|agi-VDADtransfer.agi| -- type = Local
2008-12-05 17:27:24|agi-VDADtransfer.agi| -- uniqueid = 1228505235.25256
2008-12-05 17:27:24|agi-VDADtransfer.agi|AGI Variables: |1228505235.25256|Local/917864729584@default-2f84,1|8365|Local|V1205172715000109627|V1205172715000109627|4|
2008-12-05 17:27:24|agi-VDADtransfer.agi|+++++ VDAD START : |109627|2008-12-05 17:27:24|1.4.22|4|
2008-12-05 17:27:24|agi-VDADtransfer.agi||SELECT count(*) FROM vicidial_live_agents where callerid='V1205172715000109627';|
2008-12-05 17:27:24|agi-VDADtransfer.agi||SELECT count(*) FROM vicidial_auto_calls where callerid='V1205172715000109627' and status IN('LIVE','XFER');|
2008-12-05 17:27:24|agi-VDADtransfer.agi|+++++ VDAD START DIALPLAN DUPLICATE: EXITING- 4

PostPosted: Mon Dec 08, 2008 12:59 pm
by mflorell
agi-VDADtransfer.agi will not work with 2.0.5

you need to post more agiout logfile output.

PostPosted: Mon Dec 08, 2008 1:20 pm
by pedrograna
Thanks a lot for the reply..

Using agi-VDAD_ALL_outbound

exten => 8378,1,Playback(sip-silence)
exten => 8378,2,AGI(agi://127.0.0.1:4577/call_log)
exten => 8378,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,5,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
exten => 8378,6,Hangup


This is the agiout log:


2008-12-08 16:15:06|agi-VDAD_ALL_outbound.agi|+++++ VDAD START : |109641|2008-12-08 16:15:06|1.4.22|3|
2008-12-08 16:15:06|agi-VDAD_ALL_outbound.agi|+++++ VDAD START LOCAL CHANNEL: EXITING- 3
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|Perl Environment Dump:
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|0|NORMAL-----LB
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|callerID changed: V1208161419000109641
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|AGI Environment Dump:
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- accountcode =
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- callerid = unknown
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- calleridname = V1208161419000109641
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- callingani2 = 0
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- callingpres = 0
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- callingtns = 0
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- callington = 0
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- channel = Local/917864729584@default-0921,1
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- context = default
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- dnid = unknown
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- enhanced = 0.0
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- extension = 8378
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- language = en
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- priority = 4
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- rdnis = unknown
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- request = agi-VDAD_ALL_outbound.agi
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- type = Local
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi| -- uniqueid = 1228760059.34227
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|AGI Variables: |1228760059.34227|Local/917864729584@default-0921,1|8378|Local|V1208161419000109641|V1208161419000109641|4|
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|+++++ VDAD START : |109641|2008-12-08 16:15:07|1.4.22|4|
2008-12-08 16:15:07|agi-VDAD_ALL_outbound.agi|+++++ VDAD START LOCAL CHANNEL: EXITING- 4
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|Perl Environment Dump:
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|0|NORMAL-----LB
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|callerID changed: V1208161419000109641
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|AGI Environment Dump:
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- accountcode =
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- callerid = unknown
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- calleridname = V1208161419000109641
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- callingani2 = 0
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- callingpres = 0
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- callingtns = 0
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- callington = 0
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- channel = Local/917864729584@default-0921,1
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- context = default
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- dnid = unknown
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- enhanced = 0.0
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- extension = 8378
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- language = en
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- priority = 5
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- rdnis = unknown
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- request = agi-VDAD_ALL_outbound.agi
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- type = Local
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi| -- uniqueid = 1228760059.34227
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|AGI Variables: |1228760059.34227|Local/917864729584@default-0921,1|8378|Local|V1208161419000109641|V1208161419000109641|5|
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|+++++ VDAD START : |109641|2008-12-08 16:15:08|1.4.22|5|
2008-12-08 16:15:08|agi-VDAD_ALL_outbound.agi|+++++ VDAD START LOCAL CHANNEL: EXITING- 5

Mysql query to vicidial_live_agents

"live_agent_id","user","server_ip","conf_exten","extension","status","lead_id","campaign_id","uniqueid","callerid","channel","random_id","last_call_time","last_update_time","last_call_finish","closer_campaigns","call_server_ip","user_level","comments","campaign_weight","calls_today","external_hangup","external_status"
2270,"1239","192.168.1.17","8600051","SIP/404","INCALL",223495,"2001","0","M1208160950000223495","",15158716,"2008-12-08 16:09:50","2008-12-08 16:10:04","2008-12-08 16:09:46","","",1,"MANUAL",0,47,"0",""
2271,"1111","192.168.1.17","8600052","SIP/415","READY",0,"9009","0","","",18294522,"2008-12-08 16:04:50","2008-12-08 16:10:04","2008-12-08 16:04:50","","",4,"",0,0,"",""

PostPosted: Mon Dec 08, 2008 10:40 pm
by williamconley
> Channel Local/NumRemoved@default-de2e,1 was answered.
-- Executing [8378@default:1] Playback("Local/NumRemoved@default-de2e,1", "sip-silence") in new stack
== Manager 'sendcron' logged off from 127.0.0.1
-- <Local/NumRemoved@default-de2e,1> Playing 'sip-silence' (language 'en')
-- Executing [8378@default:2] AGI("Local/NumRemoved@default-de2e,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 [8378@default:3] AGI("Local/NumRemoved@default-de2e,1", "agi-VDAD_ALL_outbound.agi|NORMAL-----LB") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_outbound.agi
-- AGI Script agi-VDAD_ALL_outbound.agi completed, returning 0


If you are still experiencing the "answered" but not transferred to agent because it is listed as "local" ... we have tested our "fix" and it seems to be working well.

We haven't run it on a room with serious traffic yet, but it does allow the call to connect, then hang up with the appropriate hangup buttons and changes the appropriate fields so that Vicidial knows who is in the room with the agent and does not decide your client has hung up.

Those were the issues we have found and we have resolved them all. If all else fails, it is a work-around, but it is a Working workaround.

PostPosted: Tue Dec 09, 2008 12:49 am
by mflorell
I would recommend downgrading to Asterisk 1.4.21.2 as we have seen issues with 1.4.22 in production that do not exist in 1.4.21.2.

Also, It is clear that you are not using "exten = _6XXXXXX.,n,Dial(SIP/NameRemoved/${EXTEN},180,oTt)" to dial out since the numbers you are calling do not fit that, what is the real dialplan entry for dialing out?

Are you registering your SIP trunk?

PostPosted: Tue Dec 09, 2008 9:57 am
by pedrograna
In this case im using another trunk
No, i dont register the proxy its another server that its conected to internet and the providers authenticate with mi IP without using registers.

I use the same schema with other vicidial servers and i have no problems.

This server uses this.

exten = _6XXXXXX.,n,Dial(SIP/astout2/${EXTEN},180,oTt)
exten = _9XXXXXX.,n,Dial(SIP/astout2/${EXTEN},180,oTt)

In astout 2 i have this.

exten = _9X.,1,Set(CDR(accountcode)=std)
exten = _9X.,n,Dial(SIP/${EXTEN:1}@sip1,60,CTto)
exten = _9X.,n,Hangup()

exten = _6x.,1,Set(CDR(accountcode)=ha1)
exten = _6X.,n,Set(CALLERID(num)=Number)
exten = _6X.,n,Dial(SIP/${EXTEN:2}@sip2,60,CTto)
exten = _6X.,n,Hangup()

Well im going to downgrade asterisk version and see whats happen.

Thanks for your reply

PostPosted: Tue Dec 09, 2008 10:09 am
by pedrograna
williamconley: I have seen a perl if control statment that ask for the asterisk version and channel type in other vicidial agis.

And if the channel its local and asterisk it version "something" exits the script logging a message to agiout log file.

Your workarround have something to do with that?

Thanks for looking at mi issue.

PostPosted: Tue Dec 09, 2008 6:28 pm
by mflorell
I have heard from a couple of companies that had this issue, but we have never been able to reproduce this on a new install or in our testing lab so it's very difficult to tell you how to fix it.

PostPosted: Tue Dec 09, 2008 11:52 pm
by williamconley
pedrograna wrote:williamconley: I have seen a perl if control statment that ask for the asterisk version and channel type in other vicidial agis.

And if the channel its local and asterisk it version "something" exits the script logging a message to agiout log file.

Your workarround have something to do with that?


yes, it has to do with that. we have been able to isolate all the issues that seem to cause a problem by commenting out the "if local exit" statement. if you would like to help us continue to test this fix, i'd be happy to share it with you.

but as matt pointed out (clearly) it is a workaround that must be used very carefully. we are presently testing it on a live system without any known issues arising, but it is not a high-volume system so I would have to warn you that it is for testing only, use in production at your own risk.

if you agree to that, we are happy to post it for you.

PostPosted: Wed Dec 10, 2008 9:25 am
by pedrograna
Well I can give this I try.. could you post me the modified agi code in a reply?
Thanks

PostPosted: Thu Dec 11, 2008 9:17 am
by Epod
i had the same trouble as u the temp fix posted here will sort it for u auto dialing fine now for over 2 weeks atm :lol:
http://www.eflo.net/VICIDIALforum/viewt ... highlight=

PostPosted: Tue Dec 23, 2008 11:28 am
by pedrograna
The only way that i find to fix this issue was commenting out the exit in the local channel test.

if ( ($channel =~ /Local/i) && ($AST_ver !~ /^1\.0\.8|^1\.0\.9/) )
{
if ($AGILOG) {$agi_string = "+++++ VDAD START LOCAL CHANNEL: EXITING- $priority"; &agi_output;}
if ($priority > 2) {sleep(1);}
#exit;
}

I have dowgraded the asterisk version to 1.4.21.2 as Matt suggest but still not working.

Its this a bug?
What other things could break this workarround?
Could be usefull that i post more information about this?

Thanks in advance for your reply

PostPosted: Wed Dec 24, 2008 7:47 am
by mflorell
This is usually a configuration problem, but at the heart of it it is an Asterisk bug. The problem is that the proper channel pointer(SIP/IAX/Zap) does not resolve properly leaving the channel as a Local channel. This potentially can cause all sorts of issues depending on what you are doing with VICIDIAL and how your campaign is configured.

We have been able to fix most systems that has had this problem, usually there are issues with the install or the configuration. The couple that we had not been able to fix we did a full reinstall and the problem went away.

PostPosted: Fri Jan 09, 2009 12:48 pm
by pedrograna
I found something here

If i refer to the trunk with a variable declared in [globals]
like TRUNK1=SIP/server
and then Dial({TRUNK1}/{EXTEN}
The agi (agi-VDAD_ALL_outbound.agi) exits in the local dump statement.

But if I refer to the trunk using Dial(SIP/server/{EXTEN}) the script works ok.

PostPosted: Fri Jan 09, 2009 12:54 pm
by mflorell
Interesting information, what version of Asterisk is this with?

PostPosted: Fri Jan 09, 2009 12:55 pm
by pedrograna
1.4.21

PostPosted: Fri Jan 09, 2009 12:57 pm
by mflorell
We are using 1.4.21.2 at a few client sites without any issues like this, I wonder if the updates might have fixed this or if the problem is related to something else.

Thanks again for the info, this is another good thing to try when this happens.