Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Routing with $1 variable


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
Prometheus001 at gmx.net
Guest





PostPosted: Fri Oct 03, 2008 6:15 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile and
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in the
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Oct 03, 2008 6:21 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

Show us the entire dialplan Wink

/b

On Oct 3, 2008, at 6:13 PM, Peter P GMX wrote:
Quote:
Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile and
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx ([email]$1@asterisk.pbx[/email]). Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in the
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter
Back to top
mcollins at fcnetwork.com
Guest





PostPosted: Fri Oct 03, 2008 6:33 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

Regex 101: use parentheses to capture info in $1:

^(234)$
$1 will = '231'

-MC

Quote:
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-
Quote:
users-bounces@lists.freeswitch.org] On Behalf Of Peter P GMX
Sent: Friday, October 03, 2008 4:14 PM
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Routing with $1 variable

Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile
and
Quote:
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in
the
Quote:
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote:
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Fri Oct 03, 2008 7:02 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

did you wrap what you want to capture in parens ()


On Fri, Oct 3, 2008 at 6:30 PM, Michael Collins <mcollins@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
Quote:
Regex 101: use parentheses to capture info in $1:

^(234)$
$1 will = '231'

-MC


Quote:
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)
[mailto:freeswitch- ([email]freeswitch-[/email])
Quote:
users-bounces@lists.freeswitch.org (users-bounces@lists.freeswitch.org)] On Behalf Of Peter P GMX
Sent: Friday, October 03, 2008 4:14 PM
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Subject: [Freeswitch-users] Routing with $1 variable

Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile
and
Quote:
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in
the
Quote:
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote:
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
msc at freeswitch.org
Guest





PostPosted: Fri Oct 03, 2008 7:28 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

BTW I meant
$1 will = '234'

Sent from my iPhone

On Oct 3, 2008, at 4:30 PM, "Michael Collins" <mcollins@fcnetwork.com>
wrote:

Quote:
Regex 101: use parentheses to capture info in $1:

^(234)$
$1 will = '231'

-MC

Quote:
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-
Quote:
users-bounces@lists.freeswitch.org] On Behalf Of Peter P GMX
Sent: Friday, October 03, 2008 4:14 PM
To: freeswitch-users@lists.freeswitch.org
Subject: [Freeswitch-users] Routing with $1 variable

Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile
and
Quote:
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in
the
Quote:
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote:
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Prometheus001 at gmx.net
Guest





PostPosted: Sun Oct 05, 2008 2:17 pm    Post subject: [Freeswitch-users] Routing with $1 variable Reply with quote

That was the point, I missed the parantheses.

Thanks.


Anthony Minessale schrieb:
Quote:
did you wrap what you want to capture in parens ()


On Fri, Oct 3, 2008 at 6:30 PM, Michael Collins
<mcollins@fcnetwork.com <mailto:mcollins@fcnetwork.com>> wrote:

Regex 101: use parentheses to capture info in $1:

^(234)$
$1 will = '231'

-MC

Quote:
-----Original Message-----
From: freeswitch-users-bounces@lists.freeswitch.org
<mailto:freeswitch-users-bounces@lists.freeswitch.org>
[mailto:freeswitch- <mailto:freeswitch->
Quote:
users-bounces@lists.freeswitch.org
<mailto:users-bounces@lists.freeswitch.org>] On Behalf Of Peter P GMX
Quote:
Sent: Friday, October 03, 2008 4:14 PM
To: freeswitch-users@lists.freeswitch.org
<mailto:freeswitch-users@lists.freeswitch.org>
Quote:
Subject: [Freeswitch-users] Routing with $1 variable

Today I had a strange behaviour:
I am routing calls to an Asterisk PBX. It has a very sophisticated
dynamic least cost router built in - so I use it to terminate mobile
and
Quote:
international calls.

For a first test I created a dialplan which checks for ^231$ in the
dialled number and then routes the call to $1/asterisk.pbx.
It didn't work. Grepping the SIP traffic I could see that Freeswitch
makes an invite $1@asterisk.pbx. Yes it's $1 in the SIP message.

Second I checked for the mobile number using ^(01[6-7]\d{4,13})$ in
the
Quote:
dialled number and then route the call to $1/asterisk.pbx.
This works.

I am confused as in the second case $1 is translated to the dialled
number and in the frist case not.

Anybody has a clue?

Best regards
Peter


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto:Freeswitch-users@lists.freeswitch.org>
Quote:
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users

UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote:
http://www.freeswitch.org

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
<mailto:Freeswitch-users@lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
<mailto:MSN%3Aanthony_minessale@hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
<mailto:PAYPAL%3Aanthony.minessale@gmail.com>
IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
<mailto:sip%3A888@conference.freeswitch.org>
iax:guest@conference.freeswitch.org/888
<http://iax:guest@conference.freeswitch.org/888>
googletalk:conf+888@conference.freeswitch.org
<mailto:googletalk%3Aconf%2B888@conference.freeswitch.org>
pstn:213-799-1400
------------------------------------------------------------------------

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services