Having the ip address of rtp packet

Hello
How could 'I have thee ip address of a receive rtp packet?!

I think the best thing is accept new connections on a standard Socket (or ServerSocket) object and extract the remote address.
At the same time, You should apply a certain type of authentication to Your new user...

Similar Messages

  • Configuring the SSRC of RTP packets.

    Hello.
    Can I configure a Voice Gateway to set the SSRC, of all RTP packets commong from it, to a constant value, that I will define ?
    Thanks.

    check the below link for setting up the parameters in SSRC
    http://www.cisco.com/en/US/products/hw/gatecont/ps3869/products_configuration_guide_chapter09186a0080201239.html

  • Create one player to play RTP packets from many clients

    Hi,
    Am a JMF newbie and I want to create one player to play packets from many clients.
    So I wrote a small UDPserver thread within the app to receive rtp packets from the clients on the LAN which in turn forwards them to the player.
    I instatiated two threads one to forward RTP packets and another to forward RTCP packets which listens on RTPPort+1
    The reason why i do this is that i don't want the whole internet to bombard the player with anonymous voice transmissions.So the server thread is acting as a firewall. To filter out packets from from unknown ip addresses.
    this is a snippet of the player.
    MY_IPADDRESS =   InetAddress.getLocalHost().getHostAddress();+
    url = "rtp://" + MY_IPADDRESS + ":" + RTPPlayer.PORT + "/audio/1";
    MediaLocator mrl = new MediaLocator(url);
    player = Manager.createPlayer(mrl);
    More code which starts the server thread
    if (player != null) {
           player.addControllerListener(this);
           player.realize();
    player.start();When the server thread receives the packet it calls its forward method to forward the packet to the player by resetting the only the IP and PORT.
    public void forward(DatagramPacket rtpPacket) {
             //print out packet info to view which packets are being received
             System.out.println("forwarding "+request.getAddress() + " -> " + MY_IPADDRESS+":"+portToSend);
             //set address of packet to MY_IPADDRESS
           rtpPacket.setAddress(
                   InetAddress.getByName(RTPPlayer.MY_IPADDRESS));
              //set the port to the rtp port
           rtpPacket.setPort(RTPPlayer.PORT);
           datagramSocket.send(rtpPacket);
    }This works fine for two clients.
    When the clients become three(c1, c2 and c3),
    two clients communicate well(c1 and c2) but c3's voice cannot be heard on any other pc(c1 or c2) though it plays voice from both c1 and c2.
    But System.out.println("forwarding "+request.getAddress() + " -> " + MY_IPADDRESS+":"+portToSend);in the forward() method shows that packets from all clients on each pc are being received.
    Does any one have an idea why this happens?
    Are the packets so many that they overwhelm the player so it discards some or all?
    Is this the best way of doing this?
    Just to let u know all the mics are working fine.
    Thx in advance
    Edited by: noryak on Oct 29, 2008 10:29 AM

    THAT IS MY MAIN PROBLEM. In the future, please do a little bit of research before you shout at people trying to help you. I'm so so sorry if you find my answer bothersom because it sheds some light on the fact that you have absolutely no idea what you're doing.
    Your problem is that you obviously do not understand how JMF works...and you obviously havn't bothered to do any sort of research into it.
    You also don't seem to understand the concept of streaming media, concurrency, politeness, good design, proper programming, audio interleaving, or common sense.
    At least i have implemented a player playing packets from 2 different clients.Yeah, you implemented a player that plays packets from 2 different clients using a horrible workaround that doesn't treat the data correctly and manages to just drop data after scaling past 2 clients.
    Oh yeah, you've definately found the holy grail there. At least.
    You wanna know what your player is actually doing? It's playing a peice of data from A, and then a peice of data from B. It might sound like it's playing them both at the same time, but it's not. It's playing the data from one client in the gaps where there's no data, and once you've filled up the gaps in time by adding more nodes, you'll end up with data getting dropped (and that's the best case scenerio).
    my issue is that i wouldn't like to create a player for each participant imagine they were people in a conference that makes it 10 players. Please understand that if you have 10 players, you'll receive 10 times as much data as you can play with one player. You end up either having to drop 90% of your data, or having to play the data at 1/10th the speed... because you're not mixing the audio data, you're interleaving it.
    I just want to use one standard port on each client so that all clients send to the same port: The RTPManager class will allow you to receive as many streams as you want on a single port.
    As a matter of fact, had you bothered to play with any of the source code readily available online, you'd realize there is a file that does exactly what you want.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive2.java]
    It handles receiving multiple RTP streams from a single port, and plays them all simultaniously using an array of player objects.
    Does absolutely everything you want, out of the box.
    That sounds like alot of threadsIf you're concerned that it's too many threads, well, maybe you should stick to hello world and other things less scary. Concurrent data processing requires threads...one per peice of concurrent data, as a matter of fact, and you're dealing with a lot of streams of concurrent data here.

  • How to get the IP address of a new stream?

    Can anyone tell me how to get the IP address from which a newly detected RTP stream is being sent, especially when a NewReceiveStreamEvent is posted? Or, is it possible to do so?
    Thanks in advance.

    My RTPConnector follows the example from the JMF home page here: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPConnector.html
    I have not done any measurement regarding the performance of my RTPConnector implementation compare to that of the default but I did find some way to deal with the bursty nature of the default RTP transmission which caused some problem with 3rd party apps that don't handle jitter well. I created a 20ms timer that acts as a gatekeeper that allows the transmitter to send RTP packets. Unfortunately Java timers aren't very precise.
    I also improved upon (I think I did anyway) the efficiency of the default (IBM) ULaw encoder as discussed here: http://forum.java.sun.com/thread.jspa?threadID=597011
    My problems with performance issues were mainly in the speed at which processors and players are created and realized on slower PC's.

  • Could you please tell me why as a Brit resident in Japan therefore having a billing address that is Japanese is forced to only get service from the Japanese online store? Is there not some way of allowing me to select movies and music to buy and download

    Could you please tell me why as a Brit resident in Japan therefore having a billing address that is Japanese is forced to only get service from the Japanese online store? Is there not some way of allowing me to select movies and music to buy and download from other stores. Why do am i forced to try to nread Japanese when I have selected English as my language. The price for Downloads is no different and even if it was I am happy to pay. This also applies to Movie rental which is crazy and extremely restrictive. I a supposed GLOBAL community why does Apple do this.

    You can buy ONLY from the itunes store of your country of residence (As proven by valid billing address of credit card) and ONLY while inside the borders of that country.
    These are the terms of the itunes store.

  • How to use jmf convert the rtp packet (captured by jpcap) in to wav file?

    I use the jpcap capture the rtp packets(payload: ITU-T G.711 PCMU ,from voip)
    and now I want to use JMF read those data and convert in to wav file
    How to do this? please help me

    pedrorp wrote:
    Hi Captfoss!
    I fixed it but now I have another problem. My application send me this message:
    Cannot initialize audio renderer with format: LINEAR, Unknown Sample Rate, 16-bit, Mono, LittleEndian, Signed
    Unable to handle format: ALAW/rtp, Unknown Sample Rate, 8-bit, Mono, FrameSize=8 bits
    Failed to prefetch: com.sun.media.PlaybackEngine@1b45ddc
    Error: Unable to prefetch com.sun.media.PlaybackEngine@1b45ddc
    This time the fail is prefetching. I have no idea why this problem is. Could you help me?The system cant play an audio file / stream if it doesn't know the sample rate...somewhere along the way, in your code, the sample rate got lost. Sample rates are highly important, because they tell the system how fast to play the file.
    You need to go look through your code and find where the sample rate information is getting lost...

  • When i go to update my app i have to put my apple id password but instead of having my email address it has someone else's. On my computer it has my email on my itunes it has my email, and even on the app store it has my email

    when i go to update my app i have to put my apple id password but instead of having my email address it has someone else's. On my computer it has my email on my itunes it has my email, and even on the app store it has my email

    Did you purchase the iPhone second hand?
    Has anybody else signed into their Apple ID on your iPhone?

  • Anyone having the letter n pop up in Address Book Notes?  Anyone able to tell me how to keep this from happening?

    Anyone having the letter n pop up in Address Book Notes?  Anyone able to tell me how to keep this from happening?

    You can upgrade to Mavericks free, just run the App Store program and search for Mavericks. But before you do upgrade I recommend the following:
    1) make sure you have a recent backup. TimeMachine is fine.
    2) Mavericks is somewhat more memory hungry than 10.7 was. You will need 4 GB of RAM and I strongly recommend 8 GB.
    Go back to the Apple menu and select About this Mac - look under the OS info you just looked at. You'll see how much RAM your computer has now. Then click on the More Info button. There you will see your computer info listed as in: iMac, 21.5" mid 2010, for example. Return back with that information and we can tell you how far the computer can be upgraded.
    If you decide to procede and you have enough RAM upgrading to Mavericks is quite simple. Click on the download button and let it do its job.

  • Setting priority to the RTP packets

    Hi,
    I am developing a system which will use multicasting to trnamist RTP packets. To ensure the better transmission, I want to set priority to my transmitting RTP packets. My system has been developed based on AVTransmit3 and AVReceive3 provided by sun where RTPManager has been used.
    However is it possible to add special information to the RTP packets so that router underlying router will allow my packet to be transmitted first?
    A repply is badly needed...................

    Well......according to the RFC2474 and RFC2475, diffserv header can map with the precedence field of the IP header, In IP header TOS field can be mapped with DSCP field of the Diffserv Header. Now jcparques, though IP header can be diffserv capable but is their no router availble in reality which is diifserv capable?Or if I use any simulator like NS2 or other simulator which can work with java, can't I implement diffserv in rtp packet?

  • Kerberos with the host having 2 IP addresses

    We are now trying to setup Xserve G5 cluster computer system (1 head node and 6 cluster node) with OS X 10.4.3, and having trouble with Kerberos.
    Head node has two network addresses: one is static IP address of our university (en0), and the other is 192.168.1.1.(en1) Cluster node has static IP addresses from 192.168.1.2 to 7. We put the name of the head node (computer1.company.private) and the cluster nodes (computer2 to 7.company.private) and their IP addressees in the file of both head node and cluster node (/etc/hosts).
    192.168.1.1 computer1.company.private computer1
    192.168.1.2 computer2.company.private computer2
    We also set the HOSTNAME entry in /etc/hostconfig to (computer1.company.private).
    However, when I logged in as a user and
    lookupd –d
    hostWithName: computer1.company. private,
    the answer was (nil),
    hostWithInternetAddress: 192.168.1.2
    the answer was (computer2.company.private).
    In contrast, when I logged in as su, both hostWithName and hostWithInternetAddress correctly worked.
    Then we tried to configure computer1.company.private as an Open Directory master. However, KDC did not start, and realms was the number related to the static address of our university (not ‘COMPUTER1.COMPANY.PRIVATE’)
    We would appreciate it very much if you could give us kind comments and suggestions.
    XserveG5   Mac OS X (10.4.3)  

    I know nothing about clusters (and not too much about kerberos), but since you have not had a response yet...
    Does the /etc/hosts file allow the server (kerberos) todoa reverse lookup on it's IP address? I don't know exactly what mechanism it uses but I understand that it has to both resolve its hostname to IP and vice-versa. Alternative would be to use the server's DNS, I guess.
    Regarding the Kerberos realm always defaulting to the WAN address, yes this happens and I have yet to find an 'edit' anywhere which stops it (the hostconfig file is obviously not enough). I only have my own (home) test server in such circumstances and once got it to build it's realm correctly by plugging the WAN cable into an ordinary hub (by itself). I also thought that a better idea would be to promote to master before adding the 2nd NIC. But neither way was really tested completely because I soon rebuilt it to test something else.
    Hopefully someone else will chip in with something more constructive.
    -david

  • DVI/RTP packet decode

    Hi,
    I need to stream audio and/or video to a PDA device. There is a trick here which is:
    The PDA must receive the stream from a multicast address. For this I have implemented a Bridge application which joins the multicast group on behalf of the PDA and receives the Multicast RTP packets (which are sent from JMStudio) and Unicasts them to the PDA.(HP iPAQ) I had no problem implementing this. The streaming is done using JMStudio player which encodes the streaming audio data into a number of encodings (DVI/RTP in my case). I choose DVI/RTP and stream a .wav audio file.
    Now I have to accept the packets and play the stream on the PDA.
    The j2me application receives all the RTP packets successfully and I can extract usefull information from the packets such as: Timestamp, sequence number, payload type. The payload type is 5 which means it is a DVI4 encoding.
    I use the following method to decode the samples:
    public int decode(Object state, byte[] input, int inp, int len, short[] output, int outp) {
    int sign;
    int delta;
    int vpdiff;
    //int valprev = audio.Convert.byte2short(input, inp);
    //int index = input[inp + 2];
    int valprev=0,index=0;
    int inputbuffer = 0;
    int bufferstep = 0;
    valprev = input[0] <<8;
    valprev |= input[1] &0xff;
    index = input[2] &0xff;
    if ( index < 0 ) index = 0;
    else if ( index > 88 ) index = 88;
    int step = stepsizeTable[index];
    inp += 4;
    len = (len - 4) * 2;
    int count = len;
    while(count-- > 0) {
    if ( 0 == bufferstep ) {
    inputbuffer = input[inp++];
    delta = (inputbuffer >> 4) & 0xf;
    bufferstep = 1;
    } else {
    delta = inputbuffer & 0xf;
    bufferstep = 0;
    index += indexTable[delta];
    if ( index < 0 ) index = 0;
    else if ( index > 88 ) index = 88;
    sign = delta & 8;
    delta = delta & 7;
    vpdiff = step >> 1;
    if ( (delta & 4) == 4 ) vpdiff += (step << 2);
    if ( (delta & 2) == 2 ) vpdiff += (step << 1);
    if ( (delta & 1) == 1 ) vpdiff += step;
    vpdiff >>= 2;
    if ( 0 != sign )
    valprev -= vpdiff;
    else
    valprev += vpdiff;
    if ( valprev > 32767 )
    valprev = 32767;
    else if ( valprev < -32768 )
    valprev = -32768;
    step = stepsizeTable[index];
    output[outp++] = (short) valprev;
    ((AdpcmState)state).valprev = valprev;
    ((AdpcmState)state).index = index;
    return len;
    which stores the result into a short[] array.
    I then convert this short[] array into a byte[] array with the following way:
    s is the short[] array
    adp is the byte array
    for(int g=0,k=0;g<s.length;g++,k=k+2){
    audio.Convert.short2byte(s[g],adp,k);
    public static void short2byte(short ival, byte b[], int offset) {
    int i;
    int bits = 16;
    for(i = 0; i >< 2; i++) {
    bits -= 8;
    b[offset + i] = (byte) ((ival >> bits) & 0xff);
    The final result is loaded to the player as follows:
    ByteArrayInputStream input1 = new ByteArrayInputStream(adp);
    player = Manager.createPlayer(input1, "audio/x-wav");//create new player
    player.addPlayerListener(this);
    player.prefetch();
    player.realize();
    player.start();
    The player begins to play but I only get horrible sounds instead of the original wave file
    The player now initializes ok without any problem but I can only hear a meesed up sound rather than the original. So now I strongly believe that the problem is in the decoding of the samples of the DVI/RTP codec.

    thesti wrote:
    how JMF deal with RTP packet loss? since my application doesn't handle anything due to RTP packet loss, i believe that JMF has a mechanism to deal with it.It "deals" with it by having a blank spot in the rendering where that packet would have gone...

  • Wireshark capture rtp packets on Cisco CUBE.

    Hello all,
    We have this call flow and we are having intermittent DTMF issue
    CUCM 10.5--->CUBE(10.1.1.10--->AVAYA(10.1.1.11)--->PSTN
    I am trying to capture RTP packets between CUBE and AVAYA, How can we capture RTP packets between(10.1.1.10 and 10.1.1.11)??
    I followed below steps and I can see the traffic only from AVAYA to CUBE and that too only SIP and TCP not RTP.
    Router(config)# access-list 140 permit ip host 32.55.55.32 any
    Router(config)# access-list 140 permit ip any host 32.55.55.32
    This ACL will capture all traffic to and from this IP address.
    Next we need to enable the Cisco packet monitoring service:
    Router# monitor capture buffer holdpackets
    Now we can filter the monitored traffic by filtering it through our access-list:
    Router# monitor capture buffer holdpackets filter access-list 140
    Now we need to name our particular packet capture. I have called mine "testcap"
    Router# monitor capture point ip cef testcap all both
    Router# monitor capture point associate testcap holdpackets
    Now we can start our capture!
    Router# monitor capture point start testcap
    Once you think you have acquired enough packets, to stop the capture, type:
    Router# monitor capture point stop testcap
    Now you can export your data to your tftp server by typing in the following command. You can then open the .pcap file in Wireshark for viewing
    Router# monitor capture buffer holdpackets export tftp://10.0.0.55/testcap.pcap
    Once uploaded you can clear your capture buffer by typing the following:
    Router# no monitor capture buffer holdpackets
    Any help is much appreciated
    Thanks!

    But when i configure the destination as USB0 my pendrive, it fails.
    Could be a bug but I wouldn't recommend configuring the destination as your USB drive because no one has the same luxury as you to have the USB sit there all the time.
    Store to the flash and transfer to USB is probably the best solution.

  • AVReceive2 -  Q about the ip address given as input

    Hi
    I've managed to understand a bit of AVReceive2.java and AVTransmit2.java , but there is one thing that's unclear to me .
    The transmitter sends the stream to a specific ip:port , and the receiver should know in my opinion only the port on which he should listen to receive the stream . But as i've seen the Receiver needs as input session(s) (ip/port) , and in the [web-page where u get the receiver sample from |http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html] it says the ip is "the address of the computer which transmits the data" and i assume the port is the one on the receiver's machine on which he'll get the streams on .
    The thing is i've tested it on localhost and as well between localhost and a VM and no matter what ip you specify as the input for a session to the receiver , if the port is correct , the receiver gets the stream . So my question is what is the ip address in the session for ? and who's ip address is ? and why does it work even if the ip address is not set correctly (in case the address would be the transmitter's ip as they say) ... ?
    thanks for any suggestions and for reading this

    The transmitter sends the stream to a specific ip:port , and the receiver should know in my opinion only the port on which he should listen to receive the stream . RTP packets are carried via UDP packets, which are a connectectionless transmission packet. What that means, basically, is that you can receive packets from more than one remote host simultaniously on the same local port...
    But as i've seen the Receiver needs as input session(s) (ip/port) , and in the [web-page where u get the receiver sample from |http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html] it says the ip is "the address of the computer which transmits the data"
    Right. In the case that 2 streams were being received on the same port, you'd need to tell JMF which one to play...
    and i assume the port is the one on the receiver's machine on which he'll get the streams on .Technically no. The port you give it is the port on which the sender's machine is sending the data. The IP/PORT combo is matched against the source ip / port of the UDP packets...
    In this case, the AVTransmit2 code is designed to send from the port it's sending to, so the source port of the UDP packet will have the same value as the destination port of the UDP packet...
    So, in summary, the source and destination ports can be different, or they can be the same. You need to give the source port to AVReceive...
    The thing is i've tested it on localhost and as well between localhost and a VM and no matter what ip you specify as the input for a session to the receiver , if the port is correct , the receiver gets the stream . So my question is what is the ip address in the session for ? and who's ip address is ? and why does it work even if the ip address is not set correctly (in case the address would be the transmitter's ip as they say) ... ?I've tested this between 2 machines in the past, and if you don't give the correct address, you won't receive the stream. More than likely, because you're using localhost & a VM, it's just considering all of your IP addresses to be equivolent...
    127.0.0.1 = localhost = 192.168.x.x, etc...
    So you should test this between 2 actual machines with different IP addresses, and see what you come up with.

  • Setting dimension of RTP packet with 'rtp' jmf

    How is it possibile to set the dimension of RTP packet with JMF in the transmitting audio stream with RTP????

    thesti wrote:
    how JMF deal with RTP packet loss? since my application doesn't handle anything due to RTP packet loss, i believe that JMF has a mechanism to deal with it.It "deals" with it by having a blank spot in the rendering where that packet would have gone...

  • How to prioritize RTP Packets for VOIP Audio on RV180

    Hi There,
    I'm a relative newbie to more advanced networking but have managed to get our small office IP PBX running over a SIP Trunk. The only real problem we are having is choppy outgoing audio when there is other heavy outgoing traffic on the network.
    My understanding is that I need to set some QoS parameters, which I have played with but it didn't seem to help much. I mostly dealt with allocating bandwidth. I now think I need to somehow prioritize the outgoing RTP packets from our PBX (which runs on a PC on our LAN) to help avoid the choppy audio. My research shows this can maybe be done with something called DSCP 46 and my router does support that -- I'm just a little confused on how to exactly set the configuration.
    Our router is a Cisco rv180w. I'm thinking it should be pretty straightforward, but any guidance would be appreciated (and feel free to let me know if I'm barking up the entirely wrong tree, too!)
    Thanks so much.

    OK, thank you. So specifically -- if I want to prioritize all of the RTP traffic flowing out through the router, can I do it ALL with just COS and not set any QoS, profile binding etc?
    So far I have enabled the COS Queue, left the default settings (where COS Priorities 6 and 7 are set to highest), then on the COS to DSCP page I have entered the value 46 into the Priority 6 and 7 boxes. All the rest I left at 0.
    Unfortunately this didn't seem to solve the issue. The way I have been testing is to call our PBX from an outside line, then put myself on hold so I can hear the hold music (effectively an audio stream from the PBX server). Then I listen carefully while I run a bandwidth test from speedtest.net.
    During the download test the audio (music on hold) is pretty smooth. But during the upload test (lots of data flowing outbound) the audio gets very choppy. The COS settings I've tried don't seem to improve or even change that
    I assume I'm doing something wrong and/or need to involve QoS somehow?
    - Keith

Maybe you are looking for

  • How can I get my gamecenter account back!, How can I get my gamecenter account back!

    Ok so I was on my game center account and I realised I couldn't change my photo or status it wouldn't even give me a chance to change it. So I tried making a new account on the same apple ID and I still couldn't change my status or picture. It's a bi

  • Client Information

    Hi Mr.Francois I am using your client information form. Thank you. But in Linux client shows IP & MAC addresses are blank Any idea ! Regards

  • Transfering data through WiFi or GSM

    Hi there, I need some help here..I want to send and receive data through the wiFi or GSM..Is it possible??What module that I have to use?Please assist me...I need some idea how to start my project.. Please..

  • Don't group ncmpcpp with terminal in dockbarX

    hi there, perhaps somebody has an idea on how to accomplish the following: i'm using mpd+ncmpcpp to listen to my music. the panel i'm using is dockbarX (dockX standalone) which groups similar windows in one single icon - just like windows' superbar.

  • Gdm-x-session Segmentation fault at address 0x0

    Hey! After updating to linux 4.0.1 along with the latest linux-firmware, whenever I reboot, my notebook sometimes boots to gnome, but sometimes it doesn't. Most of the times it doesn't ! journalctl shows that X is throwing a Segmentation fault at add