Michael, <div><br></div><div>Thank you for the suggestion. This suggestion make sense and a proper way to implement the follow me. .<div><br></div><div>Thanks</div><div>Lloyd<br><br><div class="gmail_quote">On Mon, Mar 8, 2010 at 6:10 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Mon, Mar 8, 2010 at 2:33 PM, Aloysius Lloyd <span dir="ltr">&lt;<a href="mailto:lloyd.aloysius@gmail.com" target="_blank">lloyd.aloysius@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 All,<div><br></div><div>I would like to setup follow me dialplan for individual extensions. Some extensions need a follow-me and some not. If the the follow-me not reach any live person the call should go to the FreeSWTICH voicemail.I have the extensions range from 201 -209. Also I am using the following Default dial plan to call between extensions.</div>


<div><br></div><div><div>&lt;extension name=&quot;Local_Extension&quot;&gt;</div><div>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(20[0-9])$&quot;&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;dialed_extension=$1&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;export&quot; data=&quot;dialed_extension=$1&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;!-- bind_meta_app can have these args &lt;key&gt; [a|b|ab] [a|b|o|s] &lt;app&gt; --&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;bind_meta_app&quot; data=&quot;1 b s execute_extension::dx XML features&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;bind_meta_app&quot; data=&quot;2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;bind_meta_app&quot; data=&quot;3 b s execute_extension::cf XML features&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;ringback=${us-ring}&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;transfer_ringback=$${hold_music}&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;call_timeout=30&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;!-- &lt;action application=&quot;set&quot; data=&quot;sip_exclude_contact=${network_addr}&quot;/&gt; --&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;!--&lt;action application=&quot;set&quot; data=&quot;continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION&quot;/&gt; --&gt;</div>
<div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;set&quot; data=&quot;called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;!--&lt;action application=&quot;export&quot; data=&quot;nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}&quot;/&gt;--&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;hash&quot; data=&quot;insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;bridge&quot; data=&quot;user/${dialed_extension}@${domain_name},${followme}&quot;/&gt;</div>


<div><span style="white-space:pre">        </span>&lt;action application=&quot;answer&quot;/&gt;</div><div><span style="white-space:pre">        </span>&lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;</div>
<div><span style="white-space:pre">        </span>&lt;action application=&quot;voicemail&quot; data=&quot;default ${domain_name} ${dialed_extension}&quot;/&gt;</div><div>      &lt;/condition&gt;</div><div>
 &lt;/extension&gt;</div></div><div><br></div><div>I use the wiki samples to make a follow me dial plan for extension 201. Here is the dial plan.</div><div><br></div><div><div>&lt;extension name=&quot;201_followme&quot;&gt;</div>


<div>  &lt;condition field=&quot;destination_number&quot; expression=&quot;201&quot;&gt;</div><div>   &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=true&quot;/&gt;</div><div>   &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;</div>


<div>   &lt;action application=&quot;set&quot; data=&quot;ignore_early_media=true&quot;/&gt;</div><div>   &lt;action application=&quot;set&quot; data=&quot;call_timeout=10&quot;/&gt;</div><div>   &lt;action application=&quot;bridge&quot; data=&quot;sofia/$${domain}/201&quot;/&gt;</div>


<div>   &lt;action application=&quot;set&quot; data=&quot;call_timeout=13&quot;/&gt;</div><div>   &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/voicepulse/14161235555&quot; /&gt;</div><div>   &lt;action application=&quot;answer&quot;/&gt;</div>


<div>   &lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;</div><div>   &lt;action application=&quot;voicemail&quot; data=&quot;default $${domain} 201&quot;/&gt;</div><div>  &lt;/condition&gt;</div><div>

&lt;/extension&gt;</div>
<div><br></div></div><div><br></div><div>Call to extension 201 , there are two dialplan matching the request. Either Local_Extension or follwme_201. Which order freeswtich select?</div></blockquote></div></div><div><br>It will match whichever one comes first in the file. You could, for example, put this 201 extension above the Local_Extension. You could also put a custom chan var in the user directory for those who need the follow-me. Then you could have two conditions, both of which need to match:<br>

<br>&lt;extension name=&quot;Local, follow me&quot;&gt;<br>  &lt;condition field=&quot;${followme}&quot; expression=&quot;^yes$&quot;/&gt;<br>  &lt;condition field=&quot;destination_number expression=&quot;^(20\d)$&quot;&gt;<br>

    &lt;!-- followme stuff here --&gt;<br>    ...<br>  &lt;/condition&gt; <br>&lt;/extension&gt;<br><br>&lt;extension name=&quot;Local No follow me&quot;&gt;<br>
  &lt;condition field=&quot;${followme}&quot; expression=&quot;^$&quot;/&gt;<br>
  &lt;condition field=&quot;destination_number expression=&quot;^(20\d)$&quot;&gt;<br>
    &lt;!-- normal local extension stuff here --&gt;<br>
    ...<br>
  &lt;/condition&gt; <br>
&lt;/extension&gt;<br>
<div><br></div>Then in the user setup in the directory add the followme variable only to those who need it. You can also add a variable for the followme phone number if you want. Inside the &lt;variables&gt; node just add whatever you want:<br>

<br>  &lt;variable name=&quot;followme&quot; value=&quot;yes&quot;/&gt;<br>  &lt;variable name=&quot;followme_number&quot; value=&quot;14161235555&quot;/&gt;<br>Or even<br>  &lt;variable name=&quot;followme_dialstring&quot; value=&quot;sofia/gateway/voicepulse/14161235555&quot;/&gt;<br>

<br>Then you could use ${followme_number} in your bridge like this:<div class="im"><br>  &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/</div><div>voicepulse/${followme_number}&quot; /&gt;</div> <br>Or ${followme_dialstring} like this:<br>

  &lt;action application=&quot;bridge&quot; data=&quot;${followme_dialstring}&quot; /&gt;<br><br>Make sense? :) <br><br>Give it a try and report back your success/failure/questions/comments/etc.<br>-MC<br></div></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></div></div>