pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

pjsua_acc_config Struct Reference
[PJSUA-API Accounts Management]

#include <pjsua.h>

Data Fields

void * user_data
int priority
pj_str_t id
pj_str_t reg_uri
pjsip_hdr reg_hdr_list
pjsip_hdr sub_hdr_list
pj_bool_t mwi_enabled
pj_bool_t publish_enabled
pjsip_publishc_opt publish_opt
unsigned unpublish_max_wait_time_msec
pjsip_auth_clt_pref auth_pref
pj_str_t pidf_tuple_id
pj_str_t force_contact
pj_str_t contact_params
pj_str_t contact_uri_params
pjsua_100rel_use require_100rel
pjsua_sip_timer_use use_timer
pjsip_timer_setting timer_setting
unsigned proxy_cnt
pj_str_t proxy [PJSUA_ACC_MAX_PROXIES]
unsigned reg_timeout
unsigned reg_delay_before_refresh
unsigned unreg_timeout
unsigned cred_count
pjsip_cred_info cred_info [PJSUA_ACC_MAX_PROXIES]
pjsua_transport_id transport_id
pj_bool_t allow_contact_rewrite
int contact_rewrite_method
unsigned use_rfc5626
pj_str_t rfc5626_instance_id
pj_str_t rfc5626_reg_id
unsigned ka_interval
pj_str_t ka_data
pjmedia_srtp_use use_srtp
int srtp_secure_signaling
pj_bool_t srtp_optional_dup_offer
unsigned reg_retry_interval
unsigned reg_first_retry_interval
pj_bool_t drop_calls_on_reg_fail
unsigned reg_use_proxy
pj_bool_t use_stream_ka
pjsua_call_hold_type call_hold_type
pj_bool_t register_on_acc_add

Detailed Description

This structure describes account configuration to be specified when adding a new account with pjsua_acc_add(). Application MUST initialize this structure first by calling pjsua_acc_config_default().


Field Documentation

Arbitrary user data to be associated with the newly created account. Application may set this later with pjsua_acc_set_user_data() and retrieve it with pjsua_acc_get_user_data().

Account priority, which is used to control the order of matching incoming/outgoing requests. The higher the number means the higher the priority is, and the account will be matched first.

The full SIP URL for the account. The value can take name address or URL format, and will look something like "sip:account@serviceprovider".

This field is mandatory.

This is the URL to be put in the request URI for the registration, and will look something like "sip:serviceprovider".

This field should be specified if registration is desired. If the value is empty, no account registration will be performed.

The optional custom SIP headers to be put in the registration request.

The optional custom SIP headers to be put in the presence subscription request.

Subscribe to message waiting indication events (RFC 3842).

See also enable_unsolicited_mwi field on pjsua_config.

Default: no

If this flag is set, the presence information of this account will be PUBLISH-ed to the server where the account belongs.

Default: PJ_FALSE

Maximum time to wait for unpublication transaction(s) to complete during shutdown process, before sending unregistration. The library tries to wait for the unpublication (un-PUBLISH) to complete before sending REGISTER request to unregister the account, during library shutdown process. If the value is set too short, it is possible that the unregistration is sent before unpublication completes, causing unpublication request to fail.

Default: PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC

Optional PIDF tuple ID for outgoing PUBLISH and NOTIFY. If this value is not specified, a random string will be used.

Optional URI to be put as Contact for this account. It is recommended that this field is left empty, so that the value will be calculated automatically based on the transport address.

Additional parameters that will be appended in the Contact header for this account. This will affect the Contact header in all SIP messages sent on behalf of this account, including but not limited to REGISTER, INVITE, and SUBCRIBE requests or responses.

The parameters should be preceeded by semicolon, and all strings must be properly escaped. Example: ";my-param=X;another-param=Hi%20there"

Additional URI parameters that will be appended in the Contact URI for this account. This will affect the Contact URI in all SIP messages sent on behalf of this account, including but not limited to REGISTER, INVITE, and SUBCRIBE requests or responses.

The parameters should be preceeded by semicolon, and all strings must be properly escaped. Example: ";my-param=X;another-param=Hi%20there"

Specify how support for reliable provisional response (100rel/ PRACK) should be used for all sessions in this account. See the documentation of pjsua_100rel_use enumeration for more info.

Default: The default value is taken from the value of require_100rel in pjsua_config.

Specify the usage of Session Timers for all sessions. See the pjsua_sip_timer_use for possible values.

Default: PJSUA_SIP_TIMER_OPTIONAL

Number of proxies in the proxy array below.

pj_str_t pjsua_acc_config::proxy[PJSUA_ACC_MAX_PROXIES]

Optional URI of the proxies to be visited for all outgoing requests that are using this account (REGISTER, INVITE, etc). Application need to specify these proxies if the service provider requires that requests destined towards its network should go through certain proxies first (for example, border controllers).

These proxies will be put in the route set for this account, with maintaining the orders (the first proxy in the array will be visited first). If global outbound proxies are configured in pjsua_config, then these account proxies will be placed after the global outbound proxies in the routeset.

Optional interval for registration, in seconds. If the value is zero, default interval will be used (PJSUA_REG_INTERVAL, 300 seconds).

Specify the number of seconds to refresh the client registration before the registration expires.

Default: PJSIP_REGISTER_CLIENT_DELAY_BEFORE_REFRESH, 5 seconds

Specify the maximum time to wait for unregistration requests to complete during library shutdown sequence.

Default: PJSUA_UNREG_TIMEOUT

Number of credentials in the credential array.

Array of credentials. If registration is desired, normally there should be at least one credential specified, to successfully authenticate against the service provider. More credentials can be specified, for example when the requests are expected to be challenged by the proxies in the route set.

Optionally bind this account to specific transport. This normally is not a good idea, as account should be able to send requests using any available transports according to the destination. But some application may want to have explicit control over the transport to use, so in that case it can set this field.

Default: -1 (PJSUA_INVALID_ID)

See also:
pjsua_acc_set_transport()

This option is used to update the transport address and the Contact header of REGISTER request. When this option is enabled, the library will keep track of the public IP address from the response of REGISTER request. Once it detects that the address has changed, it will unregister current Contact, update the Contact with transport address learned from Via header, and register a new Contact to the registrar. This will also update the public name of UDP transport if STUN is configured.

See also contact_rewrite_method field.

Default: 1 (yes)

Specify how Contact update will be done with the registration, if allow_contact_rewrite is enabled.

If set to 1, the Contact update will be done by sending unregistration to the currently registered Contact, while simultaneously sending new registration (with different Call-ID) for the updated Contact.

If set to 2, the Contact update will be done in a single, current registration session, by removing the current binding (by setting its Contact's expires parameter to zero) and adding a new Contact binding, all done in a single request.

Value 1 is the legacy behavior.

Default value: PJSUA_CONTACT_REWRITE_METHOD (2)

Control the use of SIP outbound feature. SIP outbound is described in RFC 5626 to enable proxies or registrar to send inbound requests back to UA using the same connection initiated by the UA for its registration. This feature is highly useful in NAT-ed deployemtns, hence it is enabled by default.

Note: currently SIP outbound can only be used with TCP and TLS transports. If UDP is used for the registration, the SIP outbound feature will be silently ignored for the account.

Default: PJ_TRUE

Specify SIP outbound (RFC 5626) instance ID to be used by this application. If empty, an instance ID will be generated based on the hostname of this agent. If application specifies this parameter, the value will look like "<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>" without the doublequote.

Default: empty

Specify SIP outbound (RFC 5626) registration ID. The default value is empty, which would cause the library to automatically generate a suitable value.

Default: empty

Set the interval for periodic keep-alive transmission for this account. If this value is zero, keep-alive will be disabled for this account. The keep-alive transmission will be sent to the registrar's address, after successful registration.

Default: 15 (seconds)

Specify the data to be transmitted as keep-alive packets.

Default: CR-LF

Specify whether secure media transport should be used for this account. Valid values are PJMEDIA_SRTP_DISABLED, PJMEDIA_SRTP_OPTIONAL, and PJMEDIA_SRTP_MANDATORY.

Default: PJSUA_DEFAULT_USE_SRTP

Specify whether SRTP requires secure signaling to be used. This option is only used when use_srtp option above is non-zero.

Valid values are: 0: SRTP does not require secure signaling 1: SRTP requires secure transport such as TLS 2: SRTP requires secure end-to-end transport (SIPS)

Default: PJSUA_DEFAULT_SRTP_SECURE_SIGNALING

Specify whether SRTP in PJMEDIA_SRTP_OPTIONAL mode should compose duplicated media in SDP offer, i.e: unsecured and secured version. Otherwise, the SDP media will be composed as unsecured media but with SDP "crypto" attribute.

Default: PJ_FALSE

Specify interval of auto registration retry upon registration failure (including caused by transport problem), in second. Set to 0 to disable auto re-registration. Note that if the registration retry occurs because of transport failure, the first retry will be done after reg_first_retry_interval seconds instead. Also note that the interval will be randomized slightly by approximately +/- ten seconds to avoid all clients re-registering at the same time.

See also reg_first_retry_interval setting.

Default: PJSUA_REG_RETRY_INTERVAL

This specifies the interval for the first registration retry. The registration retry is explained in reg_retry_interval. Note that the value here will also be randomized by +/- ten seconds.

Default: 0

Specify whether calls of the configured account should be dropped after registration failure and an attempt of re-registration has also failed.

Default: PJ_FALSE (disabled)

Specify how the registration uses the outbound and account proxy settings. This controls if and what Route headers will appear in the REGISTER request of this account. The value is bitmask combination of PJSUA_REG_USE_OUTBOUND_PROXY and PJSUA_REG_USE_ACC_PROXY bits. If the value is set to 0, the REGISTER request will not use any proxy (i.e. it will not have any Route headers).

Default: 3 (PJSUA_REG_USE_OUTBOUND_PROXY | PJSUA_REG_USE_ACC_PROXY)

Specify whether stream keep-alive and NAT hole punching with non-codec-VAD mechanism (see PJMEDIA_STREAM_ENABLE_KA) is enabled for this account.

Default: PJ_FALSE (disabled)

Specify how to offer call hold to remote peer. Please see the documentation on pjsua_call_hold_type for more info.

Default: PJSUA_CALL_HOLD_TYPE_DEFAULT

Specify whether the account should register as soon as it is added to the UA. Application can set this to PJ_FALSE and control the registration manually with pjsua_acc_set_registration().

Default: PJ_TRUE


The documentation for this struct was generated from the following file:
  • pjsua-lib/pjsua.h

 


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