Author |
Message |
l.qian Brekeke Member
Joined: 14 Dec 2007 Posts: 12
|
Posted: Tue Sep 01, 2009 9:59 am Post subject: Avoid Dead-Loop of Call Routing |
|
|
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. |
|
Back to top |
|
Haddas Brekeke Guru
Joined: 17 Jan 2008 Posts: 170
|
Posted: Wed Sep 02, 2009 5:09 pm Post subject: |
|
|
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 |
|
l.qian Brekeke Member
Joined: 14 Dec 2007 Posts: 12
|
Posted: Wed Sep 02, 2009 5:55 pm Post subject: |
|
|
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 |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Thu Sep 03, 2009 8:15 pm Post subject: |
|
|
>> 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 |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Thu Sep 03, 2009 8:18 pm Post subject: |
|
|
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 |
|
l.qian Brekeke Member
Joined: 14 Dec 2007 Posts: 12
|
Posted: Sat Sep 05, 2009 8:29 am Post subject: |
|
|
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 |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Wed Sep 09, 2009 3:20 pm Post subject: |
|
|
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 |
|
l.qian Brekeke Member
Joined: 14 Dec 2007 Posts: 12
|
Posted: Wed Sep 09, 2009 4:01 pm Post subject: |
|
|
Thanks janP, that's exactly what I was looking for. $usrdir.lookup makes perfect sense and it works |
|
Back to top |
|
janP Brekeke Master Guru
Joined: 25 Nov 2007 Posts: 336
|
Posted: Thu Sep 10, 2009 4:07 pm Post subject: |
|
|
wow.. Im glad. |
|
Back to top |
|
|