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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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 ?
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.
in the latest version from github https://github.com/ymartineau/peers, it
should send the packet to the rport which is added by peers sip stack in
invite via, when invite is received and then copied to the response:
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.
if you don't want to use git, you can download a zip on peers github page https://github.com/ymartineau/peers, using the "download zip" button
bottom right, but I don't think it has been modified after 0.5 release,
really odd. I guess I'll have to double check
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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 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
which version of peers are you working on?
in the latest version from github https://github.com/ymartineau/peers, it
should send the packet to the rport which is added by peers sip stack in
invite via, when invite is received and then copied to the response:
TransportManager.java:231
https://github.com/ymartineau/peers/blob/master/peers-lib/src/main/java/net/sourceforge/peers/sip/transport/TransportManager.java#L231:
(in sendResponse method)
On Tue, Oct 13, 2015 at 3:51 PM, Marc Sandmeier the-falsifier@users.sf.net
wrote:
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
if you don't want to use git, you can download a zip on peers github page
https://github.com/ymartineau/peers, using the "download zip" button
bottom right, but I don't think it has been modified after 0.5 release,
really odd. I guess I'll have to double check
On Wed, Oct 14, 2015 at 7:47 AM, Marc Sandmeier the-falsifier@users.sf.net
wrote:
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