Direct IP call android

2020-08-05 10:34发布

Im creating an Android App in which the clients can call each other without using a SIP proxy (server).

I downloaded the CSipSimple, it has a "local" option in which the clients in a local network can call each other directly.

What if I am connected to the mobile network. If i know the public IP of the destination, can I call him direclty?

If you can suggest another applications that fulfill the mentioned requirements please do mention them.

thanks

1条回答
冷血范
2楼-- · 2020-08-05 11:20

Yes, you should be able to make direct call with almost all SIP clients. I am using mizudroid and works with that.

In this case, you just need to enter the full URI for the destination and not just the extension name.

So instead of calling to "john" you will have to enter

john@ipaddress:port

Example:

john@192.168.1.33:14321

Some sip clients might require to prefix all these with "sip:":

sip:john@192.168.1.33:14321

As you can see, the tricky part is to find out the correct port. SIP clients are using random local ports by default, but some of them allows you to set the port explicitly. (Don't be confused with the server sip signaling ports which is usually 5060 after the SIP standards.)

Also please note that the role of a sip registrar is exactly this: so you don't have to play finding out the peer's exact address as the server can handle this for you automatically.

Some sip clients might require to enter a sip server address in settings/login, however most of them allows you to use the softphone without any address entered or they have an option to specify serverless/local/registerless or you might just enter a fake address (then the softphone might display "register failed" but you should be able to make direct calls as i have described above)

查看更多
登录 后发表回答