This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void send_register() { | |
try { | |
System.out.println(); | |
SipStackAndroid.getInstance(); | |
AddressFactory addressFactory = SipStackAndroid.addressFactory; | |
SipStackAndroid.getInstance(); | |
SipProvider sipProvider = SipStackAndroid.sipProvider; | |
SipStackAndroid.getInstance(); | |
MessageFactory messageFactory = SipStackAndroid.messageFactory; | |
SipStackAndroid.getInstance(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SipStackAndroid implements SipListener { | |
protected SipStackAndroid() { | |
initialize(); | |
} | |
public static SipStackAndroid getInstance() { | |
if (instance == null) { | |
instance = new SipStackAndroid(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void processResponse(ResponseEvent arg0) { | |
Response response = (Response) arg0.getResponse(); | |
ClientTransaction tid = arg0.getClientTransaction(); | |
System.out.println(response.getStatusCode()); | |
if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED | |
|| response.getStatusCode() == Response.UNAUTHORIZED) { | |
AuthenticationHelper authenticationHelper = ((SipStackExt) sipStack) | |
.getAuthenticationHelper(new AccountManagerImpl(), | |
headerFactory); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void sendMessage(String to, String message) throws ParseException, | |
InvalidArgumentException, SipException { | |
SipStackAndroid.getInstance(); | |
SipURI from = SipStackAndroid.addressFactory.createSipURI(SipStackAndroid.getInstance().sipUserName, SipStackAndroid.getInstance().localEndpoint); | |
SipStackAndroid.getInstance(); | |
Address fromNameAddress = SipStackAndroid.addressFactory.createAddress(from); | |
SipStackAndroid.getInstance(); | |
FromHeader fromHeader = SipStackAndroid.headerFactory.createFromHeader(fromNameAddress, | |
"Tzt0ZEP92"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
stages { | |
stage ('InstallDependencies') { | |
steps { | |
script{ | |
sh ''' | |
sudo pip install molecule==2.20.1 --ignore-installed | |
sudo pip install boto3==1.9.152 | |
sudo pip install ansible==2.7.5 --force-reinstall | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "amazon-ebssurrogate", | |
"region": "{{user `region`}}", | |
"ssh_username": "ec2-user", | |
"instance_type": "{{user `instance_type`}}", | |
"source_ami": "{{user `source_ami`}}", | |
"ami_architecture": "arm64", | |
"ami_name": "ami-{{isotime \"2006-01-02 03.04.05\"}}", |