Local VoIP call with SIP
Asked Answered
M

1

3

I wanna make SIP peer to peer VoIP call in android. This call should be made in local network without any need to access to internet. In fact I don't want to use any external server to register the profiles. But I don't know what to write in serverDomain in profile builder. This is the constructor

public SipProfile.Builder (String username, String serverDomain)

Suppose that one ip is 192.168.1.2 and the other is 192.168.1.3

So in initializing function what should I pass as serverDomain to the constructor?

Malang answered 27/8, 2014 at 6:24 Comment(0)
A
1

I would guess the URI in the From: header comes out as username@ServerDomain, so your local IP address would be OK. There is not enough other information there for any registration going on anyway.

Austine answered 27/8, 2014 at 11:25 Comment(9)
Thanks but Like how? like this? "[email protected]" while the target's ip is 192.168.1.3?Malang
More likely to be the local one and use setOutboundProxy for the target.Austine
Can you write some code please? I don't know what you mean. Or any example about this? because I found nothing on internet except that everybody said this is possible without mentioning how.Malang
This page should help: developer.android.com/reference/android/net/sip/… Just create SipBuilder with your local details and then call setOutboundProxy with the remote address. But I'm not an Android developer and I only know about SIP so that's the best I can do.Austine
My problem has nothing to do with android programming dude. This is all SIP issues. And yes I have visited that page. There's not enough clarification about how to do this and even that did't explain how to use setOutboundProxy(). I'm totally confused. I don't have any idea on what to write for serverDomain parameter.Malang
serverDomain - your own ip address eg 192.168.1.2. setOutboundProxy - the remote one eg 192.168.1.3. Just try it and see what happens.Austine
if you mean this : SipProfile.Builder builder = new SipProfile.Builder("TestUser", "192.168.1.2"); builder.setOutboundProxy("192.168.1.3"); then registeration fails with errorCode -9Malang
Let us continue this discussion in chat.Austine
Hi. Did you found the answer ? I have the same question.Consumption

© 2022 - 2024 — McMap. All rights reserved.