<div dir="ltr">did you wrap what you want to capture in parens ()<br><br><br><div class="gmail_quote">On Fri, Oct 3, 2008 at 6:30 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.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;">Regex 101: use parentheses to capture info in $1:<br>
<br>
^(234)$<br>
$1 will = &#39;231&#39;<br>
<font color="#888888"><br>
-MC<br>
</font><div><div></div><div class="Wj3C7c"><br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><br>
[mailto:<a href="mailto:freeswitch-">freeswitch-</a><br>
&gt; <a href="mailto:users-bounces@lists.freeswitch.org">users-bounces@lists.freeswitch.org</a>] On Behalf Of Peter P GMX<br>
&gt; Sent: Friday, October 03, 2008 4:14 PM<br>
&gt; To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
&gt; Subject: [Freeswitch-users] Routing with $1 variable<br>
&gt;<br>
&gt; Today I had a strange behaviour:<br>
&gt; I am routing calls to an Asterisk PBX. It has a very sophisticated<br>
&gt; dynamic least cost router built in - so I use it to terminate mobile<br>
and<br>
&gt; international calls.<br>
&gt;<br>
&gt; For a first test I created a dialplan which checks for ^231$ in the<br>
&gt; dialled number and then routes the call to $1/asterisk.pbx.<br>
&gt; It didn&#39;t work. Grepping the SIP traffic I could see that Freeswitch<br>
&gt; makes an invite $1@asterisk.pbx. Yes it&#39;s $1 in the SIP message.<br>
&gt;<br>
&gt; Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in<br>
the<br>
&gt; dialled number and then route the call to $1/asterisk.pbx.<br>
&gt; This works.<br>
&gt;<br>
&gt; I am confused as in the second case $1 is translated to the dialled<br>
&gt; number and in the frist case not.<br>
&gt;<br>
&gt; Anybody has a clue?<br>
&gt;<br>
&gt; Best regards<br>
&gt; Peter<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;<br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
</div>