<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"><<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>></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 = '231'<br>
<font color="#888888"><br>
-MC<br>
</font><div><div></div><div class="Wj3C7c"><br>
> -----Original Message-----<br>
> 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>
> <a href="mailto:users-bounces@lists.freeswitch.org">users-bounces@lists.freeswitch.org</a>] On Behalf Of Peter P GMX<br>
> Sent: Friday, October 03, 2008 4:14 PM<br>
> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
> Subject: [Freeswitch-users] Routing with $1 variable<br>
><br>
> Today I had a strange behaviour:<br>
> I am routing calls to an Asterisk PBX. It has a very sophisticated<br>
> dynamic least cost router built in - so I use it to terminate mobile<br>
and<br>
> international calls.<br>
><br>
> For a first test I created a dialplan which checks for ^231$ in the<br>
> dialled number and then routes the call to $1/asterisk.pbx.<br>
> It didn't work. Grepping the SIP traffic I could see that Freeswitch<br>
> makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.<br>
><br>
> Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in<br>
the<br>
> dialled number and then route the call to $1/asterisk.pbx.<br>
> This works.<br>
><br>
> I am confused as in the second case $1 is translated to the dialled<br>
> number and in the frist case not.<br>
><br>
> Anybody has a clue?<br>
><br>
> Best regards<br>
> Peter<br>
><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>
><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>
_______________________________________________<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>