Avoid Dead-Loop of Call Routing

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
l.qian
Posts: 12
Joined: Fri Dec 14, 2007 1:17 pm

Avoid Dead-Loop of Call Routing

Post by l.qian »

1. Brekeke Product Name and version:
Brekeke SIP Server , Version 2.3.6.0 Standard

2. Java version:
1.5

3. OS type and the version: Windows 2003 Server Standard

4. UA (phone), gateway or other hardware/software involved: Cisco 5400

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html : Pattern 4

6. Your problem: When an UA is unplugged, the call for that UA hits the SIP Proxy server, and the proxy would route the call back to the gateway, and the call comes in again... which forms a dead-loop. What do we do in dial plan to ensure all calls for numbers served off this proxy server to either ring the UA or busy if they are not active? Basically we don't want to forward calls further to default gateway for those in the users list, either ring the UA if active or reject the call if not active. :(
Haddas
Posts: 170
Joined: Thu Jan 17, 2008 11:55 am

Post by Haddas »

use "$registered( To ) = false" in Matching Pattern to reject such a call.


Like this..
Matching Pattern
$request = ^INVITE
$registered( To ) = false

Deploy Pattern
$action = 603
l.qian
Posts: 12
Joined: Fri Dec 14, 2007 1:17 pm

Post by l.qian »

Thanks Haddas for the reply. If a UA is making an outbound call into the PSTN, wouldn't that $registered( To ) = false condition be true as well? That would cause the call to fail, is that true?

We know we can do a dial plan rule for each authorized user (whether registered or not) and say if it is not registered, ring busy, but when you have a large number of them, it's a pain, and we thought there must be a better way.
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

>> If a UA is making an outbound call into the PSTN,

Use this..
--------
Matching Pattern
$request = ^INVITE
$outbound = false
$registered( To ) = false

Deploy Pattern
$action = 603
--------

Refer the Admin-Guide for your reference...
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

The above DialPlan rule means..
If a call is not outbound and callee is not registered, the SIP Server rejects the call.
l.qian
Posts: 12
Joined: Fri Dec 14, 2007 1:17 pm

Post by l.qian »

it does not work, $outbound is false for any calls made from an UA to the PSTN before it hits the gateway, since the IP address in the "to" field is the proxy itself. As a result, all outgoing calls are bounced back with 603

the problem is the sip server does not provide a way to evaluate if a destination number belongs to an authorized user.
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

Try this..
--------
Matching Pattern
$request = ^INVITE
$outbound = false
$registered( To ) = false
To = sip:(.+)@
$usrdir.lookup( "%1" ) = true

Deploy Pattern
$action = 603
--------

If it doesn't solve the issue, contact support@brekeke.com with detailed information.
l.qian
Posts: 12
Joined: Fri Dec 14, 2007 1:17 pm

Post by l.qian »

Thanks janP, that's exactly what I was looking for. $usrdir.lookup makes perfect sense and it works
janP
Posts: 336
Joined: Sun Nov 25, 2007 2:55 pm

Post by janP »

wow.. Im glad.
Post Reply