Group PJSIP_SIP_URI

group PJSIP_SIP_URI

SIP URL structure (“sip:” and “sips:”)

Functions

pjsip_sip_uri *pjsip_sip_uri_create(pj_pool_t *pool, pj_bool_t secure)

Create new SIP URL and initialize all fields with zero or NULL.

Parameters:
  • pool – The pool.

  • secure – Flag to indicate whether secure transport should be used.

Returns:

SIP URL.

void pjsip_sip_uri_set_secure(pjsip_sip_uri *uri, pj_bool_t secure)

Change the SIP URI scheme to sip or sips based on the secure flag. This would not change anything except the scheme.

Parameters:
  • uri – The URI

  • secure – Non-zero if sips is wanted.

void pjsip_sip_uri_init(pjsip_sip_uri *url, pj_bool_t secure)

Initialize SIP URL (all fields are set to NULL or zero).

Parameters:
  • url – The URL.

  • secure – Create sips URI?

void pjsip_sip_uri_assign(pj_pool_t *pool, pjsip_sip_uri *url, const pjsip_sip_uri *rhs)

Perform full assignment to the SIP URL.

Parameters:
  • pool – The pool.

  • url – Destination URL.

  • rhs – The source URL.

pjsip_name_addr *pjsip_name_addr_create(pj_pool_t *pool)

Create new instance of name address and initialize all fields with zero or NULL.

Parameters:

pool – The pool.

Returns:

New SIP name address.

void pjsip_name_addr_init(pjsip_name_addr *name_addr)

Initialize with default value.

Parameters:

name_addr – The name address.

void pjsip_name_addr_assign(pj_pool_t *pool, pjsip_name_addr *addr, const pjsip_name_addr *rhs)

Perform full assignment to the name address.

Parameters:
  • pool – The pool.

  • addr – The destination name address.

  • rhs – The source name address.

struct pjsip_sip_uri
#include <sip_uri.h>

SIP and SIPS URL scheme.

Public Members

pjsip_uri_vptr *vptr

Pointer to virtual function table.

pj_str_t user

Optional user part.

pj_str_t passwd

Optional password part.

pj_str_t host

Host part, always exists.

int port

Optional port number, or zero.

pj_str_t user_param

Optional user parameter

pj_str_t method_param

Optional method parameter.

pj_str_t transport_param

Optional transport parameter.

int ttl_param

Optional TTL param, or -1.

int lr_param

Optional loose routing param, or zero

pj_str_t maddr_param

Optional maddr param

pjsip_param other_param

Other parameters grouped together.

pjsip_param header_param

Optional header parameter.

struct pjsip_name_addr
#include <sip_uri.h>

SIP name-addr, which typically appear in From, To, and Contact header. The SIP name-addr contains a generic URI and a display name.

Public Members

pjsip_uri_vptr *vptr

Pointer to virtual function table.

pj_str_t display

Optional display name.

pjsip_uri *uri

URI part.