コード例 #1
0
 /// <summary>
 /// Builds a very basic SIP request. In most cases additional headers will need to be added in order for it to be useful.
 /// When this method is called the channel used for sending the request has not been decided. The headers below depend on
 /// the sending channel. By setting them to "0.0.0.0:0" the send request methods will substitute in the appropriate value
 /// at send time:
 /// - Top Via header.
 /// - From header.
 /// - Contact header.
 /// </summary>
 /// <param name="method">The method for the SIP request.</param>
 /// <param name="uri">The destination URI for the request.</param>
 /// <returns>A SIP request object.</returns>
 public static SIPRequest GetRequest(SIPMethodsEnum method, SIPURI uri)
 {
     return(GetRequest(
                method,
                uri,
                new SIPToHeader(null, new SIPURI(uri.User, uri.Host, null, uri.Scheme, SIPProtocolsEnum.udp), null),
                SIPFromHeader.GetDefaultSIPFromHeader(uri.Scheme)));
 }