diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-08-22 11:41:49 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-08-22 11:41:49 +0000 |
commit | d66b0ff9a506ae20cfd369238a20dfd47b505e5d (patch) | |
tree | 229ac2e55181fd16337623548d6f7d0c9b559f4c /pjsip-apps | |
parent | 7f7ac17a0bf237e4f6abfaad0fb59935a55feb70 (diff) |
Ticket #955 (fixes and enhancements to Python module):
- added acc.send_pager() API to send IM from account to an arbitrary URI (thanks Saúl Ibarra for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2909 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/python/pjsua.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pjsip-apps/src/python/pjsua.py b/pjsip-apps/src/python/pjsua.py index b49b79a3..5521d3d8 100644 --- a/pjsip-apps/src/python/pjsua.py +++ b/pjsip-apps/src/python/pjsua.py @@ -1222,6 +1222,28 @@ class Account: lck = self._lib().auto_lock() _pjsua.acc_pres_notify(self._id, pres_obj, state, reason, Lib._create_msg_data(hdr_list)) + + def send_pager(self, uri, text, im_id=0, content_type="text/plain", \ + hdr_list=None): + """Send instant message to arbitrary URI. + + Keyword arguments: + text -- Instant message to be sent + uri -- URI to send the Instant Message to. + im_id -- Optional instant message ID to identify this + instant message when delivery status callback + is called. + content_type -- MIME type identifying the instant message + hdr_list -- Optional list of headers to be sent with the + request. + + """ + lck = self._lib().auto_lock() + err = _pjsua.im_send(self._id, uri, \ + content_type, text, \ + Lib._create_msg_data(hdr_list), \ + im_id) + self._lib()._err_check("send_pager()", self, err) class CallCallback: """Class to receive event notification from Call objects. |