Android Question SIP port - impossible to set?

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends,

I set
B4X:
Sip.Initialize2("SIP", "[email protected]", "")
Sip.Port=5060
Sip.Register

or

Sip.Initialize2("SIP", "[email protected]:5060", "")
Sip.Register

but this code cant set the port to 5060
please, why it is happen?

Thank you very much
p4ppc
 
Last edited:

petr4ppc

Well-Known Member
Licensed User
Longtime User
Erel,

thank you for your answer, is it possible, that this "mistake" depend on mobile phone or some part of mobile phone? I am trying it on three phones and with 3 routers and with 3 computers, but I see the same situation = function of SIP is OK, but with using bad port <> 5060. But I have set port 5060 and I am trying communication with and without antivir and firewall.

Thank you very much,
p4ppc
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Erel, please very much,

can you write me some examples, which can be reason, why I can't set port to 5060, please?
I have this situation all the time and I dont know why it is happen...

Thank you very much and Best regards
p4ppc
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
TIGROT -
thank you for your advice. I tryed something different - I have used different SIP app from google play and this app can connect to the port 5060. This is the reason, why I can say, that on PC side is everything ok.
What I am doing wrong? Is something what I must set on the phone? Something in Android settings?

Thank you very much,
Best regards
p4ppc
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Erel,

In the PC I am listening on the port 5060
If I am trying using different port in B4A code, for example 5066, then YES - I can register to the SIP server, which is listening on 5060.

p4ppc
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Erel,

I wrote mistake. Before phone restarting I saw that I can connect to the server listening on port 5060 with app where is set port 5066. But after restarting this phone I can not repeat this situation. It does it mean that this is OK.

Now I must say, that I not understand what you wrote:
Does it work when you use a different port?
You mean on PC side still 5060 port and I must try to change port on mobile app side?

Thank you very much,
best regards
p4ppc
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Erel,

thank you for possibility to describe the situation again:
I am using SIP server for Windows. Its free. Developer si: https://www.kaplansoft.com/
Download link from developer site is here: https://www.kaplansoft.com/teksip/release/TekSIP.zip

- In my phone I am using basic b4a code for SIP communication
- In b4a code I have SET port = 5060, but it is not set
(I know it because teksip show actual communication port for each registration (connection) and it is not 5060)
- It is not 5060 but I can realize SIP communication. Everything is OK with calling. Only port I cant SET to 5060
- If I am trying some other "profi" free SIP apps with Windows sip server TEKsip, then TEK sip show port 5060.
With this apps the connection is set right to port 5060.
- I have tryed it with minimum 3 computers and the situation is same, it is not on the side of computers

What I need is possibility to SET the PORT to 5060.
Please, it is possible?

Thank you very much,
Best regards
p4ppc
 
Last edited by a moderator:
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Erel,

I am sending screenshot - Screenshottek.jpg.
There is show column PORT and in this column I see value 53612 - it is from my app.

Please, it is possible that the number of port depend on phone HW?
Best regards
p4ppc
 

Attachments

  • screenshottek.jpg
    screenshottek.jpg
    41.8 KB · Views: 189
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
I don't think this port has something to do with port 5060 which is a port on which SIP server gets comands for registration. After that it assigns another port on which it will get RTP and this is your port 53612(normally should be less than 2^15). I did VOIP many years ago and I don't remember very well.
 
Upvote 0

petr4ppc

Well-Known Member
Licensed User
Longtime User
TIGROT - thank you very much for your answer.

but

If I am doing new registration, then for each registration I see new port number with my app.

And if I am trying for example free media5-fone app from googleplay, then I see that this app can hold the same PORT = 5062 in each registration.

This is what I need.
I have tested many examples and situations and I need to hold the port number. (ideal 5060). Please see attachement with port from media5-fone app

Thank you very much,
Best regards
p4ppc
 

Attachments

  • screenshottek2.jpg
    screenshottek2.jpg
    45.8 KB · Views: 187
Upvote 0
Top