I created a custom telepathy connection manager in my application to integrate with harmattan's contacts application. Once the integration is in place, users should see a "Call via Vicar | Cell" in the contact page similar to SIP account(s). This custom connection manager is working fine in fremantle/N900. I am trying to get this to work in harmattan.


The telepathy account is created through a postinst script on application installation. I have setup the key account properties ConnectAutomatically as true, HasBeenOnline as true while creating the account (a copy of telepathy-ring properties actually). I am using command below to force mission control to reconnect the account to my connection for testing, but the account gets connected and disconnected immediately.

Code:
dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.AccountManager /org/freedesktop/Telepathy/Account/vicar/tel/vicar0 org.freedesktop.Telepathy.Account.Reconnect
Here is the dbus-monitor output.

Code:
signal sender=org.freedesktop.DBus -> dest=:1.1231 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.1231"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=3060 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.1232"
   string ""
   string ":1.1232"
signal sender=:1.1163 -> dest=(null destination) serial=2190 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/"
      )
      dict entry(
         string "ConnectionStatusReason"
         variant             uint32 1
      )
      dict entry(
         string "ConnectionStatus"
         variant             uint32 2
      )
      dict entry(
         string "ConnectionErrorDetails"
         variant             array [
            ]
      )
      dict entry(
         string "ConnectionError"
         variant             string ""
      )
   ]
signal sender=:1.1163 -> dest=(null destination) serial=2191 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/"
      )
      dict entry(
         string "ConnectionStatusReason"
         variant             uint32 1
      )
      dict entry(
         string "ConnectionStatus"
         variant             uint32 1
      )
      dict entry(
         string "ConnectionErrorDetails"
         variant             array [
            ]
      )
      dict entry(
         string "ConnectionError"
         variant             string ""
      )
   ]
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=3061 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.1232"
   string ":1.1232"
   string ""
########### COMMENT LINE 1 (Connecting) #####################################
signal sender=:1.1163 -> dest=(null destination) serial=2201 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/org/freedesktop/Telepathy/Connection/vicar/tel/vicar"
      )
   ]
signal sender=:1.1225 -> dest=(null destination) serial=86 path=/org/freedesktop/Telepathy/Connection/vicar/tel/vicar; interface=org.freedesktop.Telepathy.Connection; member=StatusChanged
   uint32 0
   uint32 1
########### COMMENT LINE 2 (Disconnecting) #####################################
signal sender=:1.1163 -> dest=(null destination) serial=2208 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/"
      )
      dict entry(
         string "ConnectionStatusReason"
         variant             uint32 0
      )
      dict entry(
         string "ConnectionStatus"
         variant             uint32 2
      )
      dict entry(
         string "ConnectionErrorDetails"
         variant             array [
            ]
      )
      dict entry(
         string "ConnectionError"
         variant             string "org.freedesktop.Telepathy.Error.Disconnected"
      )
   ]
signal sender=:1.1163 -> dest=(null destination) serial=2211 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/"
      )
      dict entry(
         string "ConnectionStatusReason"
         variant             uint32 1
      )
      dict entry(
         string "ConnectionStatus"
         variant             uint32 1
      )
      dict entry(
         string "ConnectionErrorDetails"
         variant             array [
            ]
      )
      dict entry(
         string "ConnectionError"
         variant             string "org.freedesktop.Telepathy.Error.Disconnected"
      )
   ]

########### COMMENT LINE 3 (Connecting again) #####################################
signal sender=:1.1163 -> dest=(null destination) serial=2220 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/org/freedesktop/Telepathy/Connection/vicar/tel/vicar"
      )
   ]
signal sender=:1.1225 -> dest=(null destination) serial=99 path=/org/freedesktop/Telepathy/Connection/vicar/tel/vicar; interface=org.freedesktop.Telepathy.Connection; member=StatusChanged
   uint32 0
   uint32 1
########### COMMENT LINE 4 (Disconnecting again) #####################################
signal sender=:1.1163 -> dest=(null destination) serial=2227 path=/org/freedesktop/Telepathy/Account/vicar/tel/vicar0; interface=org.freedesktop.Telepathy.Account; member=AccountPropertyChanged
   array [
      dict entry(
         string "Connection"
         variant             object path "/"
      )
      dict entry(
         string "ConnectionStatusReason"
         variant             uint32 0
      )
      dict entry(
         string "ConnectionStatus"
         variant             uint32 2
      )
      dict entry(
         string "ConnectionErrorDetails"
         variant             array [
            ]
      )
      dict entry(
         string "ConnectionError"
         variant             string "org.freedesktop.Telepathy.Error.Disconnected"
      )
   ]
The account status is connected at COMMENT LINE 1 and it immediately changes to disconnected at COMMENT LINE 2. This process repeats on an on. I don't see any error in the syslog.

Appreciate any help in troubleshooting this issue.