Media Description - Can values be used for routing purposes?
Moderator: Brekeke Support Team
Media Description - Can values be used for routing purposes?
1. Brekeke Product Name and version:
Brekeke Sip Server 2.0
2. Java version:
jre1.6
3. OS type and the version:
Centos 5.6 (Best Linux Distro on EARTH)
4. UA (phone), gateway or other hardware/software involved:
N/A
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
Enterprise
6. Your problem:
Hi Team!
I just wanted to ask in the "Media Description" Line (Name and Address,etc in wireshark pcap) with the SDP, can the values in that line be used for routing purposes on Brekeke Sip Server? Please advise.
Thank you for your assistance!
Kent C.
Brekeke Sip Server 2.0
2. Java version:
jre1.6
3. OS type and the version:
Centos 5.6 (Best Linux Distro on EARTH)
4. UA (phone), gateway or other hardware/software involved:
N/A
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
Enterprise
6. Your problem:
Hi Team!
I just wanted to ask in the "Media Description" Line (Name and Address,etc in wireshark pcap) with the SDP, can the values in that line be used for routing purposes on Brekeke Sip Server? Please advise.
Thank you for your assistance!
Kent C.
If SDP's m= line doesn't have the value 0 (g711), return 503.
Code: Select all
[Matching Patterns]
$request = ^INVITE
$sdp.audio("m") = !RTP/AVP.* 0
[Deploy Patterns]
$action = 503
I have tried such and met with little success:lakeview wrote:If SDP's m= line doesn't have the value 0 (g711), return 503.
Code: Select all
[Matching Patterns] $request = ^INVITE $sdp.audio("m") = !RTP/AVP.* 0 [Deploy Patterns] $action = 503
Code: Select all
m=audio 32050 RTP/AVP 18 101
c=IN IP4 MY.IP.ADDY.HERE
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
Code: Select all
[Matching Patterns]
$addr=IP\.IP\.IP\.IP
$request=INVITE
$sdp.audio("m")=!RTP/AVP.* 0
[Deploy Patterns]
$action = 503
Hi again.
Here is how the call breaks down:
[1] Carrier > [2] Main Production Inbound Brekeke Proxy [Public IP] > [3] Second Brekeke Proxy [Private IP] > [4] Netsapiens Virtual IP server [Termination]
1. Originates from ITSP
2. Traffic is routed to brekeke proxy
3. IMPORTANT *This is where the dial-plan is built, matching is from main brekeke,deploy is to Netsapiens Server*
4. Final routing which terms to a virtual IP/PBX
Please advise as all the suggested features have yet to be established. I'm desperate here team!
Kent C.
Here is how the call breaks down:
[1] Carrier > [2] Main Production Inbound Brekeke Proxy [Public IP] > [3] Second Brekeke Proxy [Private IP] > [4] Netsapiens Virtual IP server [Termination]
1. Originates from ITSP
2. Traffic is routed to brekeke proxy
3. IMPORTANT *This is where the dial-plan is built, matching is from main brekeke,deploy is to Netsapiens Server*
4. Final routing which terms to a virtual IP/PBX
Please advise as all the suggested features have yet to be established. I'm desperate here team!
Kent C.
> 3. IMPORTANT *This is where the dial-plan is built, matching is from main brekeke,deploy is to Netsapiens Server*
Which version of Brekeke SIP Server is it?
It must be Brekeke 3.0 or later if you use $sdp.audio.
The following rule will work at both ver 3 and 2.
Which version of Brekeke SIP Server is it?
It must be Brekeke 3.0 or later if you use $sdp.audio.
The following rule will work at both ver 3 and 2.
Code: Select all
[Matching Patterns]
$request = ^INVITE
$body("(m=audio .+)") = !RTP/AVP.* 0
[Deploy Patterns]
$action = 503
Hey everyone,
I've tested all the above, and nothing has worked on V2.
Can you please advise what else could be done here?
Matching Patterns
$addr=XX\.XX\.XX\.XX
$request=INVITE
$body("(m=audio .+)")=!RTP/AVP.* 0
Deploy Patterns
$action=503
&net.sip.loglevel.file=255
I'm going to retry on v3 and post results shortly.
I've tested all the above, and nothing has worked on V2.
Can you please advise what else could be done here?
Matching Patterns
$addr=XX\.XX\.XX\.XX
$request=INVITE
$body("(m=audio .+)")=!RTP/AVP.* 0
Deploy Patterns
$action=503
&net.sip.loglevel.file=255
I'm going to retry on v3 and post results shortly.
Team,
Here is the update:
I used this and was able to finally get the 503:
Matching Patterns
$request=^INVITE
$body("(m=audio .+)")=!RTP/AVP.* 18 0 101
Deploy Patterns
$action=503
&net.sip.loglevel.file=255
This is PROGRESS. Thanks for the tip Harold. That was a win here. It looks in the patterns above like its spaced, but that $body is closed in together on the syntax, that worked. I just outta curiousity tried the extra codecs on accident and got the 503.
Now that we know that definitely works that way, I need to know
what I'm doing that I need to approach to get this as my final results:
We want it to route if it contains 0=PCMU/G711U but 503 if it doesn't.
I will continue to jump all over, please continue to help EVERYONE. You guys are amazing...I mean it...Thanks for making this SIP stuff doable..[/code]
Here is the update:
I used this and was able to finally get the 503:
Matching Patterns
$request=^INVITE
$body("(m=audio .+)")=!RTP/AVP.* 18 0 101
Deploy Patterns
$action=503
&net.sip.loglevel.file=255
This is PROGRESS. Thanks for the tip Harold. That was a win here. It looks in the patterns above like its spaced, but that $body is closed in together on the syntax, that worked. I just outta curiousity tried the extra codecs on accident and got the 503.
Now that we know that definitely works that way, I need to know
what I'm doing that I need to approach to get this as my final results:
We want it to route if it contains 0=PCMU/G711U but 503 if it doesn't.
I will continue to jump all over, please continue to help EVERYONE. You guys are amazing...I mean it...Thanks for making this SIP stuff doable..[/code]
Ok, not sure why, but i've configured it exactly like V2, i moved the .tbl from v2 sip server to v3 and overwrite on the dialplan.tbl on the v3.Harold wrote:The above rule with $body should work on version 2.
If you use $sdp.audio, the SIP Server must be version 3.
I tried the following with several configurations to only get 404:
Matching Patterns
$request = ^INVITE
$sdp.audio("(m=audio .+)") = !RTP/AVP.* 0
Deploy Patterns
$action = 503
&net.sip.loglevel.file = 255
For the Top rule and here is dialplan that keeps not working for some reason even though I used the v2 .tbl.
Matching Patterns
$addr=IP\.IP\.IP\.IP
$request=INVITE
From=sip:(.+)
Deploy Patterns
To=sip:MYDIDPHONENUMBER@TERMIP
$rtp=true
Please advise again. Thanks!
Kent C.
> $body("(m = audio .+)")=!RTP/AVP.* 18 0 101
It seems you still have spaces with "m=" definition.
The RFC4566 http://tools.ietf.org/html/rfc4566 which defines SDP said:
Whitespace MUST NOT be used on either side of the "=" sign.
Set
$body("(m=audio .+)")
instead of
$body("(m = audio .+)")
It seems you still have spaces with "m=" definition.
The RFC4566 http://tools.ietf.org/html/rfc4566 which defines SDP said:
Whitespace MUST NOT be used on either side of the "=" sign.
Set
$body("(m=audio .+)")
instead of
$body("(m = audio .+)")
> We want it to route if it contains 0=PCMU/G711U but 503 if it doesn't.
This is the rule.
Note:
$body("(m=audio .+)") must be in the [Variable] part.
!RTP/AVP.* 0 must be in the [Value] part.
This is the rule.
Code: Select all
[Matching Patterns]
$request = ^INVITE
$body("(m=audio .+)") = !RTP/AVP.* 0
[Deploy Patterns]
$action = 503
$body("(m=audio .+)") must be in the [Variable] part.
!RTP/AVP.* 0 must be in the [Value] part.
> Btw, v3 is alot better,there anything else I should know about that's not in v2 that's "recommended"?
In DialPlan menu, there are new pages [Preliminary] and [History].
If you add rules under the [Preliminary], these rules will be executed for incoming requests before the SIP Server accepts them.
There is a couple of sample rules in
http://wiki.brekeke.com/wiki/Avoid-attacks
In the [History], there is the list of recently matched rules.
In DialPlan menu, there are new pages [Preliminary] and [History].
If you add rules under the [Preliminary], these rules will be executed for incoming requests before the SIP Server accepts them.
There is a couple of sample rules in
http://wiki.brekeke.com/wiki/Avoid-attacks
In the [History], there is the list of recently matched rules.
Thank you Tata! I have applied the settings now to v3 as well.
That is such a big improvement, glad they seperated those values in different sections.
Also,I have checked and applied the rule you are suggesting on v2:
Here is the SDP packet taken from my last Wireshark showing the SDP INVITE packet from sip server to the one I'm trying to regulate the 503 rule in:
Menubar>Analyze>Follow UDP Stream:
With the rule given and setup, can someone explain why this call still goes through but when i do something like 18 0 101 it's doing the 503?
Matching Patterns:
$body("(m=audio .+)") = !RTP/AVP.* 0 0
^
Even that 503's!!! What the heck!?
Matching Patterns:
$body("(m=audio .+)") = !RTP/AVP.* 0
^
Call still comes in.
2nd Q:
What does this do?
^
???
Kent C.
That is such a big improvement, glad they seperated those values in different sections.
Also,I have checked and applied the rule you are suggesting on v2:
Here is the SDP packet taken from my last Wireshark showing the SDP INVITE packet from sip server to the one I'm trying to regulate the 503 rule in:
Menubar>Analyze>Follow UDP Stream:
Code: Select all
m=audio 10004 RTP/AVP 18 0 8 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=fmtp:18 annexb=no
Matching Patterns:
$body("(m=audio .+)") = !RTP/AVP.* 0 0
^
Even that 503's!!! What the heck!?
Matching Patterns:
$body("(m=audio .+)") = !RTP/AVP.* 0
^
Call still comes in.
2nd Q:
What does this do?
Code: Select all
Media Attribute (a): rtpmap:101 telephone-event/8000
???
Kent C.