Author |
Message |
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 37
Location: Guilford, CT
|
Posted: Fri Jan 03, 2014 2:07 pm Post subject: $route.underlimit method - specify response |
|
|
1. Brekeke Product Name and Version:
3.2.4.3 Advanced
2. Java version:
1.6.0_45-b06
3. OS type and the version:
RHEL 5
4. UA (phone), gateway or other hardware/software involved:
5. Your problem:
Using the $route.underlimit method, when the limit is reached I see a "404 Not Found" is sent back to the UA. Is there a way to configure what failure response is sent back, i.e. like 503 Service Unavailable?
Matching Patterns | $request = ^INVITE To = sip:(\+)(1203)(.+) $route.underlimit( "%2", "2" ) = true
| Deploy Patterns | $routename = %2 $continue = true
|
Thanks,
Mike |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 501
|
Posted: Sun Jan 05, 2014 2:02 am Post subject: |
|
|
Matching Patterns | $request = ^INVITE To = sip:(\+)(1203).+ $route.underlimit( "%2", "2" ) = false
| Deploy Patterns | $response = 503
|
|
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 37
Location: Guilford, CT
|
Posted: Tue Jan 07, 2014 12:49 pm Post subject: |
|
|
James,
Thanks, but when I use that plan false is never returned as a value, regardless of how many concurrent calls I make through the server, e.g. with 4 concurrent sessions the following is still returned:
Pattern: $route.underlimit( "%2", "2" ) = false
Input: $route.underlimit( "1203", "2" ) = true
Result: false
Thanks,
Mike |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Tue Jan 07, 2014 1:15 pm Post subject: |
|
|
is the call applied rule with route.underlimit?
put reject rule under the rule with underlimit is true |
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 37
Location: Guilford, CT
|
Posted: Thu Jan 09, 2014 12:46 pm Post subject: |
|
|
Hope/James,
Thanks for the help. I was able to accomplish this using two dial plan entries:
1st
Matching Patterns | $request = ^INVITE $addr = ^172\.16\.2\. To = sip:(\+)(1203)(.+) $route.underlimit( "outbound", "2" ) = true
| Deploy Patterns | $routename = outbound $continue = true
|
2nd
Matching Patterns | $request = ^INVITE $addr = ^172\.16\.2\. To = sip:(\+)(1203)(.+) $if($route.underlimit( "outbound", "2" ), "true", "false") = false
| Deploy Patterns | $routename = outbound $action = 503
|
This works as expected, however if you can think of another way to do it, or by combining the two entries into one, I'm all ears.
Regards,
Mike |
|
Back to top |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Thu Jan 09, 2014 12:58 pm Post subject: |
|
|
Changed a little.
Rule-1:
Matching Patterns | $request = ^INVITE $addr = ^172\.16\.2\. To = sip:\+1203.+ $route.underlimit("outbound","2") = false
| Deploy Patterns | $response = 503
|
Rule-2:
Matching Patterns | $request = ^INVITE $addr = ^172\.16\.2\. To = sip:\+1203.+
| Deploy Patterns | $routename = outbound $continue = true
|
|
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 37
Location: Guilford, CT
|
Posted: Mon Jan 13, 2014 8:55 am Post subject: |
|
|
Thanks JanP.
One more question -
When the concurrent call limit is reached and dial plan rule returns the 503 I don't see any evidence of that in the Brekeke server logs. I can can only see the SIP response when using a sniffer (wireshark / tcpdump). Is there a way to expose this so it's logged for later reviewing?
I noticed the same issue exists when also using the $sps method.
Thanks,
Mike |
|
Back to top |
|
hope Brekeke Master Guru
Joined: 15 Jan 2008 Posts: 862
|
Posted: Mon Jan 13, 2014 11:52 am Post subject: |
|
|
is it in error log page? |
|
Back to top |
|
vinylmike Brekeke Addict
Joined: 13 Dec 2012 Posts: 37
Location: Guilford, CT
|
Posted: Mon Jan 13, 2014 12:32 pm Post subject: |
|
|
Ahh, indeed it is , on our >3.2.2.3 version hosts. That'll work, thanks! |
|
Back to top |
|
davi Brekeke Addict
Joined: 26 Jan 2011 Posts: 34
|
Posted: Mon Jan 13, 2014 10:10 pm Post subject: |
|
|
If you use $log in Deploy Pattern, you can write own log message in sv.xxx.log file.
Find "$log" in the http://www.brekeke.com/doc/sip/sip_admin_v3.pdf
For example...
Deploy Patterns | $response = 503 $log = WARNING! Call limit is reached!! Return 503 to %{$addr}.
|
|
|
Back to top |
|
|