Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pjsua
- class MyAccountCallback(pjsua.AccountCallback):
- def __init__(self, account=None):
- pjsua.AccountCallback.__init__(self, account)
- def on_incoming_call(self, call):
- call.hangup(501, "Sorry, not ready to accept calls yet")
- def on_reg_state(self):
- print "Registration complete, status=", self.account.info().reg_status, \
- "(" + self.account.info().reg_reason + ")"
- sip_url="sip.nextfone.com.bd"
- sip_username="09614449000"
- sip_password="45621548649"
- lib = pjsua.Lib()
- acc_cfg = pjsua.AccountConfig(sip_url, sip_username, sip_password)
- acc_cb = MyAccountCallback()
- acc = lib.create_account(acc_cfg, cb=acc_cb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement