Page 1 of 1

Auto Pause feature

PostPosted: Sun Feb 10, 2019 3:11 am
by JaafarF
Hello Dears,

Our configuration is
Asterisk 13 & vicidial 18 SVN 3052 & cluster for server as below
Four server
One database & one app server & one dialer(server who receive the calls and send it to agent server) & agent server (server who agent log in phone on soft phone Micro SIP application)

Please I need your support to solve this problem knowing that we solve this problem first we are using on hook feature but agent can’t receive call and the call is hang-up immediately when agent click answer
We solve this problem by change on hook CID to generic or customer phone –ring agent because just those too options allowed ,then the agent can receive call and every think ok ,
We need feature to change agent status to PAUSE if he didn’t answer the call and we made it by edit code in agi-VDAD_ALL_inbound line 3072 as below :
Code: Select all
$ring_no_answer_agents = "'$VDADuser',";   # do not send calls to this agent again, unless no others available
$st_ring_no_answer_agents = "UPDATE vicidial_live_agents set status='PAUSED' where user= '$VDADuser';"; # Change Agent status to PAUSED if he didnt answer the call
                  
$RAFaffected_rows = $dbhA->do($st_ring_no_answer_agents);
$dbhP=$dbhA;  $MEL_aff_rows=$RAFaffected_rows;   &mysql_error_logging;
}

But then we faced the same problem (call hang-up immediately when agent click answer and the call still in queue hearing MOH)

------
Asterisk log :

asterisk log dialer server
Code: Select all
-- Executing [3@111:1] AGI("SIP/10.192.90.8-0000001d", "agi-VDAD_ALL_inbound.agi,CID-----LB-----14-----111--------------------998-----1-----LA_222------------------------------") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_ALL_inbound.agi
    -- <SIP/10.192.90.8-0000001d> Playing 'sip-silence.gsm' (escape_digits=) (sample_offset 0) (language 'en')
    -- <SIP/10.192.90.8-0000001d> Playing 'sip-silence.gsm' (escape_digits=) (sample_offset 0) (language 'en')
[Feb 10 09:33:05] WARNING[9505][C-00000051]: file.c:774 ast_openstream_full: File 29_Arab-Call-Is-Recorded does not exist in any format
  == Manager 'sendcron' logged on from 192.168.45.121
    -- Called 010*253*037*001*91101@default
    -- Executing [010*253*037*001*91101@default:1] Dial("Local/010*253*037*001*91101@default-0000001c;2", "IAX2/vi-45-121:123456@10.253.37.1:4569/91101,55,oT") in new stack
    -- Called IAX2/vi-45-121:123456@10.253.37.1:4569/91101
    -- Call accepted by 10.253.37.1:4569 (format ulaw)
    -- Format for call is (ulaw)
    -- IAX2/10.253.37.1:4569-9181 is ringing
    -- Local/010*253*037*001*91101@default-0000001c;1 is ringing
  == Manager 'sendcron' logged on from 192.168.45.121
  == Manager 'sendcron' logged off from 192.168.45.121
    -- Started music on hold, class 'Waiting_Background', on channel 'SIP/10.192.90.8-0000001d'
    -- Registered IAX2 'suzi-37-5' (AUTHENTICATED) at 192.168.2.134:4569
    -- Registered IAX2 'c7-37-1' (AUTHENTICATED) at 192.168.2.134:4569
    -- Hungup 'IAX2/10.253.37.1:4569-9181'
  == Spawn extension (default, 010*253*037*001*91101, 1) exited non-zero on 'Local/010*253*037*001*91101@default-0000001c;2'
[Feb 10 09:33:14] WARNING[9571][C-00000052]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
    -- Executing [h@default:1] AGI("Local/010*253*037*001*91101@default-0000001c;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CANCEL---------------)") in new stack
    -- <Local/010*253*037*001*91101@default-0000001c;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CANCEL---------------) completed, returning 0
  == Manager 'sendcron' logged off from 192.168.45.121
  == Manager 'sendcron' logged on from 192.168.45.121
    -- Called 010*253*037*001*91103@default
    -- Executing [010*253*037*001*91103@default:1] Dial("Local/010*253*037*001*91103@default-0000001d;2", "IAX2/vi-45-121:123456@10.253.37.1:4569/91103,55,oT") in new stack
    -- Called IAX2/vi-45-121:123456@10.253.37.1:4569/91103
    -- Call accepted by 10.253.37.1:4569 (format ulaw)
    -- Format for call is (ulaw)
    -- IAX2/10.253.37.1:4569-8775 is ringing
    -- Local/010*253*037*001*91103@default-0000001d;1 is ringing
    -- IAX2/10.253.37.1:4569-8775 answered Local/010*253*037*001*91103@default-0000001d;2
    -- Local/010*253*037*001*91103@default-0000001d;1 answered
    -- Channel IAX2/10.253.37.1:4569-8775 joined 'simple_bridge' basic-bridge <98928b6f-0daf-4298-82a1-eb833c50c9b0>
    -- Executing [138331*117*Y2100933050000121044*1001*91103@default:1] AGI("Local/010*253*037*001*91103@default-0000001d;1", "agi-VDAD_local_optimize.agi,RINGAGENT_993996874") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_local_optimize.agi
    -- Channel Local/010*253*037*001*91103@default-0000001d;2 joined 'simple_bridge' basic-bridge <98928b6f-0daf-4298-82a1-eb833c50c9b0>
    -- <Local/010*253*037*001*91103@default-0000001d;1>AGI Script agi-VDAD_local_optimize.agi completed, returning 0
    -- Executing [138331*117*Y2100933050000121044*1001*91103@default:2] Wait("Local/010*253*037*001*91103@default-0000001d;1", "2") in new stack
  == Manager 'sendcron' logged on from 192.168.45.121
    -- Channel IAX2/10.253.37.1:4569-8775 left 'simple_bridge' basic-bridge <98928b6f-0daf-4298-82a1-eb833c50c9b0>
    -- Channel Local/010*253*037*001*91103@default-0000001d;2 left 'simple_bridge' basic-bridge <98928b6f-0daf-4298-82a1-eb833c50c9b0>
  == Spawn extension (default, 010*253*037*001*91103, 1) exited non-zero on 'Local/010*253*037*001*91103@default-0000001d;2'
[Feb 10 09:33:19] WARNING[9592][C-00000053]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
    -- Executing [h@default:1] AGI("Local/010*253*037*001*91103@default-0000001d;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----)") in new stack
    -- Executing [8331*117*Y2100933050000121044*1001*91103@default:1] Playback("IAX2/10.253.37.1:4569-8775", "sip-silence") in new stack
    -- <IAX2/10.253.37.1:4569-8775> Playing 'sip-silence.gsm' (language 'en')
    -- Executing [8331*117*Y2100933050000121044*1001*91103@default:2] AGI("IAX2/10.253.37.1:4569-8775","agi-VDAD_RINGALL.agi,8331*117*Y2100933050000121044*1001*91103") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-VDAD_RINGALL.agi
    -- <Local/010*253*037*001*91103@default-0000001d;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----) completed, returning 0
  == Spawn extension (default, 138331*117*Y2100933050000121044*1001*91103, 2) exited non-zero on 'Local/010*253*037*001*91103@default-0000001d;1'
[Feb 10 09:33:19] WARNING[9591][C-00000054]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
    -- Executing [h@default:1] AGI("Local/010*253*037*001*91103@default-0000001d;1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------)") in new stack
    -- <IAX2/10.253.37.1:4569-8775> Playing 'buzz.gsm' (escape_digits=) (sample_offset 0) (language 'en')
    -- <Local/010*253*037*001*91103@default-0000001d;1>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------) completed, returning 0
    -- <IAX2/10.253.37.1:4569-8775>AGI Script agi-VDAD_RINGALL.agi completed, returning 4
  == Spawn extension (default, 8331*117*Y2100933050000121044*1001*91103, 2) exited non-zero on 'IAX2/10.253.37.1:4569-8775'
[Feb 10 09:33:19] WARNING[9595][C-00000053]: func_hangupcause.c:140 hangupcause_read: Unable to find information for channel
    -- Executing [h@default:1] AGI("IAX2/10.253.37.1:4569-8775", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------)") in new stack
    -- <IAX2/10.253.37.1:4569-8775>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------) completed, returning 0



Asterisk log for agent server :

Code: Select all
-- Executing [91101@default:1] Dial("IAX2/vi-45-121-9158", "SIP/91101,60,") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/91101
    -- SIP/91101-00000020 is ringing
  == Manager 'sendcron' logged on from 192.168.2.134
  == Manager 'sendcron' logged off from 192.168.2.134
  == Manager 'sendcron' logged on from 10.253.37.1
  == Manager 'sendcron' logged off from 10.253.37.1
    -- Registered IAX2 'suzi-37-5' (AUTHENTICATED) at 10.253.37.5:4569
    -- Registered IAX2 'suzi-37-5' (AUTHENTICATED) at 192.168.2.134:4569
    -- Registered IAX2 'suzi-37-5' (AUTHENTICATED) at 10.253.37.1:4569
  == Spawn extension (default, 91101, 1) exited non-zero on 'IAX2/vi-45-121-9158'
[Feb 10 09:33:14] WARNING[30717][C-00000057]: func_hangupcause.c:149 hangupcause_read: Information type not recognized (SIP/91101-00000020,tech)
    -- Executing [h@default:1] AGI("IAX2/vi-45-121-9158", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CANCEL---------------)") in new stack
    -- <IAX2/vi-45-121-9158>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0-----CANCEL---------------) completed, returning 0
    -- Hungup 'IAX2/vi-45-121-9158'
    -- Accepting AUTHENTICATED call from 192.168.45.121:4569:
    --        > requested format = ulaw,
    --        > requested prefs = (ulaw|gsm),
    --        > actual format = ulaw,
    --        > host prefs = (ulaw),
    --        > priority = mine
    -- Executing [91103@default:1] Dial("IAX2/vi-45-121-10588", "SIP/91103,10,") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/91103
    -- SIP/91103-00000021 is ringing
       > 0x7f755800d490 -- Strict RTP learning after remote address set to: 192.168.45.23:4096
    -- SIP/91103-00000021 answered IAX2/vi-45-121-10588
    -- Channel SIP/91103-00000021 joined 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>
    -- Channel IAX2/vi-45-121-10588 joined 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>
       > 0x7f755800d490 -- Strict RTP switching to RTP target address 192.168.45.23:4096 assource
    -- Channel IAX2/vi-45-121-10588 left 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>
    -- Channel SIP/91103-00000021 left 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>
  == Spawn extension (default, 91103, 1) exited non-zero on 'IAX2/vi-45-121-10588'
[Feb 10 09:33:19] WARNING[30739][C-00000058]: func_hangupcause.c:149 hangupcause_read: Information type not recognized (SIP/91103-00000021,tech)
    -- Executing [h@default:1] AGI("IAX2/vi-45-121-10588", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----)") in new stack
    -- <IAX2/vi-45-121-10588>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----) completed, returning 0
    -- Hungup 'IAX2/vi-45-121-10588'




agi log for dialer server
Code: Select all
AGI Tx >> agi_network: yes
AGI Tx >> agi_network_script: call_log--HVcauses--PRI-----NODEBUG-----16--------------------)
<IAX2/suzi-37-5-3394>AGI Tx >> agi_request: agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------)
<IAX2/suzi-37-5-3394>AGI Tx >> agi_channel: IAX2/suzi-37-5-3394
<IAX2/suzi-37-5-3394>AGI Tx >> agi_language: en
<IAX2/suzi-37-5-3394>AGI Tx >> agi_type: IAX2
<IAX2/suzi-37-5-3394>AGI Tx >> agi_uniqueid: 1549784478.265
<IAX2/suzi-37-5-3394>AGI Tx >> agi_version: 13.24.1
<IAX2/suzi-37-5-3394>AGI Tx >> agi_callerid: unknown
<IAX2/suzi-37-5-3394>AGI Tx >> agi_calleridname: RINGAGENT_993996874
<IAX2/suzi-37-5-3394>AGI Tx >> agi_callingpres: 0
<IAX2/suzi-37-5-3394>AGI Tx >> agi_callingani2: 0
<IAX2/suzi-37-5-3394>AGI Tx >> agi_callington: 0
<IAX2/suzi-37-5-3394>AGI Tx >> agi_callingtns: 0
<IAX2/suzi-37-5-3394>AGI Tx >> agi_dnid: unknown
<IAX2/suzi-37-5-3394>AGI Tx >> agi_rdnis: unknown
<IAX2/suzi-37-5-3394>AGI Tx >> agi_context: default
<IAX2/suzi-37-5-3394>AGI Tx >> agi_extension: h
<IAX2/suzi-37-5-3394>AGI Tx >> agi_priority: 1
<IAX2/suzi-37-5-3394>AGI Tx >> agi_enhanced: 0.0
<IAX2/suzi-37-5-3394>AGI Tx >> agi_accountcode:
<IAX2/suzi-37-5-3394>AGI Tx >> agi_threadid: 140168342640384
<IAX2/suzi-37-5-3394>AGI Tx >>
    -- <IAX2/suzi-37-5-3394>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16--------------------) completed, returning 0
<IAX2/suzi-37-5-3394>AGI Tx >> HANGUP
    -- Hungup 'IAX2/suzi-37-5-3394'
<SIP/10.192.90.8-0000001f>AGI Rx << CHANNEL STATUS SIP/10.192.90.8-0000001f
<SIP/10.192.90.8-0000001f>AGI Tx >> 200 result=6
  == Manager 'sendcron' logged off from 192.168.45.121
  == Manager 'sendcron' logged off from 192.168.45.121
<SIP/10.192.90.8-0000001f>AGI Rx << CHANNEL STATUS SIP/10.192.90.8-0000001f
<SIP/10.192.90.8-0000001f>AGI Tx >> 200 result=6

#####
Code: Select all
agi log for agent server :

AGI Tx >> agi_network: yes
AGI Tx >> agi_network_script: call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----)
<IAX2/vi-45-121-5021>AGI Tx >> agi_request: agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----)
<IAX2/vi-45-121-5021>AGI Tx >> agi_channel: IAX2/vi-45-121-5021
<IAX2/vi-45-121-5021>AGI Tx >> agi_language: en
<IAX2/vi-45-121-5021>AGI Tx >> agi_type: IAX2
<IAX2/vi-45-121-5021>AGI Tx >> agi_uniqueid: 1549784478.177
<IAX2/vi-45-121-5021>AGI Tx >> agi_version: 13.21.0-vici
<IAX2/vi-45-121-5021>AGI Tx >> agi_callerid: unknown
<IAX2/vi-45-121-5021>AGI Tx >> agi_calleridname: RINGAGENT_993996874
<IAX2/vi-45-121-5021>AGI Tx >> agi_callingpres: 0
<IAX2/vi-45-121-5021>AGI Tx >> agi_callingani2: 0
<IAX2/vi-45-121-5021>AGI Tx >> agi_callington: 0
<IAX2/vi-45-121-5021>AGI Tx >> agi_callingtns: 0
<IAX2/vi-45-121-5021>AGI Tx >> agi_dnid: unknown
<IAX2/vi-45-121-5021>AGI Tx >> agi_rdnis: unknown
<IAX2/vi-45-121-5021>AGI Tx >> agi_context: default
<IAX2/vi-45-121-5021>AGI Tx >> agi_extension: h
<IAX2/vi-45-121-5021>AGI Tx >> agi_priority: 1
<IAX2/vi-45-121-5021>AGI Tx >> agi_enhanced: 0.0
<IAX2/vi-45-121-5021>AGI Tx >> agi_accountcode: IAXvi-45-121
<IAX2/vi-45-121-5021>AGI Tx >> agi_threadid: 140142721644288
<IAX2/vi-45-121-5021>AGI Tx >>
    -- <IAX2/vi-45-121-5021>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----16-----ANSWER-----2-----0-----) completed, returning 0
<IAX2/vi-45-121-5021>AGI Tx >> HANGUP
    -- Hungup 'IAX2/vi-45-121-5021'

-----
----- I think the problem is from agent server when
Channel IAX2/vi-45-121-10588 left 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>
-- Channel SIP/91103-00000021 left 'simple_bridge' basic-bridge <0bc3be16-d6e2-4287-9087-c81506ead4d5>

And I think My problem in this line

$st_ring_no_answer_agents = "UPDATE vicidial_live_agents set status='PAUSED' where user= '$VDADuser';";

when i put '$VDADuser',"; instead of '$VDADuser';";

every thing ok and the call is established well but without applying the code to put the agent PAUSE if he didn't answer .

and if i put value instead of variable the code is applied on this agent user and the call establish well like
$st_ring_no_answer_agents = "UPDATE vicidial_live_agents set status='PAUSED' where user= '1000' ";

any one can know how we solve this issue


Thanks in advance

Re: Auto Pause feature

PostPosted: Tue Apr 02, 2019 10:47 am
by williamconley
1) ALWAYS post your Vicidial Version with Build. SVN is nice, but Vicidial Version with build is Required.

2) "Feb 10 09:33:19] WARNING[30739][C-00000058]: func_hangupcause.c:149 hangupcause_read: Information type not recognized" that sounds to me like it's related to "server who agent log in phone on soft phone Micro SIP application". Try it without that micro sip application. Just have the agent on a regular soft phone. If that fixes the problem, then your issue related to asterisk not liking your "micro sip application".

Re: Auto Pause feature

PostPosted: Mon Apr 29, 2019 1:54 am
by dspaan
Also the latest SVN has another on-hook CID called RA_AGENT_PHONE which is the recommended setting for Asterisk 13 when working with on-hook agents.