send_notice('Failed to deliver chunk within file transfer of %s (%d%s)'%(os.path.basename(self.filepath),notification.data.code,notification.data.reason))
self.question=Question("Incoming file transfer for %s from '%s', do you want to accept? (a)ccept/(r)eject"%(os.path.basename(self.filename),identity),'ari',bold=True)
send_notice('More than one account exists which matches %s: %s'%(self.options.account,', '.join(sorted(account.idforaccountinpossible_accounts))),bold=False)
self.stop()
return
eliflen(possible_accounts)==0:
send_notice('No enabled account which matches %s was found. Available and enabled accounts: %s'%(self.options.account,', '.join(sorted(account.idforaccountinaccount_manager.get_accounts()ifaccount.enabled))),bold=False)
lines=['%s Registered contact "%s" for sip:%s at %s:%d;transport=%s (expires in %d seconds).'%(datetime.now().replace(microsecond=0),contact_header.uri,self.account.id,registrar.address,registrar.port,registrar.transport,expires)]
iflen(contact_header_list)>1:
lines.append('Other registered contacts:')
lines.extend(' %s (expires in %s seconds)'%(str(other_contact_header.uri),other_contact_header.expires)forother_contact_headerincontact_header_listifother_contact_header.uri!=notification.data.contact_header.uri)
send_notice('%s Failed to register contact for sip:%s: %s (retrying in %.2f seconds)'%(datetime.now().replace(microsecond=0),self.account.id,notification.data.error,notification.data.timeout))
parser.add_option('-a','--account',type='string',dest='account',help='The account name to use for any outgoing traffic. If not supplied, the default account will be used.',metavar='NAME')
parser.add_option('-c','--config-directory',type='string',dest='config_directory',help='The configuration directory to use. This overrides the default location.')
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.')
parser.add_option('-m','--trace-msrp',action='store_true',dest='trace_msrp',default=False,help='Dump msrp logging information and the raw contents of incoming and outgoing MSRP messages.')
parser.add_option('-n','--trace-notifications',action='store_true',dest='trace_notifications',default=False,help='Print all notifications (disabled by default).')
parser.add_option('-S','--disable-sound',action='store_true',dest='disable_sound',default=False,help='Disables initializing the sound card.')
parser.set_default('auto_answer_interval',None)
parser.add_option('--auto-answer',action='callback',callback=parse_handle_call_option,callback_args=('auto_answer_interval',),help='Interval after which to answer an incoming session (disabled by default). If the option is specified but the interval is not, it defaults to 0 (accept the session as soon as it starts ringing).',metavar='[INTERVAL]')
parser.set_default('auto_hangup_interval',None)
parser.add_option('--auto-hangup',action='callback',callback=parse_handle_call_option,callback_args=('auto_hangup_interval',),help='Interval after which to hang up an established session (disabled by default). If the option is specified but the interval is not, it defaults to 0 (hangup the session as soon as it connects).',metavar='[INTERVAL]')