Class Message
In: sipper/message.rb
Parent: Object

Methods

Included Modules

SipLogger Enumerable

Constants

SIP_VER_PATT = /((?i)sip)\/[0-9]+\.[0-9]+/
TAGP_C = /(tag=)(.*?);/
TAGP_E = /(tag=)(.*?)$/

Attributes

incoming  [RW] 
rcvd_at_info  [RW] 
rcvd_from_info  [RW] 
sdp  [R] 
transaction  [RW] 

Public Class methods

Public Instance methods

This method is to be invoked when the header is created but the content is not parsed. The string provided in "val" is directly written as the header content. The consequence is also a by-passing of any validations.

This method is used to assign arbitrary values to any headers including system headers.The first argument is a symbol indicating the header name and second argument is the value.

Returns the body of the message, which is another name for content but message.content does not return proper contents of the message. Instead message.contents (note the s in the end) returns the contents as an array. This method however returns the properly formatted message body.

The method to copy headers from a message.If you provide the particular headers, it will copy only those headers, else will copy all the headers.

extracts the from tag from the message without a full parse of the header.

Each value in the header hash is an array for MV, content is also a single array.

18.3 Framing In the case of message-oriented transports (such as UDP), if the message has a Content-Length header field, the message body is assumed to contain that many bytes. If there are additional bytes in the transport packet beyond the end of the body, they MUST be discarded. If the transport packet ends before the end of the message body, this is considered an error. If the message is a response, it MUST be discarded. If the message is a request, the element SHOULD generate a 400 (Bad Request) response. If the message has no Content-Length header field, the message body is assumed to end at the end of the transport packet. In the case of stream-oriented transports such as TCP, the Content-Length header field indicates the size of the body. The Content-Length header field MUST be used with stream oriented transports .

takes [body] and type as two arguments

extracts the to tag from the message without a full parse of the header.

gives the transaction id for the message. If the message is a RFC3261 message then the branch is taken otherwise it is computed from the message.

Protected Instance methods

[Validate]