hello, <br><br>auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.<br><br>here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.<br>
<br><br> <extension name="ANIorPIN"><br> <condition field="destination_number" expression="^ANIorPIN$"><br> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/><br>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/><br> <action application="execute_extension" data="CheckANI XML NXIVR"/><br>
</condition><br> </extension><br><br><br> <extension name="CheckANI"><br> <condition field="destination_number" expression="^CheckANI$"/><br> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"><br>
<action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/><br> <action application="execute_extension" data="EnterPIN XML NXIVR"/><br>
<br> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/><br> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/><br>
<anti-action inline="true" application="export" data="PASSWD=1234"/><br> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/><br>
</condition><br> </extension><br><br><br> <extension name="EnterPIN"><br> <condition field="destination_number" expression="^EnterPIN$"><br> <action application="set" data="playback_delimiter=!"/><br>
<action application="set" data="playback_terminators=#*0123456789"/><br> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/><br>
<action application="set" data="credit_amount=h323-credit-amount=0"/><br> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/><br>
<action application="execute_extension" data="ParsePIN XML NXIVR"/><br><br> <action application="log" data="INFO PIN=${PIN}"/><br> <action application="log" data="INFO UNAME=${UNAME}"/><br>
<action application="log" data="INFO PASSWD=${PASSWD}"/><br><br> <action inline="true" application="export" data="DIALED_NUMBER="""/><br>
<br> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/><br> <action application="set" data="auto_hunt=true"/><br>
<action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/><br> <action application="execute_extension" data="CheckPIN XML NXIVR"/><br> </condition><br>
</extension><br><br><br> <extension name="GetDstNum"><br> <condition field="destination_number" expression="^GetDstNum$"><br> <action application="set" data="bind_meta_key=#"/><br>
<action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/><br><br> <action application="set" data="playback_delimiter=!"/><br> <action application="set" data="playback_terminators=#*0123456789"/><br>
<action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/><br> <action application="execute_extension" data="TranslateLocal XML NXIVR"/><br>
<action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/><br> <action application="execute_extension" data="ParseDN XML NXIVR"/><br>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/><br> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/><br>
<action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/><br> <action application="execute_extension" data="CheckDstNum XML NXIVR"/><br> </condition><br>
</extension><br><br><br><br><br><br><br><br><br><br><br><br>