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

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>


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().

Data Fields

void * user_data
int priority
pj_str_t id
pj_str_t reg_uri
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
pj_bool_t require_100rel
pj_bool_t require_timer
pjsip_timer_setting timer_setting
unsigned proxy_cnt
pj_str_t proxy [8]
unsigned reg_timeout
unsigned unreg_timeout
unsigned cred_count
pjsip_cred_info cred_info [8]
pjsua_transport_id transport_id
pj_bool_t allow_contact_rewrite
unsigned ka_interval
pj_str_t ka_data
pjmedia_srtp_use use_srtp
int srtp_secure_signaling

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.

Enable message summary and message waiting indication subscription (RFC 3842) for this account.

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 whether support for reliable provisional response (100rel and PRACK) should be required for all sessions of this account.

Default: PJ_FALSE

Specify whether support for Session Timers should be required for all sessions of this account.

Default: PJ_FALSE

Number of proxies in the proxy array below.

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 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 UDP 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.

Default: 1 (yes)

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


The documentation for this struct was generated from the following file:

 


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