Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
$str.equals problem
Author Message
redmiru
Brekeke Member


Joined: 12 Feb 2012
Posts: 19

PostPosted: Sun Feb 12, 2012 5:15 pm    Post subject: $str.equals problem Reply with quote

1. Brekeke Product Name and version:
Brekeke SIP server, 2.4.8.6

2. Java version:
1.6

3. OS type and the version:
Windows Server 2008

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :

6. Your problem:

(1) I want to drop the call if From username(last 4 digits) is same with To username(last 4 digits)
(2) From filed: <sip:1234567@....> To field: <sip:9874567@...>
----> MUST drop
(3) I was planned like this

Matching Patterns
$request = ^INVITE
$str.equals($str.substring($geturi(From), 7,11), $str.substring($geturi(To),7,11)) = true
Deploy Patterns
$action = 403

But it doesn't work

(4) how to plannig Dialplan? please help. ;(
Back to top
View user's profile
hope
Brekeke Master Guru


Joined: 15 Jan 2008
Posts: 862

PostPosted: Mon Feb 13, 2012 1:28 pm    Post subject: Reply with quote

matching
$request = ^INVITE
From = sip:.+([0-9]{4})@
To = sip:.+%1@

deploy:
$action = 403
Back to top
View user's profile
redmiru
Brekeke Member


Joined: 12 Feb 2012
Posts: 19

PostPosted: Mon Feb 13, 2012 5:26 pm    Post subject: Thank you! It works perfectly! Reply with quote

Thank you Hope! It works!

hope wrote:
matching
$request = ^INVITE
From = sip:.+([0-9]{4})@
To = sip:.+%1@

deploy:
$action = 403
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