Thursday, March 8, 2012

CounterPath Bria for iPhone version 2.0.2 - Update

In January I posted a blog on my NetCraftsmen blog site discussing the CounterPath Bria for iPhone Version 2.0. During my testing of 2.0 I came across a few issues that were to be addressed in version 2.0.1. Version 2.0.1 hit the AppStore in early February. I loaded the app, looking forward to doing some testing in the home lab. Fortunately, I was delayed due to work obligations. I say fortunately because version 2.0.2 was released on March 3rd. Anyway, I wanted to give an update to my original blog.

Background

I originally tested CounterPath 2.0 on the iPhone (actually iPod Touch) to test video capabilities between CounterPath the Cius and the Cisco 9951. Of course, I tested out a few other features. I came across a couple of issues that CounterPath has apparently resolved in the 2.0.1 and 2.0.2 releases.

What's Changed

Based on the change log in version 2.0.2, the following changes were made:
  • History entries with additional labels
  • Updated translations
  • Online quick help
  • TLS connection reuse improvement
  • Added more video settings
  • Added more SIP advanced settings
  • Putting call on hold fix (Yay!)
  • XMPP connections more reliable
  • Other fixes
For completeness, we should also note the change log for version 2.0.1:
  • Added "Send Landscape" setting to accommodate apps that are not able to render the portrait orientation; this will help you with hard phones (e.g. Cisco 9951)
  • Added video setting: "Always Offer Video"
  • Other video related improvements
  • Improvement to TCP transport handling. 
  • Selected better QoS DSCP values (using SIP QoS DSCP 40 and RTP QoS DSCP 46)
  • Allow sending DTMF when in a conference call
  • Allow (audio) conference from video calls
  • More robust account registration
  • Improved battery life for UDP accounts when "Run in Background" is off
  • GUI improvements
  • Other fixes
Version Information

As with my 2.0 testing I used the following versions:
  • CUCM 8.5(1)SU3
  • CounterPath Bria 2.0.2 (tested on iPod Touch)
  • 4th Generation iPod Touch running iOS 5.0.1
Note: CounterPath for iPhone also supported on iPhone 4S/4/3GS/3G, iPad 1/2, iPod Touch 2nd/3rd/4th gen
CUCM Configurations

The CUCM configurations I used are the same as in previous tests. Since I am testing video, I provisioned the client as a 3rd Party advanced SIP device.

Notable Changes in Configuration

During the testing of version 2.0, I was unable to use TCP on the CounterPath Bria client. The primary drawback was that I couldn't run the client in the background on the iPod touch. I had problems with call establishment w/TCP and if using UDP along with the "Run In Background" application feature.

With 2.0.2 the TCP transport works correctly. I also confirmed that (for me) using UDP as the transport along with the "Run in Background" Bria option works. For purposes of this blog, we will focus on using TCP as a transport as it is (a) more reliable and (b) optimal for battery consumption. To use TCP, ensure that the SIP Security profile in CUCM is configured to use TCP+UDP or TCP only.

In addition, if you want to run Bria in the background on your iDevice without enabling the "Run in Background" option (which consumes more battery life) then you will need to tweak some settings in your CUCM device SIP profile. Specifically:
  • Timer Register Expires (seconds): This should be set to something higher than 600
  • Timer Keep Alive Expires (seconds): This should be set to something higher than 600 
  • Timer Subscribe Expires (seconds): This should be set to something higher than 600
I tested the above timers at 900 (see "Tips on Battery Usage" at the end of this blog).
CounterPath Bria Configurations

For the most part, I kept the same configurations as I used for the 2.0 testing. There are several new parameters that may be of interest:
  • SIP Account Configurations:
    • Always Offer Video: As one would expect you can always send video options during the capabilities exchange phase of establishing a call. I prefer to leave this at the default setting of "off"
    • Auto Send Video: Once a call is established, you will automatically stream video to the remote party. Again, I leave this "off" but that is only personal preference.
  • SIP Account Advanced Settings:
    • SIP Transport: Use TCP if you want to run Bria in the background without enabling the "Run in Background" option. 
  • Preferences:
    • Run in Background: Lets you receive calls when Bria is running in the background and your transport is UDP. With TCP, this setting is not necessary.
    • Video Calls::Send Landscape: In version 2.0, if you held the iPhone in "portrait" mode (camera on top) then video would not render on a Cisco 9900 series phone. In 2.0.2 the "Send Landscape" option forces the Bria client to send the video image in landscape mode regardless of how you are holding the device.
Differences Between 2.0 and 2.0.2 + TCP

When testing version 2.0, I could not use TCP as a transport. Through troubleshooting I was able to narrow the issue down to the fact that the SIP-UA registers it sets the contact information in the Contact header to use a different TCP port than is actually used by the socket. The CUCM honors the TCP port in the Contact header and tries to signal ingress calls using that port. Unfortunately, iOS sees this as a problem and blocks the ingress connection. To illustrate, assume CUCM receives the following SIP REGISTER message:

REGISTER sip:ucguerrilla.priv SIP/2.0
Via: SIP/2.0/TCP 10.3.197.16:60415;rport;branch=[stuffdeleted];alias
Max-Forwards: 70
From: "Bill" < sip:+13011055200@ucguerrilla.priv > tag=[stuff deleted]
To: "Bill" < sip:+12011055200@ucguerrilla.priv >
Call-ID: [stuff deleted]
CSeq: 48433 REGISTER
User-Agent: Bria iOS 2.0.0
Contact:"Bill" <sip:+13011055200@10.3.197.16:60414;transport=TCP>
Expires: 600
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

The "Via" line shows the TCP port used on the Bria device. Notices how this port is different than what is specified on the Contact line. When a remote station calls the Bria device, CUCM will use the TCP port of the contact line and the call will fail since iOS is expecting a reply on port 60415.

The following is a SIP REGISTER message from my 2.0.2 Bria SIP-UA:

REGISTER sip:ucguerrilla.priv SIP/2.0
Via: SIP/2.0/TCP 10.3.197.22:54494;rport;branch=[stuffdeleted];alias
Max-Forwards: 70
From: "Bill" < sip:+13011055200@ucguerrilla.priv > tag=[stuff deleted]
To: "Bill" < sip:+12011055200@ucguerrilla.priv >
Call-ID: [stuff deleted]
CSeq: 29875 REGISTER
User-Agent: Bria iOS 2.0.2
Contact:"Bill" <sip:+13011055200@10.3.197.22:54494;transport=TCP;ob>
Expires: 900
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

Note that the "Contact" and "Via" lines in the header use the same TCP port.


iOS Configurations

Enabling TCP (or UDP + "Run in Background") isn't enough to make the Bria client useful when minimized. You also have to modify the Notification settings on your iPhone/iPod. To do this go to Settings from your iOS device and select Notifications. Scroll down and select "Bria"


Modify the alert style to use either "Banners" or "Alerts" (whichever you prefer. You will also want to enable "Sounds" or you won't here your phone ring. I also like enabling the "View in Lock Screen" option.

Now while Bria is running in the background you will still receive alerts. For example, the following shows a Banner alert when a new call is presented (left) and when a missed call is logged (right):




When the screen is locked the alert is presented as a pop up window in the center of the screen, as shown below:



Tips on Battery Usage

Battery life is always a huge consideration on mobile devices. Depending on your work environment you may need these devices to stay charged for 8+ hours. Here are some tips to consider that will help improve battery life:
  • Send Bria to the background when not in use. Bria uses less battery when running in the background.
    • You can run Bria in background only on certain devices that run iOS 4 or higher
    • Using TCP is preferred
    • You will want to disable the "Run in Background" option in preferences (unless you have to use UDP). This option increases battery usage.
  • If you have multiple accounts, only enable those that you use regularly.
  • Try to set a SIP Registration Interval (Accounts>Accounts Advanced) to something high (at least 900 but something like 3600 would be optimal)
    • The biggest hit for the battery life is data transmission, so reducing the frequency of message exchange between Bria and CUCM is optimal
    • You will need to test which setting works best in your environment (I tested with 600 and 900)
  • Make sure that Verbose Logging is disabled (Advanced Settings)

No comments:

Post a Comment