Skip to content

Commit

Permalink
Use Always On instead of separate dedicated instance. Trivial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atsakiridis committed Aug 24, 2015
1 parent 96d6a9e commit 9a945cb
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 28 deletions.
1 change: 1 addition & 0 deletions RestCommClient/RestCommClient/CliInterface/ssc_sip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ ssc_t *ssc_create(su_home_t *home, su_root_t *root, const ssc_conf_t *conf, cons
contact = conf->ssc_contact;
else
contact = "sip:*:5090;transport=tcp";
//contact = "sip:*:5090;transport=tcp";

/* step: launch the SIP stack */
ssc->ssc_nua = nua_create(root,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--RestComm Client-->
Expand All @@ -17,28 +18,44 @@
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DEU-Hh-53C">
<rect key="frame" x="445" y="858" width="227" height="76"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Rv-tN-wXu">
<rect key="frame" x="64" y="858" width="270" height="76"/>
<color key="backgroundColor" red="0.87566179040000003" green="0.8756355643" blue="0.87565040589999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="76" id="Fmk-lz-FDf"/>
<constraint firstAttribute="width" constant="270" id="V2Q-MD-fq1"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="50"/>
<state key="normal" title="Hang up">
<state key="normal" title="Dial">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="hangUpPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Oys-zl-Tt0"/>
<action selector="dialPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="QAk-OV-VPF"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Rv-tN-wXu">
<rect key="frame" x="96" y="858" width="116" height="76"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DEU-Hh-53C">
<rect key="frame" x="434" y="858" width="270" height="76"/>
<color key="backgroundColor" red="0.87566179040000003" green="0.8756355643" blue="0.87565040589999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="270" id="WbO-wa-xRt"/>
<constraint firstAttribute="height" constant="76" id="nwL-TP-hT2"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="50"/>
<state key="normal" title="Dial">
<state key="normal" title="Hang up">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="dialPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="QAk-OV-VPF"/>
<action selector="hangUpPressed:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Oys-zl-Tt0"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="2Rv-tN-wXu" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="44" id="B0s-nb-Rsg"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="DEU-Hh-53C" secondAttribute="bottom" constant="90" id="PkN-PD-KLu"/>
<constraint firstAttribute="trailingMargin" secondItem="DEU-Hh-53C" secondAttribute="trailing" constant="44" id="aq3-uF-dRA"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="2Rv-tN-wXu" secondAttribute="bottom" constant="90" id="hvI-iM-TSW"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="RestComm Client" id="C2i-Za-EiQ"/>
</viewController>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--RestComm Client-->
Expand All @@ -17,8 +18,13 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="erB-03-wsH">
<rect key="frame" x="31" y="501" width="66" height="45"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="erB-03-wsH">
<rect key="frame" x="21" y="501" width="120" height="45"/>
<color key="backgroundColor" red="0.87566179040000003" green="0.8756355643" blue="0.87565040589999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="8K9-P5-6Qf"/>
<constraint firstAttribute="height" constant="45" id="ehM-kn-9nK"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="25"/>
<state key="normal" title="Dial">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -27,8 +33,13 @@
<action selector="dialPressed:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="kFl-Bb-N2Y"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Nyi-ak-3Ea">
<rect key="frame" x="169" y="501" width="120" height="45"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Nyi-ak-3Ea">
<rect key="frame" x="179" y="501" width="120" height="45"/>
<color key="backgroundColor" red="0.87566179040000003" green="0.8756355643" blue="0.87565040589999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="eQW-VJ-Wzf"/>
<constraint firstAttribute="width" constant="120" id="qzG-hs-15v"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="25"/>
<state key="normal" title="Hang up">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
Expand All @@ -40,7 +51,9 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="erB-03-wsH" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="5" id="AVf-yy-sH6"/>
<constraint firstItem="2fi-mo-0CV" firstAttribute="top" secondItem="Nyi-ak-3Ea" secondAttribute="bottom" constant="22" id="Sn7-ir-fm3"/>
<constraint firstAttribute="trailingMargin" secondItem="Nyi-ak-3Ea" secondAttribute="trailing" constant="5" id="Tv2-1J-F5r"/>
<constraint firstItem="2fi-mo-0CV" firstAttribute="top" secondItem="erB-03-wsH" secondAttribute="bottom" constant="22" id="mi9-de-w5a"/>
</constraints>
</view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ - (void)viewDidLoad
nil];

// CHANGEME: set the IP address of your RestComm instance in the URI below
[self.parameters setObject:@"sip:54.225.212.193:5080" forKey:@"registrar"];
[self.parameters setObject:@"sip:23.23.228.238:5080" forKey:@"registrar"];

// initialize RestComm Client by setting up an RCDevice
self.device = [[RCDevice alloc] initWithParams:self.parameters delegate:self];
Expand All @@ -53,12 +53,6 @@ - (void)viewDidLoad
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(unregister:) name:UIApplicationWillResignActiveNotification object:nil];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

// ---------- UI events
- (IBAction)dialPressed:(id)sender
{
Expand All @@ -69,7 +63,7 @@ - (IBAction)dialPressed:(id)sender

// CHANGEME: set the number of the RestComm Application you wish to contact (currently we are using '1235',
// which is the Hello World RestComm Application). Also set the ip address for your RestComm instance
[self.parameters setObject:@"sip:1235@54.225.212.193:5080" forKey:@"username"];
[self.parameters setObject:@"sip:1235@23.23.228.238:5080" forKey:@"username"];

// call the other party
self.connection = [self.device connect:self.parameters delegate:self];
Expand Down Expand Up @@ -167,6 +161,12 @@ - (void)connectionDidDisconnect:(RCConnection*)connection
self.connection = nil;
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (BOOL)shouldAutorotate
{
return YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
@end

@protocol CallDelegate <NSObject>
- (void)callViewController:(CallViewController *)callViewController didSendStatus:(NSString *)status;
//- (void)callViewController:(CallViewController *)callViewController didSendStatus:(NSString *)status;
@end
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

char AOR[] = "sip:[email protected]";
// elastic
char REGISTRAR[] = "54.225.212.193:5080";
char REGISTRAR[] = "23.23.228.238:5080";
//char REGISTRAR[] = "192.168.2.32:5080";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ - (void)viewDidLoad
[self.view addGestureRecognizer:tapGesture];
#ifdef DEBUG
// set some defaults when in debug to avoid typing
self.sipUriText.text = @"sip:1235@54.225.212.193:5080";
self.sipUriText.text = @"sip:1235@23.23.228.238:5080";
//self.sipUriText.text = @"sip:[email protected]:5080";
#else
self.sipUriText.text = @"sip:1235@54.225.212.193:5080";
self.sipUriText.text = @"sip:1235@23.23.228.238:5080";
#endif

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(register:) name:UIApplicationDidBecomeActiveNotification object:nil];
Expand Down

0 comments on commit 9a945cb

Please sign in to comment.