hello, <br><br>auth_function application returns a &quot;OK&quot; or &quot;NOK&quot; 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&#39;s ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.<br>
<br><br>  &lt;extension name=&quot;ANIorPIN&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^ANIorPIN$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;CALLINGNUMBER=${caller_id_number}&quot;/&gt;<br>
      &lt;action application=&quot;auth_function&quot; data=&quot;in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;CheckANI XML NXIVR&quot;/&gt;<br>
    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br><br>  &lt;extension name=&quot;CheckANI&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^CheckANI$&quot;/&gt;<br>    &lt;condition field=&quot;${ANI_AUTH_RESULT}&quot; expression=&quot;^NOK$&quot;&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;EnterPIN XML NXIVR&quot;/&gt;<br>
<br>      &lt;action application=&quot;log&quot; data=&quot;INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n&quot;/&gt;<br>      &lt;anti-action inline=&quot;true&quot; application=&quot;export&quot; data=&quot;UNAME=${caller_id_number}&quot;/&gt;<br>
      &lt;anti-action inline=&quot;true&quot; application=&quot;export&quot; data=&quot;PASSWD=1234&quot;/&gt;<br>      &lt;anti-action application=&quot;execute_extension&quot; data=&quot;GetDstNum XML NXIVR&quot;/&gt;<br>
    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br><br> &lt;extension name=&quot;EnterPIN&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^EnterPIN$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;playback_delimiter=!&quot;/&gt;<br>
      &lt;action application=&quot;set&quot; data=&quot;playback_terminators=#*0123456789&quot;/&gt;<br>      &lt;action application=&quot;read&quot; data=&quot;${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *&quot;/&gt;<br>
      &lt;action application=&quot;set&quot; data=&quot;credit_amount=h323-credit-amount=0&quot;/&gt;<br>      &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;PIN_RETRIES=${expr(${PIN_RETRIES}+1)}&quot;/&gt;<br>
      &lt;action application=&quot;execute_extension&quot; data=&quot;ParsePIN XML NXIVR&quot;/&gt;<br><br>      &lt;action application=&quot;log&quot; data=&quot;INFO  PIN=${PIN}&quot;/&gt;<br>      &lt;action application=&quot;log&quot; data=&quot;INFO  UNAME=${UNAME}&quot;/&gt;<br>
      &lt;action application=&quot;log&quot; data=&quot;INFO  PASSWD=${PASSWD}&quot;/&gt;<br><br>      &lt;action inline=&quot;true&quot; application=&quot;export&quot; data=&quot;DIALED_NUMBER=&quot;&quot;&quot;/&gt;<br>
<br>      &lt;action application=&quot;auth_function&quot; data=&quot;in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT&quot;/&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;auto_hunt=true&quot;/&gt;<br>
      &lt;action application=&quot;execute_extension&quot; data=&quot;PARSE_RET_CODE XML NXIVR&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;CheckPIN XML NXIVR&quot;/&gt;<br>    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br><br><br> &lt;extension name=&quot;GetDstNum&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^GetDstNum$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;bind_meta_key=#&quot;/&gt;<br>
      &lt;action application=&quot;bind_meta_app&quot; data=&quot;0 a a transfer::LongDTMF XML NXIVR&quot;/&gt;<br><br>      &lt;action application=&quot;set&quot; data=&quot;playback_delimiter=!&quot;/&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;playback_terminators=#*0123456789&quot;/&gt;<br>
      &lt;action application=&quot;read&quot; data=&quot;${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;TranslateLocal XML NXIVR&quot;/&gt;<br>
      &lt;action inline=&quot;true&quot; application=&quot;set&quot; data=&quot;DST_RETRIES=${expr(${DST_RETRIES}+1)}&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;ParseDN XML NXIVR&quot;/&gt;<br>
      &lt;action application=&quot;auth_function&quot; data=&quot;in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT&quot;/&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;CALLINGNUMBER=${caller_id_number}&quot;/&gt;<br>
      &lt;action application=&quot;execute_extension&quot; data=&quot;PARSE_RET_CODE XML NXIVR&quot;/&gt;<br>      &lt;action application=&quot;execute_extension&quot; data=&quot;CheckDstNum XML NXIVR&quot;/&gt;<br>    &lt;/condition&gt;<br>
  &lt;/extension&gt;<br><br><br><br><br><br><br><br><br><br><br><br>