Recording and ACC Dialer (8.6.1080-)
The script uses the calling number to make it easier to route the call from ACC Dialer to the PSTN. Use the script in Khomp Flow, whenever you have ACC Dialer in your architecture.
|
Important Use this script if you have Altitude version 8.6.1080 or higher. If you have a lower version, please use Recording and ACC Dialer (8.6.1000-8.6.1080). |
--------------------------------------------------------------------------------
-- Khomp Flow script
-- Version: FLOW 1.0.5.11B Script version 4
-- Date: XX/05/2024
-- Altitude feature:
-- - ALTNR-2117 - IVR recording through SIP Info
--------------------------------------------------------------------------------
--------------------------------------------
-- KHOMP - LUA SCRIPT
--
-- Link this script to a NAP to perform
-- functions at certain points of a call
--------------------------------------------
-- prerouting(): executed before routing procedure
-- - if the function returns true, it will accept current call
-- - if the function returns false, it will reject current call
function prerouting()
-- --------------------------------------------------------------------------------
-- ----------------- PREDICTIVE DIALING WITH CLASSIFICATION - BEGIN ---------------
-- --------------------------------------------------------------------------------
if (has_value("sip_header:X-Altitude-Purpose")) then
orig_addr = get_value("orig_addr")
set_value("orig_addr","CC#" .. orig_addr)
end
-- --------------------------------------------------------------------------------
-- ----------------- PREDICTIVE DIALING WITH CLASSIFICATION - END ---------------
-- --------------------------------------------------------------------------------
return true
end
-- postrouting(): executed after routing procedure
-- - if the function returns true, it will accept current call
-- - if the function returns false, it will reject current call
function postrouting()
return true
end
-- transfer(): executed when transfer is started
-- - if the function returns true, the transfer_type value defines the transfer behavior
-- - if the function returns false, the transfer_type is set to reject
function transfer()
return true
end
-- postcall(): executed after call has ended
-- - aways return true
function postcall()
return true
end
-- sipinfo(): executed after a SIP INFO is received
-- - if the function returns true then the SIP INFO is forwarded to the
-- other call leg
-- - if the function returns false then the SIP INFO is discarded
function sipinfo()
return true
end
-- sdpupdated( message ): executed after a sdpupdated is received
-- - always return true
function sdpupdated( message )
return true
end
function onconnectlega( )
return true
end
-- onconnectlegb( ): Intercept leg b connection and execute lua code
-- - always return true
function onconnectlegb( )
return true
end