Home --> Documentations --> PJSIP Reference

Provides dialog management. More...

Data Structures

struct  pjsip_ua_init_param


pj_status_t pjsip_ua_init_module (pjsip_endpoint *endpt, const pjsip_ua_init_param *prm)
pjsip_user_agentpjsip_ua_instance (void)
pj_uint32_t pjsip_ua_get_dlg_set_count (void)
pjsip_dialogpjsip_ua_find_dialog (const pj_str_t *call_id, const pj_str_t *local_tag, const pj_str_t *remote_tag, pj_bool_t lock_dialog)
pj_status_t pjsip_ua_destroy (void)
void pjsip_ua_dump (pj_bool_t detail)
pjsip_endpointpjsip_ua_get_endpt (pjsip_user_agent *ua)

Detailed Description

Application MUST initialize the user agent layer module by calling pjsip_ua_init_module() before using any of the dialog API, and link the application with with pjsip-core library.

Function Documentation

◆ pjsip_ua_init_module()

pj_status_t pjsip_ua_init_module ( pjsip_endpoint endpt,
const pjsip_ua_init_param prm 

Initialize user agent layer and register it to the specified endpoint.

endptThe endpoint where the user agent will be registered.
prmUA initialization parameter.
PJ_SUCCESS on success.

◆ pjsip_ua_instance()

pjsip_user_agent* pjsip_ua_instance ( void  )

Get the instance of the user agent.

The user agent module instance.

◆ pjsip_ua_get_dlg_set_count()

pj_uint32_t pjsip_ua_get_dlg_set_count ( void  )

Retrieve the current number of dialog-set currently registered in the hash table. Note that dialog-set is different than dialog when the request forks. In this case, all dialogs created from the original request will belong to the same dialog set. When no forking occurs, the number of dialog sets will be equal to the number of dialogs.

Number of dialog sets.

◆ pjsip_ua_find_dialog()

pjsip_dialog* pjsip_ua_find_dialog ( const pj_str_t call_id,
const pj_str_t local_tag,
const pj_str_t remote_tag,
pj_bool_t  lock_dialog 

Find a dialog with the specified Call-ID and tags properties. This function may optionally lock the matching dialog instance before returning it back to the caller.

call_idThe call ID to be matched.
local_tagThe local tag to be matched.
remote_tagThe remote tag to be matched.
lock_dialogIf non-zero, instruct the function to lock the matching dialog with pjsip_dlg_inc_lock(). Application is responsible to release the dialog's lock after it has finished manipulating the dialog, by calling pjsip_dlg_dec_lock().
The matching dialog instance, or NULL if no matching dialog is found.

◆ pjsip_ua_destroy()

pj_status_t pjsip_ua_destroy ( void  )

Destroy the user agent layer.

PJ_SUCCESS on success.

◆ pjsip_ua_dump()

void pjsip_ua_dump ( pj_bool_t  detail)

Dump user agent contents (e.g. all dialogs).

detailIf non-zero, list of dialogs will be printed.

◆ pjsip_ua_get_endpt()

pjsip_endpoint* pjsip_ua_get_endpt ( pjsip_user_agent ua)

Get the endpoint instance of a user agent module.

uaThe user agent instance.
The endpoint instance where the user agent is registered.


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.