Wildcard

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Wildcard

Post by Izzyg »

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 ?
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

how about
sip:(1?|\+?)2125551212
or
sip:.*2125551212
Izzyg
Posts: 91
Joined: Tue Jun 25, 2013 1:14 pm
Location: Sip Land

Post by Izzyg »

It works


what does the ".*" do ?
i like to understand fixes so i can help another one next time
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

It is Regular expression used in Dial plan rules, not wildcard

.* is any single character zero or more

http://rubular.com/
Post Reply