hangupcause in FastAGI.pl

All installation and configuration problems and questions

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

hangupcause in FastAGI.pl

Postby heinz » Thu Aug 21, 2008 11:42 am

Hi,

since last week our provider sends new signaling over PRI lines. Now I need calls which comes in as status "CHANUNAVAIL" and hangupcause "18" disposition as "DC1".
Therefore I modified the FastAGI_log.pl like this:

Code: Select all
if ($channel =~ /^Local/)
         {
            if ( ($PRI =~ /^PRI$/) && ( ($dialstatus =~ /BUSY/) || ( ($dialstatus =~ /CHANUNAVAIL/) && ($hangup_cause =~ /^1$|^28$|^18$/) ) ) )
            {
               if ($dialstatus =~ /BUSY/) {$VDL_status = 'B'; $VDAC_status = 'BUSY';}
               if ($dialstatus =~ /CHANUNAVAIL/)
               {
               if ($hangup_cause == 18) {$VDL_status = 'DC1'; $VDAC_status = 'DISCONNECT';}
               else {$VDL_status = 'DC'; $VDAC_status = 'DISCONNECT';}
               }
               
...


Funny thing:
I see these calls with status 'DC1' in the database - but only for 1-2 seconds. Then they get updated to 'DC'...

What am I missing?

Thanks,
heinz
heinz
 
Posts: 106
Joined: Mon Oct 08, 2007 1:30 am
Location: South Africa

Postby mflorell » Thu Aug 21, 2008 4:19 pm

this is because sometimes the code will change, or if it is a Local/ channel call the code will be different for the second leg of the Local/ channle of the disconnected call.

You do know that not all calls in the USA that report as disconnected through a PRI line are actually disconnected right?
mflorell
Site Admin
 
Posts: 18406
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby heinz » Fri Aug 22, 2008 12:29 am

Hi Matt,
thanks for the reply.

What is the second leg of the call? And how/where is it handled?
In my AGIout-logfile it shows that the status 'DC1' is written into the DB. One second later it is updated to 'DC'. But what triggers that?

This is my FastAgiout -logfile:
Code: Select all
2008-08-21 16:50:14|TEST_VDfastAGI|begin|+++++++++++++++++ FastAGI Start 2 ++++++++++++++++++++++++++++++++++++++++
2008-08-21 16:50:14|TEST_VDfastAGI|begin|Perl Environment Dump:
2008-08-21 16:50:14|TEST_VDfastAGI|begin|0|--debug
2008-08-21 16:50:14|TEST_VDfastAGI|begin|URL HVcauses: |PRI|DEBUG|18|CHANUNAVAIL||)|
2008-08-21 16:50:14|TEST_VDfastAGI|begin|AGI Environment Dump:
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- accountcode =
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- callerid = 0214020000
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- calleridname = V0821165007000602930
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- callingani2 = 0
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- callingpres = 35
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- callingtns = 0
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- callington = 0
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- channel = Local/1234004969774703@default-87cb,2
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- context = default
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- dnid = unknown
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- enhanced = 0.0
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- extension = h
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- language = en
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- network = yes
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- network_script = call_log--HVcauses--PRI-----DEBUG-----18-----CHANUNAVAIL----------)
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- priority = 1
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- rdnis = unknown
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- request = agi://127.0.0.1:4577/call_log--HVcauses--PRI-----DEBUG-----18-----CHANUNAVAIL----------)
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- type = Local
2008-08-21 16:50:14|TEST_VDfastAGI|begin| -- uniqueid = 1219330207.3149
2008-08-21 16:50:14|TEST_VDfastAGI|begin|AGI Variables: |1219330207.3149|Local/1234004969774703@default-87cb,2|h|Local|V0821165007000602930|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|Process to run: |agi://127.0.0.1:4577/call_log--HVcauses--PRI-----DEBUG-----18-----CHANUNAVAIL----------)|call_log|END|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||CALL HUNG UP|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|URL HVcauses: |PRI|DEBUG|18|CHANUNAVAIL||)|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||1219330207.3149|1219330207|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|QUERY done: start time = 1219330207 | sec: 7 | min:     0.12 |
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||UPDATE call_log set end_time='2008-08-21 16:50:14',end_epoch='1219330214',length_in_sec=7,length_in_min='    0.12',channel='Local/1234004969774703@default-87cb,2' where uniqueid='1219330207.3149'|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||DELETE from live_inbound where uniqueid='1219330207.3149' and server_ip='192.168.0.7'|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|+++++ CALL LOG HUNGUP: |1219330207.3149|Local/1234004969774703@default-87cb,2|h|2008-08-21 16:50:14|min:     0.12|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|VD_hangup2hallo  : V0821165007000602930 Local/1234004969774703@default-87cb,2 1 602930
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||UPDATE vicidial_auto_calls set status='DISCONNECT' where callerid = 'V0821165007000602930';|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|--    VDAC update: |1|602930
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||UPDATE vicidial_list set status='DC1' where lead_id = '602930';|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|--    VDAD vicidial_list update: |1|602930
2008-08-21 16:50:14|TEST_VDfastAGI|call_log||UPDATE vicidial_log set status='DC1' where uniqueid = '1219330207.3149';|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|--    VDAD vicidial_log update: |0E0|1219330207.3149|
2008-08-21 16:50:14|TEST_VDfastAGI|call_log|+++++ VDAD START LOCAL CHANNEL: EXITING- 1


That is from HANGUP_cause-output.txt:
Code: Select all
2008-08-21 16:50:14|18|CHANUNAVAIL||)|1219330207.3149|Local/1234004969774703@default-87cb,2|h|Local|V0821165007000602930|V0821165007000602930|1|


What can I do?
heinz
 
Posts: 106
Joined: Mon Oct 08, 2007 1:30 am
Location: South Africa

Postby mflorell » Fri Aug 22, 2008 1:35 am

Is there any other output in the logfile for the same callerID?

The AST_VDauto_dial.pl script will also set calls to DC if the vicidial_auto_calls table entry for the call is set to DISCONNECT status.
mflorell
Site Admin
 
Posts: 18406
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: No registered users and 422 guests