![]() |
2011-01-02
, 16:11
|
Posts: 93 |
Thanked: 13 times |
Joined on Nov 2010
|
#2
|
#!/usr/bin/python import dbus import sys # Get the target phone number (or SIP address) from the command line TARGET = sys.argv[1]; # Configure the telepathy path to the SofiaSIP account that we wish to use. # Use "mc-tool list" (from the libmissioncontrol-utils package) to see your accounts. SIP_ACCOUNT = 'sofiasip/sip/_31234567_40sipgate_2eco_2euk0' # This gets us a connnection to the session bus bus = dbus.SessionBus() # This sets up a path to the SIP account within telepathy. PATH = '/org/freedesktop/Telepathy/Account/' PATH += SIP_ACCOUNT # This sets up a proxy object as a "handle" to the AccountManager of our target account account = bus.get_object('org.freedesktop.Telepathy.AccountManager', PATH) # This launches the actual SIP call with a method call to EnsureChannel on that object account.EnsureChannel( \ dbus.Dictionary({ dbus.String(u'org.freedesktop.Telepathy.Channel.TargetHandleType'): dbus.UInt32(1), dbus.String(u'org.freedesktop.Telepathy.Channel.ChannelType'): dbus.String(u'org.freedesktop.Telepathy.Channel.Type.StreamedMedia'), dbus.String(u'org.freedesktop.Telepathy.Channel.TargetID'): dbus.String(TARGET), }, signature='sv'), dbus.UInt64(0), dbus.String(''), dbus_interface='com.nokia.Account.Interface.ChannelRequests') sys.exit(0)
The Following User Says Thank You to rosh For This Useful Post: | ||
![]() |
2011-01-02
, 18:16
|
Posts: 268 |
Thanked: 304 times |
Joined on Oct 2009
@ Orlando, USA
|
#3
|
Is there a way to do it using dbus?
Any help would be appreciated.
Thanks!