Forums Read-only archive

$route.underlimit method - specify response

10 posts · Brekeke SIP Server Forum

vinylmike Original post
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
james
Matching Patterns
$request = ^INVITE
To = sip:(\+)(1203).+
$route.underlimit( "%2", "2" ) = false

Deploy Patterns
$response = 503
vinylmike
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
hope
is the call applied rule with route.underlimit?
put reject rule under the rule with underlimit is true
vinylmike
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
janP
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
vinylmike
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
hope
is it in error log page?
vinylmike
Ahh, indeed it is :D, on our >3.2.2.3 version hosts. That'll work, thanks!
davi
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}.