Author |
Message |
AllstateTelecom Brekeke Junior Member
Joined: 30 Aug 2011 Posts: 9
Location: Jupiter, FL
|
Posted: Tue Aug 30, 2011 7:48 pm Post subject: Alias call without modifying To header |
|
|
1. Brekeke Product Name and version: Sip Server Advanced 2.4.8.6/286.3
2. Java version: 1.7.0
3. OS type and the version: Centos 5.6 (Linux 2.6.18-238.19.1.el5
4. UA (phone), gateway or other hardware/software involved: PBXNSIP IP_PBX
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/networkpatterns.html :
6. Your problem:
Hello,
I just started using SIP Server, coming from OpenSIPS. I'm running into a problem where I need to setup an alias, have it forward to a registered user, but keep the to field as the alias.
Example:
Call comes in to 444-555-6666 which is an alias for 111-222-3333
The header currently reads as follows:
Code: |
INVITE: sip:1112223333@xxx.xxx.xxx.xxx:5060
TO: <sip:1112223333@xxx.xxx.xxx.xxx:5060> |
The header needs to look as follows:
Code: |
INVITE: sip:1112223333@xxx.xxx.xxx.xxx:5060
TO: <sip:4445556666@xxx.xxx.xxx.xxx:5060> |
Our PBX determines what extension to send the call to based on the To field. So we need the alias to be displayed in the to field and the registered number to be displayed in the INVITE request-uri. Does anyone know of a way to do this?
The current dial plan rule is as follows:
Matching Pattern:$request=^INVITE
To=sip:(.+)@
$alias.lookup("%1")=(.+)
Deploy Patterns | To = sip:%2@
|
Thanks,
Brian[/u] |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Wed Aug 31, 2011 12:43 am Post subject: |
|
|
Matching Patterns | $request = ^INVITE $getUri(To) = sip:(.+)@(.+) $alias.lookup("%1") = (.+) $regUri("%3") = (.+)
| Deploy Patterns | $request = INVITE %4 SIP/2.0 To = sip:%1@%2
|
Modify it as you want. |
|
Back to top |
|
AllstateTelecom Brekeke Junior Member
Joined: 30 Aug 2011 Posts: 9
Location: Jupiter, FL
|
Posted: Wed Aug 31, 2011 3:34 am Post subject: |
|
|
Thanks for the fast reply Taitan.
It doesn't quite work... It throws back a busy signal, but when I $log out all of the lines it gives me the correct info. It almost looks as if the Invite isn't actually leaving the SIP Server. When I look at the logs in the PBX that should be receiving the call, it doesn't show any communication from the SIP Server.
Here is the output from the SIP Server log:
Code: |
------------------------------
debug:Hit rule 2 (Route_In)
debug: To sip:5614272244@208.115.60.141:5060
------------------------------
debug: Hit rule 3 (Convert_Alias)
debug:INVITE sip:5617431521@208.115.60.136:5060 SIP/2.0
debug:To=sip:5614272244@208.115.60.141:5060
------------------------------ |
There is no info on the PBX log to show.
Here is exactly what the rule states:
Matching Patterns |
Code: |
$request=^INVITE
$getUri(To)=sip:(.+)@(.+)
$alias.lookup("%1")=(.+)
$regUri("%3")=(.+) |
Deploy Patterns |
Code: |
$request=INVITE %4 SIP/2.0
To=sip:%1@%2
$log=------------------------------
$log=debug: Hit rule 3 (Convert_Alias)
$log=debug:INVITE %4 SIP/2.0
$log=debug:To=sip:%1@%2
$log=------------------------------ |
| |
By the way, I did remove the To=sip%1@%2 in the Deploy Pattern leaving only the invite to see if it would make a difference and it didn't.
Any thoughts?
Thanks again for the fast response,
Brian |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Wed Aug 31, 2011 10:44 am Post subject: |
|
|
Add $regAddr in the Matching Pattern and add $target in Deploy Pattern
Matching Patterns | $request = ^INVITE
$getUri(To) = sip:(.+)@(.+)
$alias.lookup("%1") = (.+)
$regUri("%3") = (.+)
$regAddr("%3") = (.+) |
Deploy Patterns | $request = INVITE %4 SIP/2.0
To = sip:%1@%2
$target = %5
$log=------------------------------
$log=debug: Hit rule 3 (Convert_Alias)
$log=debug:INVITE %4 SIP/2.0
$log=debug:To=sip:%1@%2
$log=debug:TargetAddr=%5
$log=------------------------------ |
|
|
Back to top |
|
AllstateTelecom Brekeke Junior Member
Joined: 30 Aug 2011 Posts: 9
Location: Jupiter, FL
|
Posted: Wed Aug 31, 2011 5:21 pm Post subject: |
|
|
Thanks Taitan! That worked great.
Brian |
|
Back to top |
|
|