Advanced DISA

Here the procedure to forward a call to an internal number (already existing):

1. Define the DB connection

 

 

The connection with the Database permits to check if the internal number is present in the numbers list (SIP table)


2. Define Variables
INTERN: the digits of the caller
RESULT: the result of the executed query (it is an array)
CHECK: the value useful for the check of the next step. This value is extracted from the RESULT array: {RESULT[0][reference]}



3. Define the IVR structure

Through the GetDigits block you store the internal number typed by the caller in the INTERN variable.

Trough the Database block you query the Database (you need to find if the INTERN variable corresponds to an already existing SIP reference) and you store the result of the query in the RESULT variable.
SELECT xcally.sip.reference FROM xcally.sip WHERE xcally.sip.reference='{INTERN}';

Through the Set CHECK block you extract the CHECK variable from the RESULT variable
{RESULT[0][reference]}

Through the GotoIf and Goto blocks you can forward the call to the internal number typed by the caller (INTERN variable) if the GotoIf condition is valid:
(CHECK) == (INTERN)