Saturday, October 31, 2015

Linphone Management of Bandwidth parameter

References:
https://www.linphone.org/docs/liblinphone/group__media__parameters.html#ga1e0c01a25f78d14c6813213adf795e54

SIP SDP bandwidth information

The SDP includes an optional bandwidth attribute with the following syntax 

b=:

where is single alpha numeric word giving the meaning of the bandwidth figure, and where the default units of 
bandwidth value is kilobits per second. This attribute specifies the proposed bandwidth to be used by the session or media. 

The typical use is with the modifier “AS” (Application specific Maximum) which may be used to specify the total bandwidth for a 
single media stream from one site (source)

another modifier value is CT. If the bandwidth of a session or a media in a session is different from the bandwidth implicit from the scope, 
a b=“CT” line should be supplied for the session giving the proposed upper limit to the bandwidth used (the “conference total” bandwidth) 
The primary purpose of this is to give an approximate idea as to whether two or more sessions can co-exist simultaneously. when using CT 
modifier with RTP, if several RTP sessions are part of the conference, the conference total refers to the total bandwidth of all the RTP sessions. 


References:

Free Icon download Websites

Quirks of Unzipping on MAC

Some of the files were not able to be unzipped using either “unzip” command or “ditto” command via terminal
however, since they were getting opened perfectly using the “Archive Utility”, one option was to use the 
terminal to open such files. e.g. below 

open -a "Archive Utility" 0B9822F3-FE6C-4FB6-AB47-C98DA932279D_205155390.zip

The only inconvenience is that we cannot specify the destination folder. 

This can be automated using a simple shell script like this 

for file in *; do
echo $file
open -a "Archive Utility" $file
done


References:

What is needed for Support IPv6

An operating system that support IPv6: Windows Vista and modern versions and Mac OS and Linux latest versions support IPv6. Windows XP doesnt, and we should not be using XP anymore. 

A router with IPV6 support: Most of the modern routers comes with IPv6 support 

An ISP that supports IPV6. 


The below page helps to test the IPv6 http://ds.testmyipv6.com/ 

The IPv6 only test:

If we attempt to connect to this server and times out, then it means that we don’t have IPv6 path to the server. The below could be possible reason for this

1. The client is not having globally routable address on the internet and therefor not actually making the connection to this server 
2. The client is IPv6 capable, but does not know that it is limited to the local network. But there is no IPv6 connectivity beyond the router 

If the browser returns an error saying that the host cannot be found, then the DNS servers that we are using don’t know how to look up the address of the server based on the hostname. They are unable to resolve the AAAA record. If one is using the DNS server addresses provided by the ISP, then we need to ring them up and ask to fix ASAP. 

If we are using local gateway or router for DNS, then router is not capable or forwarders used by the router (likely the ISP’s servers) is not capable. 

IF browser is able to connect to IPV6 only page, but still shows red box when taking the Dual Stack test, the browser seems to be preferring IPV4 over IPV6, which is undesirable. 



References

Serializing the objects Java

Serialization is quite simple, if we have requirement to Serialize and ArrayList that contains a number of Objects, below are the steps to do

1. Create the object that goes into the array list as Serializable objects
2. Optionally, add a field into the object which can tell the version of the class structure.

Now just add to the array list and serialize the array list, be

public class Accessory implements Serializable

{
    private int type;
    private int state;
    private String name;
    private String uuid;

    public Accessory(int type, int state, String name, String uuid)
    {
        this.type = type;
        this.state = state;
        this.name = name;
        this.uuid = uuid;
    }
}

 public void saveAccessories(ArrayList accessoryList)
    {
        try
        {
            FileOutputStream fos= new FileOutputStream("myfile");
            ObjectOutputStream oos= new ObjectOutputStream(fos);
            oos.writeObject(accessoryList);
            oos.close();
            fos.close();
        }
        catch(IOException ioe)
        {
            ioe.printStackTrace();
        }
    }
    
    public ArrayList loadAccessories()
    {
        try
        {
            FileInputStream fis = new FileInputStream("myfile");
            ObjectInputStream ois = new ObjectInputStream(fis);
            Object obj = ois.readObject();
            ois.close();
            return (ArrayList)obj;
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
        return null;
    }

References:
http://www.journaldev.com/2452/java-serialization-example-tutorial-serializable-serialversionuid

Friday, October 30, 2015

iOS Push Notification - Debugging

Since the app is not receiving the valid push notification token from OS, there are a few reasons why the APNS token does not get delivered to the app. One of them is network is blocking the 5223 for inbound and outbound TCP/TLS traffic. 

If still not receiving the notification, we can figure out few things by installing a debug profile at the link below, which will let us give the device level Apple Notification server connection logs


Once installed, please restart the device while connected to Xcode, Once the device powers up and app is launched, we can see the logs in the Xcode console.

In the log, there will be logs from the process “apsd” which will help us analyze what is happening. 


If would prefer to delete the is profile at later point, can do this by navigating to Settings > General > Profiles  Delete APS logging profile. 

References: