Reference11r1:Concept myPBX for Android: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
Line 61: Line 61:
The vars create command needs its value URL encoded. Spaces must be denoted as %2520 to leave %20 after the first step of URL decoding. E.g. the configuration command
The vars create command needs its value URL encoded. Spaces must be denoted as %2520 to leave %20 after the first step of URL decoding. E.g. the configuration command
  <nowiki>vars create PHONE/USER-REG/00001 p %3creg+gk-addr=%27172.16.1.1%27+e164=%27123%27+h323=%27test%27+/%3e</nowiki>
  <nowiki>vars create PHONE/USER-REG/00001 p %3creg+gk-addr=%27172.16.1.1%27+e164=%27123%27+h323=%27test%27+/%3e</nowiki>
needs to be embedded in the mail as
where each + means space needs to be embedded in the mail as
  <nowiki>vars+create+PHONE/USER-REG/00001+p+%3creg%2520gk-addr=%27172.16.1.1%27%2520e164=%27123%27%2520h323=%27test%27%2520/%3e</nowiki>
  <nowiki>vars+create+PHONE/USER-REG/00001+p+%3creg%2520gk-addr=%27172.16.1.1%27%2520e164=%27123%27%2520h323=%27test%27%2520/%3e</nowiki>



Revision as of 16:37, 29 January 2018

Version 11 introduces myPBX for Android, an Android app that provides similar features than the desktop phones IP222 and IP232 in the WLAN via H.323.

Requirements

PBX

  • myPBX license of the same version (enabled at the user object)
  • Uses Port-Lic since does an active registration on the PBX like an IP Phone.

Smartphone

  • Any smartphone running Android 4.1 or higher for best performance but interoperability with earlier Android versions beginning with 1.6 is supported.

Features

For a feature overview refer to myPBX derivates and features.

Installation

Install the app from Google Play using the link myPBX for Android on Google Play

https://play.google.com/store/apps/details?id=com.innovaphone.phoneandroid

Or, on the browser of your smartphone locate the file mypbx.apk from the download link published by innovaphone. The download should start and once finished install the app by click on the mypbx.apk in the status window. It requires that installation of non-market applications is enabled in the security settings of the smartphone. myPBX for Android is currently not yet available from the app store. You can find the un-zipped .apk-File in the plain download directory on the download site (e.g. build 113xxxxx in the 11r2 download site).

Start the myPBX for Android app and enter the credentials for registration on your PBX in the setup screen.

Configuration via WEB browser

For configuration via WEB browser determine the IP address that has been assigned to the smartphone in the WLAN. It's shown on the setup screen of the app and in the WLAN settings. Access http on port 10006 or https on port 10007 from the browser of a PC:

http://xx.xx.xx.xx:10006
https://xx.xx.xx.xx:10007

To log in to the configuration enter

User name: admin
Password: mypbx

Configuration via e-mail

Since 12r1 sr 8 and 12r2 beta 4 configuration commands can be passed to the app via an URI. The URI might be sent to the smartphone by e-mail or made available as link in a web page. The URI must start with

http://com.innovaphone.commands/

I.e. URI scheme "http" and host part "com.innovaphone.commands". It might be followed by any sequence of configuration commands to set module parameters or variables. Please refer to the update script documentation. Spaces within each command must be replaced by '+'. Commands must be separated by newline which needs to be replaced by "%0d%0a". E.g.

config change PHONE SIG /h323 user /prot SH323 /gk-addr thepbx.company.com
vars create PHONE/USER-PWD/00000 pc 1234567890abcdef
config change MEDIA /stun thestun.company.com /turn theturn.company.com /turn-user turnuser
vars create MEDIA/TURN-PWD pc 8cb5df61335a13ea6a9f540db8224d99cecfe54ec663f29ea94df478ccc1c285
config change UP1 /url http://updateserver.company.com/init /poll 1
config change MAIN /deny-uri-commands 1
config activate
config write
reset

Results in the following prepared link

http://com.innovaphone.commands/config+change+PHONE+SIG+/h323+user+/prot+SH323+/gk-addr+thepbx.company.com%0d%0a
vars+create+PHONE/USER-PWD/00000+pc+1234567890abcdef%0d%0a
config+change+MEDIA+/stun+thestun.company.com+/turn+theturn.company.com+/turn-user+turnuser%0d%0a
vars+create+MEDIA/TURN-PWD+pc+8cb5df61335a13ea6a9f540db8224d99cecfe54ec663f29ea94df478ccc1c285%0d%0a
config+change+UP1+/url+http://updateserver.company.com/init+/poll+1%0d%0a
config+change+MAIN+/deny-uri-commands+1%0d%0a
config activate%0d%0a
config write%0d%0a
reset%0d%0a

It might be placed as hypertext link into a mail and sent to the smartphone for first provisioning. Once the user clicks the link, the app starts and carries out the commands.

Note that the command

config change MAIN /deny-uri-commands 1

prevents further provisioning commands via this mechanism.

The vars create command needs its value URL encoded. Spaces must be denoted as %2520 to leave %20 after the first step of URL decoding. E.g. the configuration command

vars create PHONE/USER-REG/00001 p %3creg+gk-addr=%27172.16.1.1%27+e164=%27123%27+h323=%27test%27+/%3e

where each + means space needs to be embedded in the mail as

vars+create+PHONE/USER-REG/00001+p+%3creg%2520gk-addr=%27172.16.1.1%27%2520e164=%27123%27%2520h323=%27test%27%2520/%3e

Settings

Most of the configuration of myPBX for Android in the config screen is identical to the one of the desktop telephone IP222. Instead of the device settings you will find the app settings, which are specific to Android.

Android app settings.jpg

Start automatically

This setting controls automatic start up of myPBX for Android. Note that incoming calls are only indicated if the app is started and either visible or closed via short press of the back button. If it has been stopped via the "Exit" button in the settings screen or long press on the back button, incoming calls are not indicated.

- "If connected to WiFi": The app starts up automatically if connectivity changes to WiFi. It shuts down if connectivity changes to other than WiFi to make sure that it doesn't generate charges due to mobile data traffic. This is the default.

- "If mobile data/WiFi available": It starts up automatically if there is connectivity through WiFi or mobile data. Note that this may generate charges due to mobile data traffic.

- "Always": It starts up automatically if the smartphone is booted and remains running.

- "Never": It never starts up automatically. If telephone functions are needed myPBX for Android must be started manually by click on its app icon.

Use myPBX to dial

These are the options in which situation myPBX for Android takes responsibility for dialing if a call is started from another application on the smartphone, e.g. the contacts. The options are

- "Always ask": Let Android present a list to the user to choose the dialer. This is the default.

- "Never": myPBX for Android never acts as dialer.

- "For internal calls": Internal calls are dialed.

- "For all calls": Responsibility as dialer is taken for all calls.

- "In WiFi": Responsibility as dialer is taken for all calls if connectivity is through WiFi. Without WiFi it's up to the GSM dialer to dial the call. This option is useful if there is a quota on the mobile data traffic.

GSM use

These are the options in which situation a call initiated in myPBX for Android is deferred to the GSM dialer of the smartphone. The options are

- "Never": myPBX for Android dials all calls itself and presents "no channel available" if the registration is not up. This is the default.

- "If registering isn't possible": Calls are deferred to GSM if the registration is not up, i.e. if no WiFi or mobile data connectivity exists.

- "Always for external calls": External calls are deferred to GSM.

- "For all calls": All calls are deferred to the GSM dialer.

- "If not connected to WiFi": myPBX for Android dials all calls itself only if connectivity is through WiFi. Without WiFi all calls are deferred to the GSM dialer.

The last three options are useful if the WiFi or mobile data performance is not good enough for VoIP or if there is a quota on the mobile data traffic. Then the directory and presence information is still available and the calls use the GSM network.

Hang up with docking station

If the smartphone is used with a docking or charging station this option enables automatic call acceptance if the smartphone is lift from the dock and call disconnection if it is put back to the dock. Keep this setting off if the smartphone might be plugged for re-charging during a call as plugging would disconnect the call. The default of this setting if "off".

Auto-rotate screen

Keep this setting on if you want myPBX to automatically react to orientation changes.

Display brightness in docking station

This setting is useful in conjunction with a docking or charging station on the desk. It lets the smartphone keep its screen on while it is put in the station.

- "Display off": The smartphone doesn't keep its screen on when it is in the docking station. This is the default.

- "Dimmed": The smartphone keeps its screen on with lower brightness while it is in the docking station. Be careful with this setting as the screen of some smartphones may suffer if the same content is displayed for long periods even if it's not bright.

- "Bright": The smartphone keeps its screen bright while it is in the docking station. Be careful with this setting as the screen of some smartphones may suffer if the same content is displayed bright for long periods. They may show signs of burn-in afterwards.

Permit CallLog Deletes

myPBX for Android keeps the call log of GSM calls and calls in myPBX in sync. Every WLAN call log entry is duplicated to the GSM call log and every GSM call log entry is duplicated to the myPBX call log. This makes sure that all calls are shown in both logs. If an entry is deleted from the GSM call log it's also deleted in the myPBX call log. The other way requires that myPBX for Andoid deletes entries from the GSM call log. This is only done if the option "Permit CallLog Deletes" is enabled. During the beta phase do not enable it if the GSM call log is critical.

Audio API

Allows to select a specific API for audio streaming. On early Android versions this might be necessary to work around limitations. Options are:

- "Default": myPBX Android chooses the appropriate API according to the Android version of the smartphone.

- "Java": Selects the Java audio API which is available from the very beginning of Android but has been superseded by more efficient APIs.

- "OpenSL ES": Selects OpenSL ES which is an API available since Android 2.3 on most devices. It's stated to be most efficient for voice streaming.

- "RTP": Selects the direct RTP API available since Android 3.1. It doesn't support G.722 for HD Audio.

- "Default (*)", "Java (*)", "OpenSL ES (*)" select the respective API plus a workaround needed for a few old Android devices.

- "Java 48kHz", "OpenSL ES 48 kHz" select the respective API with playback sample rate 48 kHz. This may reduce the audio delay on some devices but puts extended requirements on the execution of the audio thread in myPBX for Android.

WLAN MAC Address

Starting with Android 6.0 the operating system doesn't disclose the real WLAN MAC address to an application any more. It pretends on all devices that it's 020000000000. In this case myPBX for Android assumes a random value based on the timestamp at installation of the app. This might be overwritten e.g. with the real value that is still shown in the Android settings app.

Save log

Starts and stops saving a debug trace on the smartphone. To get the trace connect the smartphone via USB to the PC and locate the file

Android/data/com.innovaphone.phoneandroid/files/phone_logcat.txt

Send logs via e-mail

Prepares an e-mail that contains all log files from

Android/data/com.innovaphone.phoneandroid/files/

ready to send after a support ticket has been opened at innovaphone. Please insert the ticket number in the e-mail subject line prior to sending it.

Update

Install the new version via Google Play or via WEB browser on the smartphone from the link published by innovaphone or via WEB interface Maintenance/Upload/Firmware from a PC.

A seamless downgrade is not possible on Android 4.1 and later. However it is possible via a fresh installation of the app:

- Save the present configuration via WEB interface Maintenance/Download/Config/download

- Uninstall the app from the smartphone

- Install the older version by downloading it again from innovaphone

- Set the same admin password and restore the configuration via WEB interface Maintenance/Upload/Config

Update scripts may be used with myPBX for Android in the same manner as with the desktop phones. The name of the script must be

update-MYPBXA.htm

App updates might be done as part of the script by hosting the new mypbx.apk and adding a line

mod cmd UP0 prot http://firmware-host.domain.com/xxxxxx/ ser xxxxxx

Taking traces

innovaphone always works on improving myPBX for Android and making it as stable as possible on every Android device. If there is a problem please try to capture a trace by turning trace logging on (Settings/App settings/Save log). Re-do the steps to reproduce the problem. Stop logging and get the trace files from

Android/data/com.innovaphone.phoneandroid/files/

or send them by e-mail (Settings/App settings/Send logs via e-mail).

On Android 4.1 or later unexpected halts of an app cannot be traced sophisticatedly by the app itself. If an unexpected halt was encountered please induce a trace report from the Android system:

- Press and hold down all these at the same time: Power + Volume up + Volume down. You will need to hold these down for a couple of seconds then release. You may need a few tries to get it right. When this is done you will feel a short series of vibrations, and then see a Bug report captured in your notifications drop down. Tap on that notification to send the bug report using email.

- Choose to complete the action with Gmail (or any other email client you see).

- Set the email to support@innovaphone.com and add the innovaphone support ticket number in the subject line.

Mobile Data (3G/4G) pcap traces

If there are Android problems in 3G / 4G which do not occur in the WLAN, you can still create with our trace options pcaps.

1. myPBX app under "Settings" -> "Web Configuration". In our webGUI (For my Android 6.0.1 only with chrome usable not with the Android browser (easy chrome open and 127.0.0.1 if no default) and the necessary trace options.

2. myPBX app -> app settings -> "save log"

3. Make calls and in the app settings "Send logs via mail" or even via USB.

4. Important! Deactivate the trace options in the webgui or deactivate logging again! Otherwise, the phone_logcat gradually becomes too large ... even without calls.

Adding ring tones

myPBX for Android supports the ring tones of the Android operating system. Please refer to the Android documentation on how to add ring tones if desired. Note that the smartphone may need to be shut down and rebooted to make the new ring tones available to apps like myPBX for Android.

Known limitations

H.323/TLS Connection not Trusted by Default

Please check the H.323/TLS Known Issues article.

SIP protocol not supported as User-1

If we set the protocol SIP the application will not obtain the mypbx license from the PBX and for that reason will not work, H.323/TCP or H323/TLS must be used.

Known issues

  • Some Android smartphones do not properly support roaming. In this case an active call is likely dropped if the device is moved and needs to connect to another WiFi access point. Please see this discussion in the internet WIFI roaming not working.
http://code.google.com/p/android/issues/detail?id=12649
  • Due to a limitation in the Android IP stack it's not possible to maintain more than one active H.323 registration to the same gateway / IP address using the default port 1719. As a workaround configure an alternative port at the PBX:
http://xx.xx.xx.xx/!config change H323 /ras-port-alt 10008
http://xx.xx.xx.xx/!config write
http://xx.xx.xx.xx/!reset

Configure myPBX for Android to use this port:

http://xx.xx.xx.xx:10006/!config change H323 /ras-port 10008
http://xx.xx.xx.xx:10006/!config write
http://xx.xx.xx.xx:10006/!reset
  • On some smartphones the Android IP stack has another limitation if H.323 is done on a VPN connection. As result the H.323 registration requests are rejected. Do the same workaround as above then and configure an alternative port to 1719 at the PBX:
http://xx.xx.xx.xx/!config change H323 /ras-port-alt 10008
http://xx.xx.xx.xx/!config write
http://xx.xx.xx.xx/!reset

Configure myPBX for Android to use this port:

http://xx.xx.xx.xx:10006/!config change H323 /ras-port 10008
http://xx.xx.xx.xx:10006/!config write
http://xx.xx.xx.xx:10006/!reset
  • If the smartphone dials a contact directly with the GSM dialer rather than presenting a choice with myPBX for Android included please reset the default dialer status of the GSM dialer. Open "Settings, "Apps", "All apps" on the smartphone. Locate the GSM dialer, scroll down in its options and click on "Clear defaults". This should bring the dialer choice back into effect and allow myPBX for Android to be chosen as alternative dialer.

Related Articles