Menu

softphone doesn't use the source port of the partner

Help
2015-09-03
2015-10-15
  • Marc Sandmeier

    Marc Sandmeier - 2015-09-03

    Hello
    I'm writing a bash shell to interact with VoiP phones and software. The bash sends an invite request to softphone directly about the ip of my pc. I'm not using a proxy, and softphone isn't registered.

    My problem: softphone always use the port number for sip in the config-file (<sipPort>5060</sipPort>
    ) to send the ringing answer to my linux server. But, if my bash opens the socket with /dev/udp/myPC/5060, the system gives it a source port from the ephemeral port list - 32768 to 61000. So my bash doesn't receive the answer, because it has the port 40000 for example. If I use a trick, where I set the ephemeral port range on 5060 to 5060, my source port is 5060. In this case, my bash communicates with softphone without any problems.

    Why doens't softphone use the source port of the invite paket to contact the bash on my server ?

    Best Regards
    Marc

     
    • yohannmartineau

      yohannmartineau - 2015-09-13

      hi,

      can you send network traces (transport.log)? or a capture done by wireshark.
      It should send the answer to the source port of the received packet. Can
      you also include peers.log?

      thanks,

      yohann

      On Thu, Sep 3, 2015 at 11:39 AM, Marc Sandmeier the-falsifier@users.sf.net
      wrote:

      Hello
      I'm writing a bash shell to interact with VoiP phones and software. The
      bash sends an invite request to softphone directly about the ip of my pc.
      I'm not using a proxy, and softphone isn't registered.

      My problem: softphone always use the port number for sip in the
      config-file (<sipPort>5060</sipPort>
      ) to send the ringing answer to my linux server. But, if my bash opens the
      socket with /dev/udp/myPC/5060, the system gives it a source port from the
      ephemeral port list - 32768 to 61000. So my bash doesn't receive the
      answer, because it has the port 40000 for example. If I use a trick, where
      I set the ephemeral port range on 5060 to 5060, my source port is 5060. In
      this case, my bash communicates with softphone without any problems.

      Why doens't softphone use the source port of the invite paket to contact
      the bash on my server ?

      Best Regards
      Marc


      softphone doesn't use the source port of the partner
      https://sourceforge.net/p/peers/discussion/683024/thread/a2a27b82/?limit=25#e00f


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/peers/discussion/683024/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Marc Sandmeier

        Marc Sandmeier - 2015-10-13

        Hello,
        I have attached the log of peers. It contents two tests. One with port 5060 as the only ephemeral port and another with the port range 32768 to 61000 for the ephemeral ports. In the first case the communication functions, but in the second not.
        The phone isn't registered on any sip server in the net ! Initially peers tries to register several times, and after some circles it ends this work and writes a "Registration failed" on the screen. But if you see in the first case, I can communicate.

        Best Regards
        Marc

         
  • Marc Sandmeier

    Marc Sandmeier - 2015-10-14

    Hello Yohann,
    I downloaded the paket peers-gui-0.5-bin.zip from sourceforge. Have you the latest update as zip-package ready for download ?

    Best Regards
    Marc

     

    Last edit: Marc Sandmeier 2015-10-14
  • Marc Sandmeier

    Marc Sandmeier - 2015-10-15

    Hello,
    the zip contents only sourcecode. But I have no javac, so I can't compile it. It would be good for better testing, if you additionally make a binary available for download.

    Best Regards
    Marc

     

Log in to post a comment.