コード例 #1
0
 public SipMessage(SipUser sipUser, LocalSipUserAgentServer localSipUas, SipTransportManager sipTransportManager, SipResponseCode sipResponse)
 {
     this.messageType = MessageType.Response;
     this.statusLine  = new StatusLine(localSipUas, sipTransportManager.SipProtocol, sipResponse);
     CreateCommonHeaders(sipUser, localSipUas, sipTransportManager);
 }
コード例 #2
0
 private void CreateCommonHeaders(SipUser sipUser, LocalSipUserAgentServer localSipUas, SipTransportManager sipTransportManager)
 {
     this.viaHeader     = new ViaHeader(localSipUas, sipTransportManager.SipProtocol, sipTransportManager.SipTransport);
     this.fromHeader    = new FromHeader(sipUser, localSipUas, sipTransportManager.SipProtocol);
     this.toHeader      = new ToHeader(localSipUas, sipTransportManager.SipProtocol);
     this.callIdHeader  = new CallIdHeader();
     this.contactHeader = new ContactHeader(localSipUas, sipTransportManager.SipProtocol);
     this.routeHeader   = new RouteHeader(localSipUas, sipTransportManager.SipProtocol);
     this.userAgent     = new UserAgentHeader();
     this.expiresHeader = new ExpiresHeader();
     this.maxForwards   = new MaxForwardsHeader();
     this.allowHeader   = new AllowHeader();
     this.contentLength = new ContentLength(body);
 }
コード例 #3
0
 public SipMessage(SipUser sipUser, LocalSipUserAgentServer localSipUas, SipTransportManager sipTransportManager, SipMethod sipMethod)
 {
     this.messageType = MessageType.Request;
     this.requestLine = new RequestLine(localSipUas, sipTransportManager.SipProtocol, sipMethod);
     CreateCommonHeaders(sipUser, localSipUas, sipTransportManager);
 }