Module contact

Parsing and printing functions for SIP Contact headers.

Introduced in: 09 Sep 2004 by Håkan Stenholm <hsten@it.su.se>

Authors: Håkan Stenholm (hsten@it.su.se).

Description

Parsing and printing functions for SIP Contact headers. Also used for other headers containing the same sort of data : Record-Route, Route, Path for example.

Function Index

add_param/3 Add a contact-parameter entry.
new/1Equivalent to new(none, SipURI, []).
new/2Equivalent to new(none, SipURI, Params).
new/3 Create a contact record(), should be used to ensure proper handling of internal data.
parse/1 Parse header data from a request that uses the same (or nearly the same) grammar as "Contact".
print/1 Format a contact.
rm_param/2 Remove a contact-parameter entry.
set_display_name/2 Change the display name of Contact.
set_urlstr/2 Change the sipurl contained in Contact.

Function Details

add_param/3

add_param(Contact, Key, Val) -> #contact{}

Add a contact-parameter entry

new/1

new(SipURI) -> #contact{}

Equivalent to new(none, SipURI, []).

new/2

new(SipURI, Params) -> #contact{}

Equivalent to new(none, SipURI, Params).

new/3

new(DisplayName, URL::SipURI, Params) -> #contact{}

Create a contact record(), should be used to ensure proper handling of internal data. Valid string values for SipURI are "*" or a string that is parseable by sipurl:parse/1.

parse/1

parse(Contacts) -> [#contact{}] | {unparseable, Reason}

Parse header data from a request that uses the same (or nearly the same) grammar as "Contact". This include "From", "To", "Route" and "Record-Route".

print/1

print(R::Contact) -> string()

Format a contact

rm_param/2

rm_param(Contact, Key) -> #contact{}

Remove a contact-parameter entry

set_display_name/2

set_display_name(Contact, DispName) -> #contact{}

Change the display name of Contact

set_urlstr/2

set_urlstr(Contact, SipURL) -> #contact{}

Change the sipurl contained in Contact


Generated by EDoc, Oct 17 2007, 16:48:23.