$route.underlimit method - specify response

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

$route.underlimit method - specify response

Post by vinylmike »

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
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

Matching Patterns
$request = ^INVITE
To = sip:(\+)(1203).+
$route.underlimit( "%2", "2" ) = false

Deploy Patterns
$response = 503
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by 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
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

is the call applied rule with route.underlimit?
put reject rule under the rule with underlimit is true
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by 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
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by 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
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by 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
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

is it in error log page?
vinylmike
Posts: 37
Joined: Thu Dec 13, 2012 12:25 pm
Location: Guilford, CT

Post by vinylmike »

Ahh, indeed it is :D, on our >3.2.2.3 version hosts. That'll work, thanks!
davi
Posts: 34
Joined: Wed Jan 26, 2011 4:34 pm

Post by 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}.
Post Reply