>> is this normal to send RTP packets from the local port = *5060(SIP PORT)* >> with remote port = *18564 *and receive RTP packets from SIP Server on local >> port = *22456 * with remote port = *18564. You are confusing 2 separate things: 1. there is a SIP signalling port 5060 - this is used only to receive SIP messages 2. there is a RTP port 22456
Your RTP packets should use the local RTP port (22456) as the RTP port. 1. SIP and RTP are separate 2. SIP and RTP use separate ports 3. do not mix SIP and RTP ports - in your example you used the SIP port as the local RTP port - this will not work! I hope this helps Regards Attila -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Siga Sent: 07 March 2011 17:32 To: [email protected] Subject: [Sip-implementors] Ports for sending and receiving RTP packets! Hi, I am facing rather a strange problem with the ports for sending and receiving RTP packets. This is the second time I am posting my question. Initially I am able to set up a SIP Client successfully SIP CLIENT SIP SERVER (1.2.3.4) (3.4.5.6) INVITE: 1.2.3.4:5060 --------------------------------------------> 100 Trying: 3.4.5.6 <--------------------------------------------- 200 OK: 3.4.5.6 <-------------------------------------------- ACK: 1.2.3.4:5060 --------------------------------------------> RTP Packets --------------------------------------------> Here comes the problem: my SIP Client INVITE looks like this "INVITE sip:[email protected]/2.0\r\n" "Via:SIP/2.0/UDP 192.168.x.000:5060;branch=z9hG4bKdg18\r\n" "Max-Forwards: 70\r\n" "To: server <sip:[email protected]>\r\n" "From: User<sip:[email protected]>; tag = 76341\r\n" "Call-ID: [email protected]@192.168.x.x\r\n" "CSeq: 1 INVITE\r\n" "Contact: <sip:[email protected]>\r\n" "Content-Type: application/sdp\r\n" "Content-Length:142\r\n"; "\r\n" "v=0\r\n" "o=User 53655765 2353687637 IN IP4 192.168.x.000\r\n" "s=-\r\n" "c=IN IP4 192.168.x.000\r\n" "t=0 0\r\n" "*m=audio 22456 *RTP/AVP 0 8\r\n" "m=video 51372 RTP/AVP 98 49\r\n" "a=rtpmap:0 PCMA/8000\r\n" "a=rtpmap:98 H263-1999/90000\r\n"; that is here I am mentioning that I am available on the port = *22456 , *for receiving RTP packets. On the other hand from the *200 OK SDP* which I get from the *SIP Server* I am parsing the audio port number = *18564 *which I use to send the audio RTP packets from the Client side. Until here everything is fine, but when I try to bind my client to the local address(1.2.3.4) and port number, there are two scenarios 1. If I bind my client to the local port = *22456, *this is how I am doing* **Local.sin_port = 22456**; *When I have done like this* *I cant send anything to the SIP Server, after time out SIP Server sends BYE to the SIP Client. 2. If I bind my client to the local port = *5060 (SIP PORT), **Local.sin_port = 5060**; *When I have done like this* *I can send RTP packets to the SIP Server and there is a constant flow of packets which I can capture and view using Wireshark. For both the above cases, I am declaring the remote port for the Server in this manner* remote.sin_port = **18564 * is this normal to send RTP packets from the local port = *5060(SIP PORT)* with remote port = *18564 *and receive RTP packets from SIP Server on local port = *22456 * with remote port = *18564. *I am really confused here*. *If I am doing something wrong then please correct me*. *If you need any further information then please let me know. Regards* * _______________________________________________ Sip-implementors mailing list [email protected] https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors _______________________________________________ Sip-implementors mailing list [email protected] https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
