fernpass / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

Why the udp port of RTP Session is even number? #164

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using? On what operating system?

Windows 7 and CentOS 6

Please provide any additional information below.

2014-04-04 16:11:43:566212 [INFO]   Create Session 0x7fb8a8001968 <new> [uni2]
2014-04-04 16:11:43:566230 [INFO]   Remote SDP 0x7fb8a8001968 <new>
v=0
o=user1 53655765 2353687637 IN IP4 192.168.42.95
s=-
c=IN IP4 192.168.42.95
t=0 0
m=application 9 TCP/MRCPv2 1
a=resource:speechrecog
a=cmid:1
m=audio 6001 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=mid:1

2014-04-04 16:11:43:566382 [NOTICE] Add Session <c21f3540bbd011e3>
2014-04-04 16:11:43:566406 [INFO]   Receive Offer 0x7fb8a8001968 
<c21f3540bbd011e3> [c:1 a:1 v:0]
2014-04-04 16:11:43:566509 [INFO]   Add Pending Control Channel 
<c21f3540bbd011e3@speechrecog> [1]
2014-04-04 16:11:43:572146 [INFO]   Enable RTP Session 192.168.42.247:5000
2014-04-04 16:11:43:572198 [INFO]   Open RTP Receiver 192.168.42.247:5000 <- 
192.168.42.95:6001 playout [50 ms] bounds [0 - 600 ms] adaptive [1] skew 
detection [1]
2014-04-04 16:11:43:572217 [INFO]   Media Path 0x7fb8a8001968 
Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
2014-04-04 16:11:43:572292 [INFO]   Send Answer 0x7fb8a8001968 
<c21f3540bbd011e3> [c:1 a:1 v:0] Status OK
2014-04-04 16:11:43:572321 [INFO]   Local SDP 0x7fb8a8001968 <c21f3540bbd011e3>
v=0
o=PachiraMRCPServer 0 0 IN IP4 192.168.42.247
s=-
c=IN IP4 192.168.42.247
t=0 0
m=application 1544 TCP/MRCPv2
a=setup:passive
a=connection:
a=channel:c21f3540bbd011e3@speechrecog
a=cmid:1
m=audio 5000 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv
a=mid:1

2014-04-04 16:11:43:572733 [INFO]   Receive SIP Event [nua_i_state] Status 200 
OK
2014-04-04 16:11:43:572749 [NOTICE] SIP Call State 0x7fb8a8001968 [completed]
2014-04-04 16:11:43:664833 [INFO]   Receive SIP Event [nua_i_invite] Status 100 
Trying
2014-04-04 16:11:43:664868 [INFO]   Receive SIP Event [nua_i_state] Status 100 
Trying
2014-04-04 16:11:43:664881 [NOTICE] SIP Call State  [received]
2014-04-04 16:11:43:664902 [INFO]   Create Session 0x7fb8a8003c88 <new> [uni2]
2014-04-04 16:11:43:664912 [INFO]   Remote SDP 0x7fb8a8003c88 <new>
v=0
o=user1 53655765 2353687637 IN IP4 192.168.42.95
s=-
c=IN IP4 192.168.42.95
t=0 0
m=application 9 TCP/MRCPv2 1
a=resource:speechrecog
a=cmid:1
m=audio 6001 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=mid:1

2014-04-04 16:11:43:664967 [NOTICE] Add Session <c22e409ebbd011e3>
2014-04-04 16:11:43:664981 [INFO]   Receive Offer 0x7fb8a8003c88 
<c22e409ebbd011e3> [c:1 a:1 v:0]
2014-04-04 16:11:43:665024 [INFO]   Add Pending Control Channel 
<c22e409ebbd011e3@speechrecog> [2]
2014-04-04 16:11:43:672114 [INFO]   Enable RTP Session 192.168.42.247:5002
2014-04-04 16:11:43:672142 [INFO]   Open RTP Receiver 192.168.42.247:5002 <- 
192.168.42.95:6001 playout [50 ms] bounds [0 - 600 ms] adaptive [1] skew 
detection [1]
2014-04-04 16:11:43:672156 [INFO]   Media Path 0x7fb8a8003c88 
Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
2014-04-04 16:11:43:672192 [INFO]   Send Answer 0x7fb8a8003c88 
<c22e409ebbd011e3> [c:1 a:1 v:0] Status OK
2014-04-04 16:11:43:672213 [INFO]   Local SDP 0x7fb8a8003c88 <c22e409ebbd011e3>
v=0
o=PachiraMRCPServer 0 0 IN IP4 192.168.42.247
s=-
c=IN IP4 192.168.42.247
t=0 0
m=application 1544 TCP/MRCPv2
a=setup:passive
a=connection:
a=channel:c22e409ebbd011e3@speechrecog
a=cmid:1
m=audio 5002 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv
a=mid:1

2014-04-04 16:11:43:672526 [INFO]   Receive SIP Event [nua_i_state] Status 200 
OK
2014-04-04 16:11:43:672540 [NOTICE] SIP Call State 0x7fb8a8003c88 [completed]
2014-04-04 16:12:15:573200 [INFO]   Receive SIP Event [nua_i_error] Status 408 
ACK Timeout
2014-04-04 16:12:15:573441 [INFO]   Receive SIP Event [nua_i_state] Status 0 
ACK Timeout
2014-04-04 16:12:15:573457 [NOTICE] SIP Call State 0x7fb8a8001968 [terminating]
2014-04-04 16:12:15:574288 [INFO]   Receive SIP Event [nua_r_bye] Status 200 OK
2014-04-04 16:12:15:574304 [INFO]   Receive SIP Event [nua_i_state] Status 200 
to BYE
2014-04-04 16:12:15:574315 [NOTICE] SIP Call State 0x7fb8a8001968 [terminated]
2014-04-04 16:12:15:574335 [INFO]   Receive SIP Event [nua_i_terminated] Status 
200 to BYE
2014-04-04 16:12:15:574339 [INFO]   Deactivate Session 0x7fb8a8001968 
<c21f3540bbd011e3>
2014-04-04 16:12:15:574358 [INFO]   Terminate Session 0x7fb8a8001968 
<c21f3540bbd011e3>
2014-04-04 16:12:15:574390 [NOTICE] Remove Session <c21f3540bbd011e3>
2014-04-04 16:12:15:574404 [INFO]   Remove Control Channel 
<c21f3540bbd011e3@speechrecog> [1]
2014-04-04 16:12:15:582004 [INFO]   Close RTP Receiver 192.168.42.247:5000 <- 
192.168.42.95:6001 [r:236 l:0 j:0 p:50 d:0 i:236]
2014-04-04 16:12:15:582024 [INFO]   Remove RTP Session 192.168.42.247:5000
2014-04-04 16:12:15:582061 [INFO]   Session Terminated 0x7fb8a8001968 
<c21f3540bbd011e3>
2014-04-04 16:12:15:582089 [NOTICE] Destroy Session <c21f3540bbd011e3>
2014-04-04 16:12:15:672215 [INFO]   Receive SIP Event [nua_i_error] Status 408 
ACK Timeout
2014-04-04 16:12:15:672349 [INFO]   Receive SIP Event [nua_i_state] Status 0 
ACK Timeout
2014-04-04 16:12:15:672362 [NOTICE] SIP Call State 0x7fb8a8003c88 [terminating]
2014-04-04 16:12:15:673189 [INFO]   Receive SIP Event [nua_r_bye] Status 200 OK
2014-04-04 16:12:15:673205 [INFO]   Receive SIP Event [nua_i_state] Status 200 
to BYE
2014-04-04 16:12:15:673216 [NOTICE] SIP Call State 0x7fb8a8003c88 [terminated]
2014-04-04 16:12:15:673230 [INFO]   Receive SIP Event [nua_i_terminated] Status 
200 to BYE
2014-04-04 16:12:15:673233 [INFO]   Deactivate Session 0x7fb8a8003c88 
<c22e409ebbd011e3>
2014-04-04 16:12:15:673248 [INFO]   Terminate Session 0x7fb8a8003c88 
<c22e409ebbd011e3>
2014-04-04 16:12:15:673270 [NOTICE] Remove Session <c22e409ebbd011e3>
2014-04-04 16:12:15:673274 [INFO]   Remove Control Channel 
<c22e409ebbd011e3@speechrecog> [0]
2014-04-04 16:12:15:682001 [INFO]   Close RTP Receiver 192.168.42.247:5002 <- 
192.168.42.95:6001 [r:236 l:0 j:0 p:50 d:0 i:236]
2014-04-04 16:12:15:682015 [INFO]   Remove RTP Session 192.168.42.247:5002
2014-04-04 16:12:15:682053 [INFO]   Session Terminated 0x7fb8a8003c88 
<c22e409ebbd011e3>
2014-04-04 16:12:15:682076 [NOTICE] Destroy Session <c22e409ebbd011e3>
2014-04-04 16:18:18:091839 [INFO]   Receive SIP Event [nua_i_invite] Status 100 
Trying
2014-04-04 16:18:18:091917 [INFO]   Receive SIP Event [nua_i_state] Status 100 
Trying
2014-04-04 16:18:18:091934 [NOTICE] SIP Call State  [received]
2014-04-04 16:18:18:091958 [INFO]   Create Session 0x7fb8a8001968 <new> [uni2]
2014-04-04 16:18:18:091971 [INFO]   Remote SDP 0x7fb8a8001968 <new>
v=0
o=user1 53655765 2353687637 IN IP4 192.168.42.95
s=-
c=IN IP4 192.168.42.95
t=0 0
m=application 9 TCP/MRCPv2 1
a=resource:speechrecog
a=cmid:1
m=audio 6001 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=mid:1

2014-04-04 16:18:18:092040 [NOTICE] Add Session <ad470bf6bbd111e3>
2014-04-04 16:18:18:092060 [INFO]   Receive Offer 0x7fb8a8001968 
<ad470bf6bbd111e3> [c:1 a:1 v:0]
2014-04-04 16:18:18:092118 [INFO]   Add Pending Control Channel 
<ad470bf6bbd111e3@speechrecog> [1]
2014-04-04 16:18:18:102133 [INFO]   Enable RTP Session 192.168.42.247:5004
2014-04-04 16:18:18:102158 [INFO]   Open RTP Receiver 192.168.42.247:5004 <- 
192.168.42.95:6001 playout [50 ms] bounds [0 - 600 ms] adaptive [1] skew 
detection [1]
2014-04-04 16:18:18:102173 [INFO]   Media Path 0x7fb8a8001968 
Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
2014-04-04 16:18:18:102216 [INFO]   Send Answer 0x7fb8a8001968 
<ad470bf6bbd111e3> [c:1 a:1 v:0] Status OK
2014-04-04 16:18:18:102240 [INFO]   Local SDP 0x7fb8a8001968 <ad470bf6bbd111e3>
v=0
o=PachiraMRCPServer 0 0 IN IP4 192.168.42.247
s=-
c=IN IP4 192.168.42.247
t=0 0
m=application 1544 TCP/MRCPv2
a=setup:passive
a=connection:
a=channel:ad470bf6bbd111e3@speechrecog
a=cmid:1
m=audio 5004 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=sendrecv
a=mid:1

--------------------------------------------------------------------------------
--------------------------------------------------

I found that the code 'rtp_config->rtp_port_cur += 2;' in the C file named 
mpf_rtp_stream.c and I would like to know why the udp port of RTP Session is 
even number,like that 'Enable RTP Session 192.168.42.247:5004'.
But during the mrcp is in progress,I execute the command 'netstat -anp | grep 
mrcp' and find that the udp port used by mrcp like that:

udp        0      0 192.168.42.247:5112         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5113         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5114         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5115         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5116         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5117         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5118         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5119         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5120         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5121         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5122         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5123         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5124         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5125         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5126         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5127         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5128         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5129         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5070         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5071         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5072         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5073         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5074         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5075         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5076         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5077         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5078         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5079         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5080         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5081         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5082         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5083         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5084         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5085         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5086         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5087         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5088         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5089         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5090         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5091         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5092         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5093         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5094         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5095         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5096         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5097         0.0.0.0:*                       
        31309/mrcp 
udp        0      0 192.168.42.247:5098         0.0.0.0:*                       
        31309/mrcp

Why the odd number of udp port is still be used?

Original issue reported on code.google.com by chengchu...@gmail.com on 4 Apr 2014 at 9:31

Attachments:

GoogleCodeExporter commented 8 years ago
As specified in the RTP protocol definition, RTP data is to be carried on an 
even UDP port number and the corresponding RTCP packets are to be carried on 
the next higher (odd) port number.

So, a pair of UDP ports is used per SDP m=audio description regardless of RTCP 
being actually used or not.

Original comment by achalo...@gmail.com on 8 Apr 2014 at 2:43

GoogleCodeExporter commented 8 years ago
achaloyan@gmail.com,thanks for your answer. Now,I see.

Original comment by chengchu...@gmail.com on 8 Apr 2014 at 9:53

GoogleCodeExporter commented 8 years ago

Original comment by achalo...@gmail.com on 11 Apr 2014 at 9:06