raiseRuntimeError("Failed to load sipclient's configuration: %s\nIf an old configuration file is in place, delete it or move it and recreate the configuration using the sip_settings script."%str(e))
raiseRuntimeError("More than one account exists which matches %s: %s"%(self.account_name,", ".join(sorted(account.idforaccountinpossible_accounts))))
iflen(possible_accounts)==0:
raiseRuntimeError("No enabled account that matches %s was found. Available and enabled accounts: %s"%(self.account_name,", ".join(sorted(account.idforaccountinaccount_manager.get_accounts()ifaccount.enabled))))
self.account=possible_accounts[0]
ifself.accountisNone:
raiseRuntimeError("Unknown account %s. Available accounts: %s"%(self.account_name,', '.join(account.idforaccountinaccount_manager.iter_accounts())))
elifself.account==BonjourAccount():
raiseRuntimeError("Cannot use bonjour account for message summary subscription")
elifnotself.account.message_summary.enabled:
raiseRuntimeError("Message summary is not enabled for account %s"%self.account.id)
description="This script subscribes to the message summary event package for the specified SIP target. When a NOTIFY is received with the message summary information it will be displayed. The program will un-SUBSCRIBE and quit when CTRL+D is pressed."
parser.add_option("-a","--account-name",type="string",dest="account_name",help="The name of the account to use.")
parser.add_option("-s","--trace-sip",action="store_true",dest="trace_sip",default=False,help="Dump the raw contents of incoming and outgoing SIP messages (disabled by default).")
parser.add_option("-j","--trace-pjsip",action="store_true",dest="trace_pjsip",default=False,help="Print PJSIP logging output (disabled by default).")
parser.add_option("-n","--trace-notifications",action="store_true",dest="trace_notifications",default=False,help="Print all notifications (disabled by default).")