Author |
Message |
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Fri Nov 06, 2015 12:50 am Post subject: Cannot turn to P2P when ICE enabled |
|
|
1. Brekeke Product Name and Version:
Brekeke SIP Server, Version 3.5.2.8, Evaluation
2. Java version:
1.7.0_65 (OpenJDK 64-Bit Server VM)
3. OS type and the version:
CentOS Linux release 6.0 (Final)
Linux 2.6.32-279.14.1.el6.x86_64
4. UA (phone), gateway or other hardware/software involved:
PJSIP
5. Your problem:
I enabled ICE and there were two UAs behind the same NAT. UA-1 made a call to UA-2. After the session was set up, an "UPDATE" request was sent from UA-1 to SIP server with SDP containing
Code: |
c=IN IP4 192.168.0.108 |
and two candidates lines:
Code: |
a=candidate:Hc0a8006c 1 UDP 2130706431 192.168.0.108 57166 typ host
a=candidate:Hc0a8006c 2 UDP 2130706430 192.168.0.108 48759 typ host |
But when the SIP server forwarded the UPDATE request, the "c=" line is modified:
Code: |
c=IN IP4 117.22.xxx.xxx |
where "117.22.xxx.xxx" was the server's IP address, while the candidate lines remained the same as before. So this failed the P2P communicating.
Some of the SIP server's configurations are listed here:
Code: |
SIP / NAT traversal
Keep address/port mapping: on
Interval (ms): 12000
Method: OPTIONS
Add 'rport' parameter (Send): off
Add 'rport' parameter (Receive): off
RTP / RTP exchanger
RTP relay: auto
RTP relay (UA on this machine): off
RTP relay even with ICE: no
Send UA's remote address: auto
Send before receiving (behind NAT): no
|
Is there anything wrong with the configurations? |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Fri Nov 06, 2015 4:49 pm Post subject: |
|
|
Add $rtp=off in the DialPlan's DeployPattern.
It disables RTP-relay even if the SIP Server detects NAT. |
|
Back to top |
|
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Sun Nov 08, 2015 8:34 pm Post subject: |
|
|
Laurie wrote: |
Add $rtp=off in the DialPlan's DeployPattern.
It disables RTP-relay even if the SIP Server detects NAT. |
How should I set the "Matching Patterns"? I just left it empty and it just did not work. I could not set "$request" to "^UPDATE". Thanks. |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Sun Nov 08, 2015 9:55 pm Post subject: |
|
|
Is it an UPDATE sent within an INVITE's dialog?
If so, set $request = ^INVITE. |
|
Back to top |
|
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Sun Nov 08, 2015 10:57 pm Post subject: |
|
|
Laurie wrote: |
Is it an UPDATE sent within an INVITE's dialog?
If so, set $request = ^INVITE. |
Yes. The original "UPDATE" request contains
and the forwarded "UPDATE" contains
That's what I am confused.
There is only one dialplan. The "Match Pattern" is :
and the "Deploy Patterns" are:
Code: |
$rtp = false
$nat = false |
|
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Mon Nov 09, 2015 9:32 pm Post subject: |
|
|
Are you sure the above DialPlan rule is executed?
It seems $rtp=false is not called.
Check it at the DialPlan History page.
> c=117.22.xx.xx
Is it the caller side's global IP address?
Or is it the SIP Server's IP address? |
|
Back to top |
|
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Mon Nov 09, 2015 10:49 pm Post subject: |
|
|
taitan wrote: |
Are you sure the above DialPlan rule is executed?
It seems $rtp=false is not called.
Check it at the DialPlan History page.
> c=117.22.xx.xx
Is it the caller side's global IP address?
Or is it the SIP Server's IP address? |
From the DialPlan History, the above was executed on "INVITE" request, but not "UPDATE" request. "117.22.xx.xx" is the SIP Server's IP address. |
|
Back to top |
|
taitan Brekeke Master Guru
Joined: 15 Mar 2008 Posts: 237
|
Posted: Tue Nov 10, 2015 10:52 pm Post subject: |
|
|
Are INVITE and UPDATE using a same Call-ID? |
|
Back to top |
|
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Wed Nov 11, 2015 12:36 am Post subject: |
|
|
taitan wrote: |
Are INVITE and UPDATE using a same Call-ID? |
Yes. Same Call-ID. I donot know how to attach a file to this thread and I can figoure out that:
1. If the server's IP is 192.168.6.xxx, and the UAs' IP are 192.168.0.xxx which are behind a Router that is at the same subnet as the SIP server, say the SIP server's IP is 192.168.6.2 and the Router's IP is 192.168.6.3, the SIP server would not modify the "c=" line in the SDP, although the SIP server and UAs are not in the same subnet.
2. If not, the SIP server would change the "c=" line whatever. |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Wed Nov 11, 2015 10:35 am Post subject: |
|
|
Have you pushed the [Apply Rules] button after you modified the DialPlan?
There is no other DialPlan rules. Is it correct? |
|
Back to top |
|
roy.zhang Brekeke Junior Member
Joined: 28 Oct 2015 Posts: 8
Location: China, Shaanxi
|
Posted: Wed Nov 11, 2015 6:21 pm Post subject: |
|
|
Laurie wrote: |
Have you pushed the [Apply Rules] button after you modified the DialPlan? |
Yes, I have. And from the history page, I can see the Rule has already taken effect, but on "INVITE" requests. My sessions were modified through "UPDATE" in-dialog and the rule just did not impact them.
Laurie wrote: |
There is no other DialPlan rules. Is it correct? |
Yes. Exactly ONE rule. |
|
Back to top |
|
james Brekeke Master Guru
Joined: 10 Dec 2007 Posts: 501
|
Posted: Wed Nov 11, 2015 11:52 pm Post subject: |
|
|
Does the SIP server replace INVITE's "c=" line too even if you use "$rtp=false" in the DialPlan? |
|
Back to top |
|
|