<div class="gmail_quote"><div>Hi,<br><br>Thanks for reply, it really helped me. One more thing to ask, how can we make decision against &gt;,&lt;, &gt;=, &lt;= in condition header? Like we use == for action and != for anti-action.<br>
<br>Kindly highlight it.<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>---------- Forwarded message ----------<br>From: Ahmed Munir &lt;<a href="mailto:ahmedmunir007@gmail.com">ahmedmunir007@gmail.com</a>&gt;<br>
To: FreeSwitch &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>Date: Wed, 21 Oct 2009 15:37:15 +0500<br>Subject: [Freeswitch-users] Call custom variable in condition<br>
Hi,<br><br>I&#39;ve declared a variable named AUTHENTICATION_STATUS in dialplan, and I want to use it in condition, as I&#39;m listing down the configuration below;<br><br>&lt;context name=&quot;SIP_incoming&quot;&gt;<br>
   &lt;extension name=&quot;call-sip-extensions&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)$&quot;&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;AUTHENTICATION_STATUS=0&quot;/&gt;<br>           &lt;action application=&quot;transfer&quot; data=&quot;${AUTHENTICATION_STATUS} XML Authen_Status&quot;/&gt;<br>

      &lt;/condition&gt;<br>   &lt;/extension&gt;<br>&lt;/context&gt;<br><br>&lt;context name=&quot;Authen_Status&quot;&gt;<br>     &lt;extension name=&quot;exten-auth-status&quot;&gt;<br>       &lt;condition field=&quot;AUTHENTICATION_STATUS&quot; expression=&quot;^0$&quot;&gt;<br>

          &lt;action application=&quot;answer&quot;/&gt;<br>          &lt;action application=&quot;playback&quot; data=&quot;play.wav&quot;/&gt;<br>      &lt;/condition&gt;<br>    &lt;/extension&gt;<br>  &lt;/context&gt;<br>

<br><br><br><br> But unfortunately it is not working. Kindly advise me how to do implement it(Note: I don&#39;t want to call script). And one more thing to ask how can I transfer the values within the same context?<br clear="all">

<br>-- <br>Regards,<br><br>Ahmed Munir<br><br><br>
<br><br>---------- Forwarded message ----------<br>From: Ghulam Mustafa &lt;<a href="http://mustafa.pk">mustafa.pk</a>@<a href="http://gmail.com">gmail.com</a>&gt;<br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Date: Wed, 21 Oct 2009 15:52:24 +0500<br>Subject: Re: [Freeswitch-users] Call custom variable in condition<br>Ahmed,<br>
<br>
you can&#39;t use variables set by &quot;set&quot; application within a condition, though it doesn&#39;t make sense. wondering if there is any logic behind this or it&#39;s just a simple missing feature. anyone?<br>
<br>
-m<br>
<br>
Ahmed Munir wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I&#39;ve declared a variable named AUTHENTICATION_STATUS in dialplan, and I want to use it in condition, as I&#39;m listing down the configuration below;<br>
<br>
&lt;context name=&quot;SIP_incoming&quot;&gt;<br>
   &lt;extension name=&quot;call-sip-extensions&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)$&quot;&gt;<br>
          &lt;action application=&quot;set&quot; data=&quot;AUTHENTICATION_STATUS=0&quot;/&gt;<br>
           &lt;action application=&quot;transfer&quot; data=&quot;${AUTHENTICATION_STATUS} XML Authen_Status&quot;/&gt;<br>
      &lt;/condition&gt;<br>
   &lt;/extension&gt;<br>
&lt;/context&gt;<br>
<br>
&lt;context name=&quot;Authen_Status&quot;&gt;<br>
     &lt;extension name=&quot;exten-auth-status&quot;&gt;<br>
       &lt;condition field=&quot;AUTHENTICATION_STATUS&quot; expression=&quot;^0$&quot;&gt;<br>
          &lt;action application=&quot;answer&quot;/&gt;<br>
          &lt;action application=&quot;playback&quot; data=&quot;play.wav&quot;/&gt;<br>
      &lt;/condition&gt;<br>
    &lt;/extension&gt;<br>
  &lt;/context&gt;<br>
<br>
<br>
<br>
<br>
 But unfortunately it is not working. Kindly advise me how to do implement it(Note: I don&#39;t want to call script). And one more thing to ask how can I transfer the values within the same context?<br>
<br>
-- <br>
Regards,<br>
<br>
Ahmed Munir<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
  <br>
</blockquote>
<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Tihomir Culjaga &lt;<a href="mailto:tculjaga@gmail.com">tculjaga@gmail.com</a>&gt;<br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
Date: Wed, 21 Oct 2009 13:13:13 +0200<br>Subject: Re: [Freeswitch-users] Call custom variable in condition<br>consider this:<br><br><br><br>&lt;context name=&quot;SIP_incoming&quot;&gt;<br>   &lt;extension name=&quot;call-sip-extensions&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)$&quot;&gt;<br>
          &lt;action application=&quot;set&quot; data=&quot;AUTHENTICATION_STATUS=0&quot;/&gt;<br>           &lt;action application=&quot;transfer&quot; data=&quot;${AUTHENTICATION_STATUS} XML Authen_Status&quot;/&gt;<br>

      &lt;/condition&gt;<br>   &lt;/extension&gt;<br>&lt;/context&gt;<br><br><br><br>&lt;context name=&quot;Authen_Status&quot;&gt;<br>     &lt;extension name=&quot;exten-auth-status&quot;&gt;<br>       &lt;condition field=<span style="background-color: rgb(255, 255, 0);">&quot;${AUTHENTICATION_STATUS}&quot;</span> expression=&quot;^0$&quot;&gt;<br>

          &lt;action application=&quot;answer&quot;/&gt;<br>          &lt;action application=&quot;playback&quot; data=&quot;play.wav&quot;/&gt;<br>      &lt;/condition&gt;<br>    &lt;/extension&gt;<br>  &lt;/context&gt;<br>

<br><br><br><br><br>here is one of my dialplan. I&#39;m using execute_extension but it is quite the same...<br><br><br><br>   &lt;extension name=&quot;ServiceLookup&quot;&gt;<br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;(^300030)(.*)&quot;&gt;<br>

         &lt;action application=&quot;lookup_service_destination&quot; data=&quot;in ${caller_id_number:6:16}, in ${caller_id_number:0:6}, in $2, in $<br>1, in ${network_addr}:5060, out red_contact, out authResult&quot;/&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ######################## ServiceLookup ########################\n&quot;/&gt;<br>         &lt;action application=&quot;log&quot; data=&quot;INFO ######################## contact = &#39;${red_contact}&#39; ##############\n&quot;/&gt;<br>

         &lt;action application=&quot;log&quot; data=&quot;INFO ######################## CallerNum = &#39;${caller_id_number:6:16}&#39; ##########\n&quot;/&gt;<br>         &lt;action application=&quot;log&quot; data=&quot;INFO ######################## RADIUS auth = &#39;${authResult}&#39; ##########\n&quot;/&gt;<br>

<br>         &lt;action application=&quot;execute_extension&quot; data=&quot;doRedirect XML public&quot;/&gt;<br>        &lt;/condition&gt;<br>   &lt;/extension&gt;<br><br><br>   &lt;extension name=&quot;doRedirect&quot;&gt;<br>

      &lt;condition field=&quot;destination_number&quot; expression=&quot;^doRedirect$&quot;/&gt;<br>      &lt;condition field=&quot;${authResult}&quot; expression=&quot;^0$|^60$&quot;&gt;<br>         &lt;action application=&quot;log&quot; data=&quot;INFO ######################## RADIUS auth OK!!!&#39; ##########\n&quot;/&gt;<br>

         &lt;action application=&quot;redirect&quot; data=&quot;${red_contact}&quot;/&gt;<br>         &lt;anti-action application=&quot;log&quot; data=&quot;INFO ######################## RADIUS auth NOK!! ##########\n&quot;/&gt;<br>

         &lt;anti-action application=&quot;respond&quot; data=&quot;403 Forbidden&quot;/&gt;<br>      &lt;/condition&gt;<br><br>   &lt;/extension&gt;<br><br><br><br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 12:37 PM, Ahmed Munir <span dir="ltr">&lt;<a href="mailto:ahmedmunir007@gmail.com" target="_blank">ahmedmunir007@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I&#39;ve declared a variable named AUTHENTICATION_STATUS in dialplan, and I want to use it in condition, as I&#39;m listing down the configuration below;<br>

<br>&lt;context name=&quot;SIP_incoming&quot;&gt;<br>   &lt;extension name=&quot;call-sip-extensions&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d+)$&quot;&gt;<br>          &lt;action application=&quot;set&quot; data=&quot;AUTHENTICATION_STATUS=0&quot;/&gt;<br>           &lt;action application=&quot;transfer&quot; data=&quot;${AUTHENTICATION_STATUS} XML Authen_Status&quot;/&gt;<br>


      &lt;/condition&gt;<br>   &lt;/extension&gt;<br>&lt;/context&gt;<br><br>&lt;context name=&quot;Authen_Status&quot;&gt;<br>     &lt;extension name=&quot;exten-auth-status&quot;&gt;<br>       &lt;condition field=&quot;AUTHENTICATION_STATUS&quot; expression=&quot;^0$&quot;&gt;<br>


          &lt;action application=&quot;answer&quot;/&gt;<br>          &lt;action application=&quot;playback&quot; data=&quot;play.wav&quot;/&gt;<br>      &lt;/condition&gt;<br>    &lt;/extension&gt;<br>  &lt;/context&gt;<br>


<br><br><br><br> But unfortunately it is not working. Kindly advise me how to do implement it(Note: I don&#39;t want to call script). And one more thing to ask how can I transfer the values within the same context?<br clear="all">


<br>-- <br>Regards,<br><font color="#888888"><br>Ahmed Munir<br><br><br>
</font><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Ahmed Munir<br><br><br>