Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Wildcard
Author Message
Izzyg
Brekeke Talented


Joined: 25 Jun 2013
Posts: 91
Location: Sip Land

PostPosted: Tue Sep 03, 2013 7:23 am    Post subject: Wildcard Reply with quote

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
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Tue Sep 03, 2013 9:28 am    Post subject: Reply with quote

how about
sip:(1?|\+?)2125551212
or
sip:.*2125551212
Back to top
View user's profile
Izzyg
Brekeke Talented


Joined: 25 Jun 2013
Posts: 91
Location: Sip Land

PostPosted: Tue Sep 03, 2013 10:04 am    Post subject: Reply with quote

It works


what does the ".*" do ?
i like to understand fixes so i can help another one next time
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Tue Sep 03, 2013 10:33 am    Post subject: Reply with quote

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

.* is any single character zero or more

http://rubular.com/
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1