Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Avoid Dead-Loop of Call Routing
Author Message
l.qian
Brekeke Member


Joined: 14 Dec 2007
Posts: 12

PostPosted: Tue Sep 01, 2009 9:59 am    Post subject: Avoid Dead-Loop of Call Routing Reply with quote

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/networkpatterns.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. Sad
Back to top
View user's profile
Haddas
Brekeke Guru


Joined: 17 Jan 2008
Posts: 170

PostPosted: Wed Sep 02, 2009 5:09 pm    Post subject: Reply with quote

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


Like this..
Matching Patterns
$request = ^INVITE
$registered( To ) = false
Deploy Patterns
$action = 603
Back to top
View user's profile
l.qian
Brekeke Member


Joined: 14 Dec 2007
Posts: 12

PostPosted: Wed Sep 02, 2009 5:55 pm    Post subject: Reply with quote

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.
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Thu Sep 03, 2009 8:15 pm    Post subject: Reply with quote

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

Use this..
Matching Patterns
$request = ^INVITE
$outbound = false
$registered( To ) = false
Deploy Patterns
$action = 603


Refer the Admin-Guide for your reference...
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Thu Sep 03, 2009 8:18 pm    Post subject: Reply with quote

The above DialPlan rule means..
If a call is not outbound and callee is not registered, the SIP Server rejects the call.
Back to top
View user's profile
l.qian
Brekeke Member


Joined: 14 Dec 2007
Posts: 12

PostPosted: Sat Sep 05, 2009 8:29 am    Post subject: Reply with quote

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.
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Wed Sep 09, 2009 3:20 pm    Post subject: Reply with quote

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


If it doesn't solve the issue, contact support@brekeke.com with detailed information.
Back to top
View user's profile
l.qian
Brekeke Member


Joined: 14 Dec 2007
Posts: 12

PostPosted: Wed Sep 09, 2009 4:01 pm    Post subject: Reply with quote

Thanks janP, that's exactly what I was looking for. $usrdir.lookup makes perfect sense and it works
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Thu Sep 10, 2009 4:07 pm    Post subject: Reply with quote

wow.. Im glad.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1