Author |
Message |
redmiru Brekeke Member
Joined: 12 Feb 2012 Posts: 19
|
Posted: Sun Feb 12, 2012 5:15 pm Post subject: $str.equals problem |
|
|
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 |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Mon Feb 13, 2012 1:28 pm Post subject: |
|
|
matching
$request = ^INVITE
From = sip:.+([0-9]{4})@
To = sip:.+%1@
deploy:
$action = 403 |
|
Back to top |
|
redmiru Brekeke Member
Joined: 12 Feb 2012 Posts: 19
|
Posted: Mon Feb 13, 2012 5:26 pm Post subject: Thank you! It works perfectly! |
|
|
Thank you Hope! It works!
hope wrote: |
matching
$request = ^INVITE
From = sip:.+([0-9]{4})@
To = sip:.+%1@
deploy:
$action = 403 |
|
|
Back to top |
|
|