- Timestamp:
- Nov 29, 2013 5:56:02 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip-apps/src/pygui/account.py
r4657 r4663 34 34 import accountsetting 35 35 import application 36 import call 36 37 37 38 # Account class … … 47 48 self.cfgChanged = False 48 49 self.buddyList = [] 50 self.callList = [] 49 51 50 52 def statusText(self): … … 73 75 status = '- not created -' 74 76 return status 77 78 def makeCall(self): 79 mycall = call.Call(self.app, self, pj.PJSUA_INVALID_ID) 80 callPrm = pj.CallOpParam() 81 callPrm.opt.audioCount = 1 82 callPrm.opt.videoCount = 0 83 mycall.uri = "sip:test1@pjsip.org" 84 self.callList.append(mycall) 85 mycall.makeCall(mycall.uri, callPrm) 75 86 76 87 def onRegState(self, prm): 77 88 self.app.updateAccount(self) 89 90 def onIncomingCall(self, prm): 91 mycall = call.Call(self.app, self, prm.callId) 92 self.callList.append(mycall) 93 self.app.updateCall(self) 94 callPrm = pj.CallOpParam() 95 msg = "Incoming call for account '%s'" % self.cfg.idUri 96 if msgbox.askquestion(msg, 'Accept call?', default=msgbox.YES) == u'yes': 97 callPrm.statusCode = 200 98 mycall.answer(callPrm) 99 else: 100 mycall.hangup(callPrm) 78 101 79 102
Note: See TracChangeset
for help on using the changeset viewer.