Module SipperUtil
In: sipper/bin/common.rb
sipper/util/command_element.rb
sipper/util/compact_converter.rb
sipper/util/counter.rb
sipper/util/digest/digest_authorizer.rb
sipper/util/expectation_parser.rb
sipper/util/message_fill.rb
sipper/util/persistence/ps_sipper_map.rb
sipper/util/persistence/sipper_map.rb
sipper/util/sipper_util.rb

Digest authorizer is a stateful entity that maintains the state from previous challenges and calculates the digest according to RFC.

Methods

Included Modules

SipLogger

Classes and Modules

Module SipperUtil::Persistence
Module SipperUtil::Recordable
Module SipperUtil::WrapExtender
Class SipperUtil::CommandElement
Class SipperUtil::Common
Class SipperUtil::CompactConverter
Class SipperUtil::Counter
Class SipperUtil::DigestAuthorizer
Class SipperUtil::ExpectationElement
Class SipperUtil::ExpectationParser
Class SipperUtil::MessageFill

Constants

RCOLON = /: /
SCOLON = /;/
NUMERIC_CSEQ = /\d+\s?/
SUCC_RANGE = 200..299
RPROV_RANGE = 101..199
BOOL_MAP = { :true=>true, :false=>false }

Public Class methods

arg can be a symbol or a boolean value true/false

Converts the given file name into a well formed classname. Assumes that file names are underscore separated and class names are camel case -4 to remove .rb

Taken from Rails. This converts a fqcname string to a class constant.

does reverse of classify, i.e generates a filename compliant with Ruby conventions from a class name.

Formats a SipperMedia command according to the SM protocol

Returns the parameter value if the parameter is available.

Returns true of the named parameter is present, false otherwise. Can be used for valueless parameter like "lr" matching a string not a header. For a Header object we can check using the hash access Header.has_key?

Takes a hash and populates the instance variables of the name as keys and value as hash values eg. hash = {:b=>2, :a=>1} results in the population of the instance variables "b" and "a" to 2 and 1 respectively in the object obj.

Simply takes the "Header: xxx" and returns "xxx"

Separates the header and params and returns them in an array.

converts the header names like p_asserted_identity to P-Asserted_Identity. — Here is an ugly handling for WWW-Authenticate header todo fix this and also Call-ID handling, as Call-Id is valid yet some tools such as sipp does not handle it. ++

take the expectaion string like "< INVITE, > 100 {2,}, > 200" and returns "< INVITE% > 100 {2,}% > 200". Such that it can be split without any ambiguity.

Reverse of headerize. P-Asserted_Identity => p_asserted_identity

If there are parameters then returns them in a hash with header value. Takes full header and also just separated params and returns the array with header value and params hash. with "My-Header: myvalue" returns ["myvalue", {}] with "My-Header: myvalue;a=1;b=2" returns ["myvalue", {"a"=>"1", "b"=>"2"}] with "a=1;b=2" returns [nil, {"a"=>"1", "b"=>"2"}]

Takes a string or a primitive array and prints it in the standard array form and returns a string that is properly formatted ruby style array code eg. ["a", "b", "c"], with elements as strings.

Public Instance methods

[Validate]