/** * For the moment we consider that only one profile uri is used at a time. * * @throws SipUriSyntaxException */ public SipRequest register() throws SipUriSyntaxException { String domain = userAgent.getDomain(); String requestUri = RFC3261.SIP_SCHEME + RFC3261.SCHEME_SEPARATOR + domain; SipListener sipListener = userAgent.getSipListener(); profileUri = RFC3261.SIP_SCHEME + RFC3261.SCHEME_SEPARATOR + userAgent.getUserpart() + RFC3261.AT + domain; registerCallID = Utils.generateCallID(userAgent.getConfig().getLocalInetAddress()); SipRequest sipRequest = initialRequestManager.createInitialRequest( requestUri, RFC3261.METHOD_REGISTER, profileUri, registerCallID); if (sipListener != null) { sipListener.registering(sipRequest); } return sipRequest; }
/** should be instanciated only once, it was a singleton. */ public UAC( UserAgent userAgent, InitialRequestManager initialRequestManager, MidDialogRequestManager midDialogRequestManager, DialogManager dialogManager, TransactionManager transactionManager, TransportManager transportManager, Logger logger) { this.userAgent = userAgent; this.initialRequestManager = initialRequestManager; this.midDialogRequestManager = midDialogRequestManager; this.dialogManager = dialogManager; this.transactionManager = transactionManager; this.logger = logger; guiClosedCallIds = Collections.synchronizedList(new ArrayList<String>()); profileUri = RFC3261.SIP_SCHEME + RFC3261.SCHEME_SEPARATOR + userAgent.getUserpart() + RFC3261.AT + userAgent.getDomain(); }