Author |
Message |
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Tue Sep 03, 2013 7:23 am Post subject: Wildcard |
|
|
1. Brekeke Product Name and Version:
Brekeke SIP Server - 2.4.8.6/286.3
2. Java version:
1.7.0_25
3. OS type and the version:
Windows Server 2008 R2
4. UA (phone), gateway or other hardware/software involved:
5. Your problem:
id like to add a dial plan with a wildcard
so even if the call has a leading 1, or a + then it should still match
Matching Patterns | $request = ^INVITE sip:=2125551212
|
if the call comes in as 12125551212 it wont match
so i tried adding the dial plan like this,
Matching Patterns | $request = ^INVITE sip:*2125551212
|
and it still didn't work
i had to add it like this
Matching Patterns | $request = ^INVITE sip:12125551212
|
for it to work correctly
how can i make this work ? so no matter whats before 2125551212 it should match ? |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Tue Sep 03, 2013 9:28 am Post subject: |
|
|
how about
sip:(1?|\+?)2125551212
or
sip:.*2125551212 |
|
Back to top |
|
Izzyg Brekeke Talented
Joined: 25 Jun 2013 Posts: 91
Location: Sip Land
|
Posted: Tue Sep 03, 2013 10:04 am Post subject: |
|
|
It works
what does the ".*" do ?
i like to understand fixes so i can help another one next time |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Tue Sep 03, 2013 10:33 am Post subject: |
|
|
It is Regular expression used in Dial plan rules, not wildcard
.* is any single character zero or more
http://rubular.com/ |
|
Back to top |
|
|