Cannot turn to P2P when ICE enabled

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Cannot turn to P2P when ICE enabled

Post by roy.zhang »

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: Select all

c=IN IP4 192.168.0.108
and two candidates lines:

Code: Select all

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: Select all

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: Select all

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?
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Add $rtp=off in the DialPlan's DeployPattern.
It disables RTP-relay even if the SIP Server detects NAT.
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Post by roy.zhang »

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.
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Is it an UPDATE sent within an INVITE's dialog?
If so, set $request = ^INVITE.
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Post by roy.zhang »

Laurie wrote:Is it an UPDATE sent within an INVITE's dialog?
If so, set $request = ^INVITE.
Yes. The original "UPDATE" request contains

Code: Select all

c=192.168.0.108
and the forwarded "UPDATE" contains

Code: Select all

c=117.22.xx.xx
That's what I am confused.
There is only one dialplan. The "Match Pattern" is :

Code: Select all

$request = ^INVITE
and the "Deploy Patterns" are:

Code: Select all

$rtp = false
$nat = false
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

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?
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Post by roy.zhang »

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.
taitan
Posts: 237
Joined: Sat Mar 15, 2008 10:39 pm

Post by taitan »

Are INVITE and UPDATE using a same Call-ID?
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Post by roy.zhang »

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.
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Have you pushed the [Apply Rules] button after you modified the DialPlan?

There is no other DialPlan rules. Is it correct?
roy.zhang
Posts: 8
Joined: Wed Oct 28, 2015 8:31 pm
Location: China, Shaanxi

Post by roy.zhang »

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.
james
Posts: 501
Joined: Mon Dec 10, 2007 12:56 pm

Post by james »

Does the SIP server replace INVITE's "c=" line too even if you use "$rtp=false" in the DialPlan?
Post Reply