Skip to content

Instantly share code, notes, and snippets.

@arslan70
Last active August 29, 2015 14:06
Show Gist options
  • Save arslan70/b79cc7a9f1300291b048 to your computer and use it in GitHub Desktop.
Save arslan70/b79cc7a9f1300291b048 to your computer and use it in GitHub Desktop.
localIp = getIPAddress(true);
localEndpoint = localIp + ":" + localPort;
remoteEndpoint = remoteIp + ":" + remotePort;
sipFactory = SipFactory.getInstance();
sipFactory.setPathName("com.telestax");
Properties properties = new Properties();
properties.setProperty("tavax.sip.OUTBOUND_PROXY", remoteEndpoint + "/"
+ transport);
properties.setProperty("tavax.sip.STACK_NAME", "androidSip");
try {
sipStack = sipFactory.createSipStack(properties);
System.out.println("createSipStack " + sipStack);
} catch (PeerUnavailableException e) {
e.printStackTrace();
}
try {
udpListeningPoint = sipStack.createListeningPoint(localIp,
localPort, transport);
sipProvider = sipStack.createSipProvider(udpListeningPoint);
sipProvider.addSipListener(SipStackAndroid.getInstance());
} catch (PeerUnavailableException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment