RTP Ports ????

I have Snom phones utilizing an Asterisk server.
Sniffer captures are showing what I expect and ports 10686 as the dest port from the phone. However RTP packets sent right back from the Asterisk server are destined for port 50488.
Does this mean I need to setup QOS with 50488 also??

To display Real-Time Transport Protocol (RTP) named event packets, use the show voip rtp connections command in privileged EXEC mode.
show voip rtp connections [detail]
To reserve a strict priority queue for a set of Real-Time Transport Protocol (RTP) packet flows belonging to a range of User Datagram Protocol (UDP) destination ports, use the ip rtp priority interface configuration command. To disable the strict priority queue, use the no form of this command.
ip rtp priority starting-rtp-port-number port-number-range bandwidth
no ip rtp priority

Similar Messages

  • Lync Client uses wrong RTP Ports for calls from/to RGS with Agent Anonymity

    We have QoS implemented and client ports for audio, video und application defined by Set-CsConferencingConfiguration. We also use firewalls in our LAN between the different VLANs for Clients, Servers and Gateways/SBC. Only RTP from the client with the defined
    ports are allowed by the firewall. Media ByPass is enabled.
    In all normal cases, the right ports will be used and marked by GPO with the right DSCP value. But if an agent get a call from a RGS which has agent anonymity enabled, the client uses a port in the range 1024-65535 for audio. Also if you make a call on behalf
    of the RGS, the client use a random port between 1024-65535. As soon, as the source of the call is in another VLAN (e.g. a call from PSTN which comes in over a SBC in e separate VLAN), the firewall between the two VLANs block the RTP traffic.
    We see the deny on the firewall log and in the SBC log we see, the reinvite for the media by pass with the IP of the agent and a not valid port. We also see, that no RTP from the client/agent will arrive the SBC and no RTP from the SBC will arrive the client/agent.
    So the call will be disconnected, as soon as an agent wants accept the call.
    Is there an additional setting to make sure, the Lync client always use the valid RTP port range?
    This behavior exist in Lync 2010 and Lync 2013 clients.

    Hi Holger,
    Thanks for reply!
    Sure! I set all AudioPorts on all Services, but the problem are not the ports used by the server, the problem are the ports used by the client. We set the client ports to 49152 with a count of 40. The client (2013 and also 2010) use these ports correctly in all
    cases exept for call from/on behalf of an RGS with Agent Anonymity.
    If we disable the RGS agent anonymity, restart the client of the agent, then the client uses also the correct source ports for RTP.
    I've checked this behaviour now on 3 customer installations, our own productive installation and in our lab.
    Because until now only one of our customers have firewalls between the internal VLANs, only this single customer have the issues...
    Regards,
    Stephan

  • JMF Does not release the RTP ports

    Hi,
    I am working on a program that simply listens RTP messages from the network and play them on a PC. My datasource is created as follows:
    String url2= "rtp://127.0.0.1:10000/audio/1";
    medialocator=new MediaLocator(url2);
    ds=Manager.createDataSource(medialocator);
    This ds will later be given to a player for the local playback. It has a flow like this: DS->Processor->DS->Player.
    Everything works fine for the first execution. The stream is played. However when I stop the player, processor and even the ds, JMF does not realease the RTP ports. I still can see them in the netstat output. Heres how I try to release the resources:
    public void releaseResources(){
    try{
    if(player!=null){
    player.stop();
    player.deallocate();
    player=null;
    if(ds2!=null){
    ds2.stop();
    ds2.disconnect();
    ds2=null;
    if(processor!=null){
    processor.stop();
    processor.removeControllerListener(this);
    processor.deallocate();
    medialocator=null;
    ds=null;
    Because of this problem, when I try to do the same thing on the same url after sometime, it gives the error "Cannot create the RTP Session: Can't open local data port: 10000". The ports are released after I shutdown the JVM.
    Does anyone have an idea on how to release this ports in the same JVM session?
    Thanks a lot,
    Murat

    DataSource objects open a connection to their source, in your case, a connection to an RTP port. You need to call
    ds.disconnect()
    on both datasources, but SPECIFICLLY on ds (as opposed to ds2) if you want it to release the port.

  • SPA 962 -- Intermittently no audio (RTP port closed/unreachable)

    Greetings all!
    We recently purchased 21 Linksys SPA 962 phones for our office. We are running these directly from our PoE switch (Cisco 300) to our sipx box which is on the same subnet and switch (sipx is not running iptables). Most of our phone calls work correctly but we are finding that periodically (say 1 in 10 phone calls) we have no audio. There is no NAT in the setup so this should all be relatively straightforward.
    The most interesting part of the problem is that it appears to be the phone itself. The reason I believe that it is the phone is because of the attached pcap trace. You can see the first call in this trace is bad and the second one is actually completed correctly.
    The negotiation over SIP all seems to work correctly and the phone says what RTP port to use but when sipx tries to communicate to that RTP port the phone returns an ICMP port unreachable! From attaching a syslog to the phone as a debug server it appears that the phone believes it has opened up the receiving port but further down it attempts to send rtp back to sipxecs and it cannot send rtp back but this is because I believe the port failed to allocate/open in the first place.
    I have tried all four of the available Cisco firmwares that I could find and they all produce the same issue. I also have tried putting the phone on it's own VLAN, tried SRTP, tried symmetric RTP, tried Sticky 183 and nothing seems to fix the behavior.
    Did we get bad phones???
    We also have a Grandstream ATA gateway with polycoms attached and all of those phone calls work 100% of the time.
    Thanks in advance!

    It's also unusual that it's happening on all 5 of the 21 phones that I have tested to make sure it wasn't just one of them that seemed to have the issue. All of them have a manufacture date of March 2010. I too have seen the Max RTP ICMP Err parameter and it is zero so it shouldn't be a factor.
    Also, as you can see from the pcap dump there is no RTP packet that ever gets sent from the phone to the pbx so there isn't an opportunity to receive an ICMP Port Unreachable response from the pbx which would trigger the shutoff.
    Unfortunately, we threw away the boxes since this purchase was part of an office move and the cleanup crew thought we didn't need them anymore so returning them is likely not an option. The seller on Amazon stated that manufacturer remedies need to be pursued.
    Do I have any other options? I know the EOL announcement states that August 17, 2012 is the last date for a failure analysis which is rapidly approaching.
    Thanks,
    Jarrod

  • Force/lock rtp ports in SPA 112/122.

    Hi,
    I hope someone can help me. I am looking for a setting inside the Cisco/Linksys spa 112/122 which can force the rtp source port to be the same on the sip provider - is that possible? When the spa 112/122 connects to the sip provider is the port number from the box is 16384(standard range 16384-16482 inside the spa) but on the sip provider will respons with eg. port 36741.
    /Tom

    Hi Bro
    Before you proceed to add the line shown below, I'm guessing you're unable to access and PING 172.20.16.8 once you've successfully VPN in, am I right? If yes, which groupname and username did you use? Lastly, did you use IPSEC VPN Client or WebVPN?
    access-list inside_nat0_outbound extended permit ip 10.20.60.0 255.255.255.0 172.20.16.0 255.255.255.0
    Regards,
    Ram

  • Changing Asterisk Default RTP Ports - Have You Done It with Success?

    We have an Elastix box at our main site, and we've recently had issues with people placing a call or two where they hear no audio with call drops after about 34 seconds. In these cases the person they called can hear them just fine. That's normally a NAT problem, and in this case it is as well.It turns out we have been allowing the standard UDP 10000 - 20000 back to the PBX in addition to SIP (UDP 5060) for Asterisk, but the provider is telling me they send traffic on UDP 1024 to 65534. What's very odd about this (using Broadvox Fusion) is that we have had ports 10000 - 20000 open since early 2013 when we moved to Elastix and not had this kind of problem reported since the last few months. We did a pcap with the SIP provider and called some of the numbers people have reported, and they confirmed the firewall is dropping packets.I've...
    This topic first appeared in the Spiceworks Community

    You won't lose your unlimited data as long as your account stays active and you don't purchase a subsidized phone. I just did this yesterday and it took just a few minutes over 24 hours to port my number over to GV. I still have unlimited data. I pretty much followed the instructions you have above except I waited about 7 hours to get a new number from VZW just to make sure there were no hiccups. VZW says you may get some overages if you change your number immediately as opposed to on the first day of your billing cycle because they prorate your minutes and texts used. Luckily I have unlimited everything so it didn't make a difference for me. I'm planning on going over to T-Mobile. My home is a dead zone for cell phones and I always have a weak signal and sometimes don't get my calls. I figure if I'm going to pay for an unsubsidized phone, I might as well go with a company that has wifi calling and a cheaper unlimited plan. I pay $94/mo before taxes with VZW; I'll only be paying $59.50 with T-Mobile for the same plan with 2.5 GB tethering included. T-Mobile here in LA is pretty good and even if I don't get LTE, I can fall back on their HSPA+ network, which is way better than VZW's crippled 3G network. No regrets porting over. The ONLY way I'll stay with VZW is if they allow me to keep my unlimited data (not going to do Verizon Max) and get a subsidized phone. CAN YOU HEAR ME NOW VERIZON?

  • AE with inbound SIP and RTP over UDP - Will not open ports

    I am using a Linksys SPA962 IP Phone via an Airport Express with the latest firmware connecting to an Asterisk PBX (http://www.asterisk.org) over the internet. I may make outbound calls and have my incoming and outgoing audio over RTP with the appropriate UDP ports no problem. But, when I receive an inbound call, I get the SIP INVITE no problem, but the AE refuses to open those RTP ports. I have NAT keep alive at 15 seconds.
    Now, I have tried almost every combination. Enabling NAT-PMP forwarding to all of the appropriate IP/Ports, turning it off (really should not be necessary with keep alive on register with the Asterisk). I am stumped, it is almost as of AE does not like UDP for inbound. I have others using Linksys routers with a similar configuration working inbound and outbound no problem.
    I am stumped. Ideas? Chuck the AE in the bin?

    I Googled up the following:
    http://lists.apple.com/archives/Macnetworkprog/2006/Jul/msg00040.html
    I am having this issue:
    http://discussions.apple.com/message.jspa?messageID=7256265#7256265
    Are all these things the same issue?
    My ISP "tells me" that they will not allow more than one IP address per account. I have a basic cable modem i.e. not a router. Its a D-Link DCM-202. I have been told to try a level-2 switch but I can't see how that will work. As far as I can see the DCM-202 cable modem is bridging to my AEBS so that is allocated the WAN IP address by the ISP's DHCP server. Does this sound right?
    I'd like to create an actual DMZ but since my cable modem only has one port I can't see how I can do that unless I use 2 routers. If I try this I am expecting that I'd have complicated port forwarding configurations no?

  • Incoming RTP traffic blocked by SPA112 ATA: UDP port unreachable

    Hi folks,
    I'm using a Cisco SPA112 ATA behind a NAT, where port 5060,5061 and 16384-16482 are forwarded. Registration to the SIP proxy also works fine. However, I'm struggling with audio issues, meaning that the RTP session is not setup properly.
    When investigating this issue at the packet-level, I found that the ATA itself is blocking traffic:
    21:00:21.857655 IP 192.168.x.y > 82.197.a.b: ICMP 192.168.x.y udp port 16452 unreachable, length 208
    The blocked port number depends per session, but is always between 16384 and 16482.
    Actually, the issue sounds very much like in [1]. However, the proposed solution (disabling CDP) is not of any help to me, since it's disabled on my ATA by default. Any clue what could be the reason for this behaviour? Your help is greatly appreciated.
    [1] https://supportforums.cisco.com/discussion/11470321/spa-962-intermittently-no-audio-rtp-port-closedunreachable

    Hi,
    You can try this packet Tracer:-
    packet input outside udp <External Source Ip on the internet>  45657 <Outside interface IP> 43139 det
    For the captures , you just need to verify that the ASA device is passing the traffic through as this is UDP traffic , we would not be able to find much.
    For more information on captures:-
    https://supportforums.cisco.com/document/69281/asa-using-packet-capture-troubleshoot-asa-firewall-configuration-and-scenarios
    Let me know if you have any further queries.
    Thanks and Regards,
    Vibhor Amrodia

  • About port 5060 in asa 5505/

    Hello! My name is Denis, I have a problem with the cisco asa 5505 in the office. We need to open follow ports and protocols: SIP Server IP: 212.24.34.36 SIP Port (UDP/TCP): 5060 RTP Server IP: 212.158.160.92 RTP Port (UDP): 7000-27000 RTP Server IP: 212.24.48.76 RTP Port (UDP): 7000-27000 RTP Server IP: 217.23.132.36 RTP Port (UDP): 7000-27000 HTTP Server IP: 212.24.34.36 HTTP Port (ТСP): 80 I've made it by standart way throuhg the amdinistate interface in the cisco. All the ports is opened, but the problem is with the 5060 port. It is not working meanwhile, there is no ping. I need an instruction to open this port 5060 in our asa 5505. Also I attache the picture (the printscreen). I really hope you to help me. With best regards. Denis, Pilotmoto.

    Hello! My name is Denis, I have a problem with the cisco asa 5505 in the office. We need to open follow ports and protocols: SIP Server IP: 212.24.34.36 SIP Port (UDP/TCP): 5060 RTP Server IP: 212.158.160.92 RTP Port (UDP): 7000-27000 RTP Server IP: 212.24.48.76 RTP Port (UDP): 7000-27000 RTP Server IP: 217.23.132.36 RTP Port (UDP): 7000-27000 HTTP Server IP: 212.24.34.36 HTTP Port (ТСP): 80 I've made it by standart way throuhg the amdinistate interface in the cisco. All the ports is opened, but the problem is with the 5060 port. It is not working meanwhile, there is no ping. I need an instruction to open this port 5060 in our asa 5505. Also I attache the picture (the printscreen). I really hope you to help me. With best regards. Denis, Pilotmoto.

  • Linksys e1200 PORT RANGE FORWARDING is not working

    I currently have an E1200. I can port forward single ports, but when I attempt to forward a range of ports it doesn't work and there is no error in the log.
    Specifically I am port forwarding RTP ports (10000 - 20000). I am aware of the security risks, please do not preach.

    I have a problem with port forwarding http port 80 this for i surveillance camera.
    I have all the settings are correct but I can not convert. Opening this port Also no other ports open. Who can help me on the way to this is to get together. I mtu gezte the firewall function in 1400 and put on the standard port 80 http to put. and of course the ip address that is in the same range.
    I do not know what I'm doing wrong because the old linksys just worked. It I hope someone can help me.

  • Problem with opening/port forwarding some ports but not others

    I read the Faq and the first few pages of the forums but couldnt find anything.
    I am using the Port Forwarding (WRT54G, Firmware 4.20.7) to my network camera to try to open up ports 80, 554, 5556 and 5558.
    Using the network toolbox at Blackcode.com I then check the ports to see if they are open.
    Port 554 seems to be open. Port 80, 5556 and 5558 do not appear to be open.
    I am using the correct external IP address (I can toggle port 554 open and closed and test that). Toggling Blocking Anon Internet Requests Of/Off makes no difference to the result.
    I have checked with my ISP and they dont claim to block those ports.
    Any thoughts on what this could be? Is there a way to test if its my ISP? If it is my ISP, is there a workaround?
    Thanks for any help.

    Are you sure the camera does listen on those port at the time you did this tests? Are those ports open inside your LAN, too?
    5556 and 5558 look like RTP ports which may only be active after the channels have been established through RTSP.
    Forwarding of port 80 is known to be an issue on various routers as the router allocates port 80 for the web interface. Sometimes it helps to change the remote management port on the router from 80 to 8080 or something else. You may even have to enable remote management to get this active.
    If this does not work you have to reconfigure port 80 on your server to a different port if possible.
    Message Edited by gv on 08-21-2007 12:28 AM

  • JMF How to stream rtp from udp packet

    I implemented an rtsp client and use the client to setup two rtp session(audio, vedio). But when I use the example pramgram "AVReceive3" to stream the udp packet, it doesn't work.
    When the AVReceive3 receive the udp packet from the rtp port, it will call the update(ReceiveStreamEvent evt) function, and the event type is StreamMappedEvent, and the call to evt.getReceiveStream().getDataSource() return null.
    I thought the first event should be NewReceiveStreamEvent. Please help to solve the problem.
    What's rtp packet will cause the event StreamMappedEvent.
    Following is the code of AVReceive3.java:
    * AVReceive3.java
    * Created on 2007&#24180;10&#26376;30&#26085;, &#19979;&#21320;4:11
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package PlayerTest;
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.util.Vector;
    import javax.media.*;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    import javax.media.Format;
    import javax.media.format.FormatChangeEvent;
    import javax.media.control.BufferControl;
    * AVReceive3 to receive RTP transmission using the RTPConnector.
    public class AVReceive3 extends Thread implements ReceiveStreamListener, SessionListener,
    ControllerListener
    String sessions[] = null;
    RTPManager mgrs[] = null;
    Vector playerWindows = null;
    boolean dataReceived = false;
    Object dataSync = new Object();
    public AVReceive3(String sessions[])
    this.sessions = sessions;
    public void run()
    initialize();
    public boolean initialize() {
    try {
    mgrs = new RTPManager[sessions.length];
    playerWindows = new Vector();
    SessionLabel session;
    // Open the RTP sessions.
    for (int i = 0; i < sessions.length; i++) {
    // Parse the session addresses.
    try {
    session = new SessionLabel(sessions);
    } catch (IllegalArgumentException e) {
    System.err.println("Failed to parse the session address given: " + sessions[i]);
    return false;
    System.err.println(" - Open RTP session for: addr: " + session.addr + " port: " + session.port + " ttl: " + session.ttl);
    mgrs[i] = (RTPManager) RTPManager.newInstance();
    mgrs[i].addSessionListener(this);
    mgrs[i].addReceiveStreamListener(this);
    // Initialize the RTPManager with the RTPSocketAdapter
    mgrs[i].initialize(new RTPSocketAdapter(
    InetAddress.getByName(session.addr),
    session.port, session.ttl));
    // You can try out some other buffer size to see
    // if you can get better smoothness.
    BufferControl bc = (BufferControl)mgrs[i].getControl("javax.media.control.BufferControl");
    if (bc != null)
    bc.setBufferLength(350);
    } catch (Exception e){
    System.err.println("Cannot create the RTP Session: " + e.getMessage());
    return false;
    // Wait for data to arrive before moving on.
    long then = System.currentTimeMillis();
    long waitingPeriod = 30000; // wait for a maximum of 30 secs.
    try{
    synchronized (dataSync) {
    while (!dataReceived &&
    System.currentTimeMillis() - then < waitingPeriod) {
    if (!dataReceived)
    System.err.println(" - Waiting for RTP data to arrive");
    dataSync.wait(1000);
    } catch (Exception e) {}
    if (!dataReceived) {
    System.err.println("No RTP data was received.");
    close();
    return false;
    return true;
    public boolean isDone() {
    return playerWindows.size() == 0;
    * Close the players and the session managers.
    protected void close() {
    for (int i = 0; i < playerWindows.size(); i++) {
    try {
    ((PlayerWindow)playerWindows.elementAt(i)).close();
    } catch (Exception e) {}
    playerWindows.removeAllElements();
    // close the RTP session.
    for (int i = 0; i < mgrs.length; i++) {
    if (mgrs[i] != null) {
    mgrs[i].removeTargets( "Closing session from AVReceive3");
    mgrs[i].dispose();
    mgrs[i] = null;
    PlayerWindow find(Player p) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.player == p)
    return pw;
    return null;
    PlayerWindow find(ReceiveStream strm) {
    for (int i = 0; i < playerWindows.size(); i++) {
    PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
    if (pw.stream == strm)
    return pw;
    return null;
    * SessionListener.
    public synchronized void update(SessionEvent evt) {
    if (evt instanceof NewParticipantEvent) {
    Participant p = ((NewParticipantEvent)evt).getParticipant();
    System.err.println(" - A new participant had just joined: " + p.getCNAME());
    * ReceiveStreamListener
    public synchronized void update( ReceiveStreamEvent evt) {
    System.out.println("\nReceive an receiveStreamEvent:"+evt.toString());
    RTPManager mgr = (RTPManager)evt.getSource();
    Participant participant = evt.getParticipant(); // could be null.
    ReceiveStream stream = evt.getReceiveStream(); // could be null.
    System.out.println("The RTPManager is:");
    if (evt instanceof RemotePayloadChangeEvent) {
    System.err.println(" - Received an RTP PayloadChangeEvent.");
    System.err.println("Sorry, cannot handle payload change.");
    System.exit(0);
    else if (evt instanceof NewReceiveStreamEvent) {
    try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
    System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());
    } else
    System.err.println(" - Recevied new RTP stream");
    if (participant == null)
    System.err.println(" The sender of this stream had yet to be identified.");
    else {
    System.err.println(" The stream comes from: " + participant.getCNAME());
    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
    return;
    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);
    pw.setVisible(true);
    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
    dataReceived = true;
    dataSync.notifyAll();
    } catch (Exception e) {
    System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
    return;
    else if (evt instanceof StreamMappedEvent) {
    if (stream != null)
    if(stream.getDataSource()!=null)
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println(" - The previously unidentified stream ");
    if (ctl != null)
    System.err.println(" " + ctl.getFormat());
    System.err.println(" had now been identified as sent by: " + participant.getCNAME());
    else if (evt instanceof ByeEvent) {
    System.err.println(" - Got \"bye\" from: " + participant.getCNAME());
    PlayerWindow pw = find(stream);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    * ControllerListener for the Players.
    public synchronized void controllerUpdate(ControllerEvent ce) {
    Player p = (Player)ce.getSourceController();
    if (p == null)
    return;
    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
    PlayerWindow pw = find(p);
    if (pw == null) {
    // Some strange happened.
    System.err.println("Internal error!");
    System.exit(-1);
    pw.initialize();
    pw.setVisible(true);
    p.start();
    if (ce instanceof ControllerErrorEvent) {
    p.removeControllerListener(this);
    PlayerWindow pw = find(p);
    if (pw != null) {
    pw.close();
    playerWindows.removeElement(pw);
    System.err.println("AVReceive3 internal error: " + ce);
    * A utility class to parse the session addresses.
    class SessionLabel {
    public String addr = null;
    public int port;
    public int ttl = 1;
    SessionLabel(String session) throws IllegalArgumentException {
    int off;
    String portStr = null, ttlStr = null;
    if (session != null && session.length() > 0) {
    while (session.length() > 1 && session.charAt(0) == '/')
    session = session.substring(1);
    // Now see if there's a addr specified.
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    addr = session;
    } else {
    addr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a port specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    portStr = session;
    } else {
    portStr = session.substring(0, off);
    session = session.substring(off + 1);
    // Now see if there's a ttl specified
    off = session.indexOf('/');
    if (off == -1) {
    if (!session.equals(""))
    ttlStr = session;
    } else {
    ttlStr = session.substring(0, off);
    if (addr == null)
    throw new IllegalArgumentException();
    if (portStr != null) {
    try {
    Integer integer = Integer.valueOf(portStr);
    if (integer != null)
    port = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    } else
    throw new IllegalArgumentException();
    if (ttlStr != null) {
    try {
    Integer integer = Integer.valueOf(ttlStr);
    if (integer != null)
    ttl = integer.intValue();
    } catch (Throwable t) {
    throw new IllegalArgumentException();
    * GUI classes for the Player.
    class PlayerWindow extends Frame {
    Player player;
    ReceiveStream stream;
    PlayerWindow(Player p, ReceiveStream strm) {
    player = p;
    stream = strm;
    public void initialize() {
    add(new PlayerPanel(player));
    public void close() {
    player.close();
    setVisible(false);
    dispose();
    public void addNotify() {
    super.addNotify();
    pack();
    * GUI classes for the Player.
    class PlayerPanel extends Panel {
    Component vc, cc;
    PlayerPanel(Player p) {
    setLayout(new BorderLayout());
    if ((vc = p.getVisualComponent()) != null)
    add("Center", vc);
    if ((cc = p.getControlPanelComponent()) != null)
    add("South", cc);
    public Dimension getPreferredSize() {
    int w = 0, h = 0;
    if (vc != null) {
    Dimension size = vc.getPreferredSize();
    w = size.width;
    h = size.height;
    if (cc != null) {
    Dimension size = cc.getPreferredSize();
    if (w == 0)
    w = size.width;
    h += size.height;
    if (w < 160)
    w = 160;
    return new Dimension(w, h);
    public static void main(String argv[]) {
    //if (argv.length == 0)
    // prUsage();
    String sessions[]= new String[] {"127.0.0.1/6670","127.0.0.1/6672"};
    AVReceive3 avReceive = new AVReceive3(sessions);
    if (!avReceive.initialize()) {
    System.err.println("Failed to initialize the sessions.");
    System.exit(-1);
    // Check to see if AVReceive3 is done.
    try {
    while (!avReceive.isDone())
    Thread.sleep(1000);
    } catch (Exception e) {}
    System.err.println("Exiting AVReceive3");
    static void prUsage() {
    System.err.println("Usage: AVReceive3 <session> <session> ");
    System.err.println(" <session>: <address>/<port>/<ttl>");
    System.exit(0);
    }// end of AVReceive3
    Following is the code of RTPSocketAdapter.java:
    * RTPSocketAdapter.java
    * Created on 2007&#24180;10&#26376;30&#26085;, &#19979;&#21320;4:13
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package PlayerTest;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.DatagramSocket;
    import java.net.MulticastSocket;
    import java.net.DatagramPacket;
    import java.net.SocketException;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.PushSourceStream;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.SourceTransferHandler;
    import javax.media.rtp.RTPConnector;
    import javax.media.rtp.OutputDataStream;
    * An implementation of RTPConnector based on UDP sockets.
    public class RTPSocketAdapter implements RTPConnector {
    DatagramSocket dataSock;
    DatagramSocket ctrlSock;
    InetAddress addr;
    int port;
    SockInputStream dataInStrm = null;
    SockInputStream ctrlInStrm = null;
    SockOutputStream dataOutStrm = null;
    SockOutputStream ctrlOutStrm = null;
    public RTPSocketAdapter(InetAddress addr, int port) throws IOException {
    this(addr, port, 1);
    public RTPSocketAdapter(InetAddress addr, int port, int ttl) throws IOException {
    try {
    if (addr.isMulticastAddress()) {
    dataSock = new MulticastSocket(port);
    ctrlSock = new MulticastSocket(port+1);
    ((MulticastSocket)dataSock).joinGroup(addr);
    ((MulticastSocket)dataSock).setTimeToLive(ttl);
    ((MulticastSocket)ctrlSock).joinGroup(addr);
    ((MulticastSocket)ctrlSock).setTimeToLive(ttl);
    } else {
    dataSock = new DatagramSocket(port, InetAddress.getLocalHost());
    ctrlSock = new DatagramSocket(port+1, InetAddress.getLocalHost());
    } catch (SocketException e) {
    throw new IOException(e.getMessage());
    this.addr = addr;
    this.port = port;
    * Returns an input stream to receive the RTP data.
    public PushSourceStream getDataInputStream() throws IOException {
    if (dataInStrm == null) {
    dataInStrm = new SockInputStream(dataSock, addr, port);
    dataInStrm.start();
    return dataInStrm;
    * Returns an output stream to send the RTP data.
    public OutputDataStream getDataOutputStream() throws IOException {
    if (dataOutStrm == null)
    dataOutStrm = new SockOutputStream(dataSock, addr, port);
    return dataOutStrm;
    * Returns an input stream to receive the RTCP data.
    public PushSourceStream getControlInputStream() throws IOException {
    if (ctrlInStrm == null) {
    ctrlInStrm = new SockInputStream(ctrlSock, addr, port+1);
    ctrlInStrm.start();
    return ctrlInStrm;
    * Returns an output stream to send the RTCP data.
    public OutputDataStream getControlOutputStream() throws IOException {
    if (ctrlOutStrm == null)
    ctrlOutStrm = new SockOutputStream(ctrlSock, addr, port+1);
    return ctrlOutStrm;
    * Close all the RTP, RTCP streams.
    public void close() {
    if (dataInStrm != null)
    dataInStrm.kill();
    if (ctrlInStrm != null)
    ctrlInStrm.kill();
    dataSock.close();
    ctrlSock.close();
    * Set the receive buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setReceiveBufferSize( int size) throws IOException {
    dataSock.setReceiveBufferSize(size);
    * Get the receive buffer size set on the RTP data channel.
    * Return -1 if the receive buffer size is not applicable for
    * the implementation.
    public int getReceiveBufferSize() {
    try {
    return dataSock.getReceiveBufferSize();
    } catch (Exception e) {
    return -1;
    * Set the send buffer size of the RTP data channel.
    * This is only a hint to the implementation. The actual implementation
    * may not be able to do anything to this.
    public void setSendBufferSize( int size) throws IOException {
    dataSock.setSendBufferSize(size);
    * Get the send buffer size set on the RTP data channel.
    * Return -1 if the send buffer size is not applicable for
    * the implementation.
    public int getSendBufferSize() {
    try {
    return dataSock.getSendBufferSize();
    } catch (Exception e) {
    return -1;
    * Return the RTCP bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPBandwidthFraction() {
    return -1;
    * Return the RTCP sender bandwidth fraction. This value is used to
    * initialize the RTPManager. Check RTPManager for more detauls.
    * Return -1 to use the default values.
    public double getRTCPSenderBandwidthFraction() {
    return -1;
    * An inner class to implement an OutputDataStream based on UDP sockets.
    class SockOutputStream implements OutputDataStream {
    DatagramSocket sock;
    InetAddress addr;
    int port;
    public SockOutputStream(DatagramSocket sock, InetAddress addr, int port) {
    this.sock = sock;
    this.addr = addr;
    this.port = port;
    public int write(byte data[], int offset, int len) {
    try {
    sock.send(new DatagramPacket(data, offset, len, addr, port));
    } catch (Exception e) {
    return -1;
    return len;
    * An inner class to implement an PushSourceStream based on UDP sockets.
    class SockInputStream extends Thread implements PushSourceStream {
    DatagramSocket sock;
    InetAddress addr;
    int port;
    boolean done = false;
    boolean dataRead = false;
    SourceTransferHandler sth = null;
    public SockInputStream(DatagramSocket sock, InetAddress addr, int port) {
    this.sock = sock;
    this.addr = addr;
    this.port = port;
    public int read(byte buffer[], int offset, int length) {
    DatagramPacket p = new DatagramPacket(buffer, offset, length, addr, port);
    try {
    sock.receive(p);
    } catch (IOException e) {
    return -1;
    synchronized (this) {
    dataRead = true;
    notify();
    System.out.println("RTPSocketAdapter receive RTP packet from port:"+port);
    System.out.println("The received RTP packet:"+new String(buffer));
    return p.getLength();
    public synchronized void start() {
    super.start();
    if (sth != null) {
    dataRead = true;
    notify();
    public synchronized void kill() {
    done = true;
    notify();
    public int getMinimumTransferSize() {
    return 2 * 1024; // twice the MTU size, just to be safe.
    public synchronized void setTransferHandler(SourceTransferHandler sth) {
    this.sth = sth;
    dataRead = true;
    notify();
    // Not applicable.
    public ContentDescriptor getContentDescriptor() {
    return null;
    // Not applicable.
    public long getContentLength() {
    return LENGTH_UNKNOWN;
    // Not applicable.
    public boolean endOfStream() {
    return false;
    // Not applicable.
    public Object[] getControls() {
    return new Object[0];
    // Not applicable.
    public Object getControl(String type) {
    return null;
    * Loop and notify the transfer handler of new data.
    public void run() {
    while (!done) {
    synchronized (this) {
    while (!dataRead && !done) {
    try {
    wait();
    } catch (InterruptedException e) { }
    dataRead = false;
    if (sth != null && !done) {
    sth.transferData(this);
    Thanks.

    The error of No format has been registered for RTP Payload type 96
    is caused by the dynamic payload mapping, when I add the dynamic mapping between dynamic payload and format. The Player cann't work yet. I think it because JMF doesn't support the format of my clips. For example:
    video: a=rtpmap:96 H263-2000/90000
    audio:a=rtpmap:97 MP4A-LATM/12000/1
    Is there some available plugin to support these format?
    Thanks

  • Javax.media.rtp.InvalidSessionAddressException:

    Hi:
    Using SIP Communicator Java client on Linux. (Redhat Enterprise 4 - WS).
    Works fine when on local lan. I'm testing the client over VPN (Nortel/Apani Netlock client). It brings up an interface in the form:
    nlv0: 10.61.x.x address
    This address is returned as the selected local interface that the SIP client is attempting to bind the RTP Port to.
    The specific error being received is:
    Local Data Address Does not belong to any of this hosts local interfaces.
    Does JMF not support VPN tunnels? if so how? What is the javax.media.rtp class code doing to determine that the VPN address brought up doesn't belong to my local machine?
    Anyone know what to do here?
    thx.
    Duff

    A workaround.
    I set the address of my machine in my /etc/hosts to the machine name of the IP address that was assigned to the nlv0 address.
    SIP client comes up fine now!
    Bonus.

  • Sip passing through nat but rtp is not - no audio

    Sip passing through nat but rtp is not
    I'm looking at traffic leaving my router with a sniffer. I see SIP traffic but I do not see RTP traffic.  The phones ring on both sides but I do not get any audio.
    interface f0/0.100
    ip address 192.168.10.1 255.255.255.0
    ip nat outside
    ip nat pool VoIP 192.168.10.1  192.168.10.1 prefix-length 24
    ip nat inside source route-map VoIP pool VoIP overload
    ip nat inside source static tcp 10.1.1.2 49201 192.168.10.54 49201 extendable
    access-list 1 permit ip host 10.1.1.2 any
    route-map VoIP permit 10
    match ip address 1
    match interface  f0/0.100
    set interface  f0/0.100

    Hello,
    You can enable "ip nat service sip" or "ip nat service h323" and "ip nat
    service h225" commands. As per the documentation, they are enabled by
    default. In the latest IOS there is a new feature added to Cisco IOS that
    ensures that even RTP packets get translated to one of the allowed ports as
    specified by the RFC. The command to enable the feature is "ip nat service
    allow-sip-even-rtp-ports"
    http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6586/ps6640/pro
    d_white_paper0900aecd80597bc7.html
    Hope this helps.
    Regards,
    NT

  • WRVS4400N Static Port Forwarding

    Hi
    I'm trying to get 3CX working and it is detecting that there are issues with the firewall on router.  I think have narrowed it down to the router as the problem still exists with Kaspersky and Windows Firewall off.  Please see the bottom of this page for the results page from 3CX.
    There is a description 3CX provide on getting this working are for Linksys and Cisco routers.
    The Linksys description is fairly straight forward and doesn't make any difference; the Cisco description appears to be a Windows based Utility with some similarities to the WRVS4400N web interface and setting up ACL rules and as close as I can replicate what I think should be set doesn't work either.
    The link for the cisco description is http://www.3cx.com/blog/voip-howto/cisco-voip-configuration/
    The link for NAT firewall issues on 3CX  http://www.3cx.com/blog/voip-howto/static-port-mappings/
    If anyone has any ideas or can point me in the right direction i'd be very grateful.
    Kind regards
    Mark
    Firewall Output
    3CX Firewall Checker, v1.0. Copyright (C) 3CX Ltd. All rights reserved.
    <11:40:57>: Phase 1, checking servers connection, please wait...
    <11:40:57>: Stun Checker service is reachable. Phase 1 check passed.
    <11:40:57>: Phase 2a,  Check Port Forwarding to UDP SIP port, please wait...
    <11:41:07>: UDP SIP Port is set to 5060. Response received WITH TRANSLATION 5061::5060. Phase 2a check passed with WARNINGS. Some functionality will be LIMITED. For more information, please visit http://www.3cx.com/blog/docs/firewall-checker/
    <11:41:07>: Phase 2b. Check Port Forwarding to TCP SIP port, please wait...
    <11:41:08>: TCP SIP Port is set to 5060. Response received WITH TRANSLATION 5061::5060. Phase 2b check passed with WARNINGS. Some functionality will be LIMITED. For more information, please visit http://www.3cx.com/blog/docs/firewall-checker/
    <11:41:08>: Phase 3. Check Port Forwarding to TCP Tunnel port, please wait...
    <11:41:08>: TCP TUNNEL Port is set to 5090. Response received correctly with no translation. Phase 3 check passed.
    <11:41:08>: Phase 4. Check Port Forwarding to RTP external port range, please wait...
    <11:43:23>: UDP RTP Port 9000. Response received correctly with no translation. Phase 4-01 check passed.
    <11:43:23>: UDP RTP Port 9001. Response received correctly with no translation. Phase 4-02 check passed.
    <11:43:23>: UDP RTP Port 9002. Response received correctly with no translation. Phase 4-03 check passed.
    <11:43:23>: UDP RTP Port 9003. Response received correctly with no translation. Phase 4-04 check passed.
    <11:43:23>: UDP RTP Port 9004. Response received correctly with no translation. Phase 4-05 check passed.
    <11:43:23>: UDP RTP Port 9005. NO RESPONSE received. Phase 4-06 check failed with ERRORS. Some functionality will be LIMITED. For more information, please visit http://www.3cx.com/blog/docs/firewall-checker/
    <11:43:23>: UDP RTP Port 9006. Response received correctly with no translation. Phase 4-07 check passed.
    <11:43:23>: UDP RTP Port 9007. Response received correctly with no translation. Phase 4-08 check passed.
    <11:43:23>: UDP RTP Port 9008. Response received correctly with no translation. Phase 4-09 check passed.
    <11:43:23>: UDP RTP Port 9009. Response received correctly with no translation. Phase 4-10 check passed.
    <11:43:23>: UDP RTP Port 9010. Response received correctly with no translation. Phase 4-11 check passed.
    <11:43:23>: UDP RTP Port 9011. Response received correctly with no translation. Phase 4-12 check passed.
    <11:43:23>: UDP RTP Port 9012. Response received correctly with no translation. Phase 4-13 check passed.
    <11:43:23>: UDP RTP Port 9013. Response received correctly with no translation. Phase 4-14 check passed.
    <11:43:23>: UDP RTP Port 9014. Response received correctly with no translation. Phase 4-15 check passed.
    <11:43:23>: UDP RTP Port 9015. Response received correctly with no translation. Phase 4-16 check passed.
    <11:43:23>: UDP RTP Port 9016. Response received correctly with no translation. Phase 4-17 check passed.
    <11:43:23>: UDP RTP Port 9017. Response received correctly with no translation. Phase 4-18 check passed.
    <11:43:23>: UDP RTP Port 9018. Response received correctly with no translation. Phase 4-19 check passed.
    <11:43:23>: UDP RTP Port 9019. Response received correctly with no translation. Phase 4-20 check passed.
    <11:43:23>: UDP RTP Port 9020. Response received correctly with no translation. Phase 4-21 check passed.
    <11:43:23>: UDP RTP Port 9021. Response received correctly with no translation. Phase 4-22 check passed.
    <11:43:23>: UDP RTP Port 9022. Response received correctly with no translation. Phase 4-23 check passed.
    <11:43:23>: UDP RTP Port 9023. Response received correctly with no translation. Phase 4-24 check passed.
    <11:43:23>: UDP RTP Port 9024. Response received correctly with no translation. Phase 4-25 check passed.
    <11:43:23>: UDP RTP Port 9025. Response received correctly with no translation. Phase 4-26 check passed.
    <11:43:23>: UDP RTP Port 9026. Response received correctly with no translation. Phase 4-27 check passed.
    <11:43:23>: UDP RTP Port 9027. Response received correctly with no translation. Phase 4-28 check passed.
    <11:43:23>: UDP RTP Port 9028. Response received correctly with no translation. Phase 4-29 check passed.
    <11:43:23>: UDP RTP Port 9029. Response received correctly with no translation. Phase 4-30 check passed.
    <11:43:23>: UDP RTP Port 9030. Response received correctly with no translation. Phase 4-31 check passed.
    <11:43:23>: UDP RTP Port 9031. Response received correctly with no translation. Phase 4-32 check passed.
    <11:43:23>: UDP RTP Port 9032. Response received correctly with no translation. Phase 4-33 check passed.
    <11:43:23>: UDP RTP Port 9033. Response received correctly with no translation. Phase 4-34 check passed.
    <11:43:23>: UDP RTP Port 9034. Response received correctly with no translation. Phase 4-35 check passed.
    <11:43:23>: UDP RTP Port 9035. Response received correctly with no translation. Phase 4-36 check passed.
    <11:43:23>: UDP RTP Port 9036. Response received correctly with no translation. Phase 4-37 check passed.
    <11:43:23>: UDP RTP Port 9037. Response received correctly with no translation. Phase 4-38 check passed.
    <11:43:23>: UDP RTP Port 9038. Response received correctly with no translation. Phase 4-39 check passed.
    <11:43:23>: UDP RTP Port 9039. Response received correctly with no translation. Phase 4-40 check passed.
    <11:43:23>: UDP RTP Port 9040. Response received correctly with no translation. Phase 4-41 check passed.
    <11:43:23>: UDP RTP Port 9041. NO RESPONSE received. Phase 4-42 check failed with ERRORS. Some functionality will be LIMITED. For more information, please visit http://www.3cx.com/blog/docs/firewall-checker/
    <11:43:23>: UDP RTP Port 9042. Response received correctly with no translation. Phase 4-43 check passed.
    <11:43:23>: UDP RTP Port 9043. Response received correctly with no translation. Phase 4-44 check passed.
    <11:43:23>: UDP RTP Port 9044. Response received correctly with no translation. Phase 4-45 check passed.
    <11:43:23>: UDP RTP Port 9045. Response received correctly with no translation. Phase 4-46 check passed.
    <11:43:23>: UDP RTP Port 9046. Response received correctly with no translation. Phase 4-47 check passed.
    <11:43:23>: UDP RTP Port 9047. Response received correctly with no translation. Phase 4-48 check passed.
    <11:43:23>: UDP RTP Port 9048. Response received correctly with no translation. Phase 4-49 check passed.
    <11:43:23>: UDP RTP Port 9049. Response received correctly with no translation. Phase 4-50 check passed.
    Application exit code is 4

    Hi Sir,
    I'm sorry if i dind't understand your question, but already you tried the configuration as attached? Please change the IP to your 3CX IP.
    Regards.
    Andrey Cassemiro

Maybe you are looking for