Module siplocation

Interface module for the location database.

Introduced in: 29 Jan 2004 by Fredrik Thulin <ft@it.su.se>

Authors: Fredrik Thulin (ft@it.su.se).

Description

Interface module for the location database. Also handles processing of REGISTER requests for our domains, received by 'incomingproxy' and 'outgoingproxy'.

Function Index

get_locations_for_users/1 Looks up all locations for a list of users.
get_locations_with_contact/1 Checks if any of our users are registered at the location specified.
get_user_with_contact/1 Checks if any of our users are registered at the location specified.
prioritize_locations/1 Look through a list of siplocation DB entrys, figure out what the lowest priority amongst them are and then return all records which has that priority.
process_register_request/3 Process a received REGISTER.
sort_most_recent_first/1 Sort the locations based on when they were created, most recent locations first.
to_url/1 Create a SIP URL from a SIP location db entry.

Function Details

get_locations_for_users/1

get_locations_for_users(In::SipUserList) -> [#siplocationdb_e{}]

Looks up all locations for a list of users. Used to find out where a set of users are to see where we should route a request.

get_locations_with_contact/1

get_locations_with_contact(URI) -> {ok, Locations} | error

Checks if any of our users are registered at the location specified. Return all the location database entrys matching the URI, so that the caller can look for a specific socket matching the registration(s) if the client used Outbound.

get_user_with_contact/1

get_user_with_contact(URI) -> none | SIPuser

Checks if any of our users are registered at the location specified. Used to determine if we should proxy requests to a URI without authorization. NOTE : If you want to know all the users (in case there is more than one), you should use get_locations_with_contact/1 instead.

prioritize_locations/1

prioritize_locations(Locations) -> [#siplocationdb_e{}]

Look through a list of siplocation DB entrys, figure out what the lowest priority amongst them are and then return all records which has that priority.

process_register_request/3

process_register_request(Request, YxaCtx, AppName) -> not_homedomain | void()

Process a received REGISTER. First check if it is for one of our domains (homedomain), then check that it contains proper authentication and that the authenticated user is allowed to register using this address-of-record. Finally, let process_updates() process all the Contact headers and update the location database.

sort_most_recent_first/1

sort_most_recent_first(Locations) -> NewLocations

Sort the locations based on when they were created, most recent locations first.

to_url/1

to_url(LDBE) -> #sipurl{}

Create a SIP URL from a SIP location db entry.


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