libamsip  5.2.1
Functions
amsip subscription interface

Functions

int am_subscription_start (const char *identity, const char *url, const char *proxy, const char *route, const char *event, const char *accept, int expires)
 
int am_subscription_build_initial_subscribe (const char *identity, const char *url, const char *proxy, const char *route, const char *_event, const char *accept, int expires, osip_message_t **asubscribe)
 
int am_subscription_build_initial_refer (const char *identity, const char *url, const char *proxy, const char *route, const char *accept, const char *refer_to, const char *referred_by, osip_message_t **arefer)
 
int am_subscription_start_with_initial_request (osip_message_t *request)
 
int am_subscription_refresh (int did, const char *event, const char *accept, int expires)
 
int am_subscription_build_refresh (int did, const char *event, const char *accept, int expires, osip_message_t **subscribe)
 
int am_subscription_send_refresh (int did, osip_message_t *subscribe)
 
int am_subscription_remove (int did)
 

Detailed Description

Function Documentation

◆ am_subscription_start()

int am_subscription_start ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  event,
const char *  accept,
int  expires 
)

Configure amsip to start a SIP subscription.

Parameters
identitySIP url for caller.
urlSIP url for callee.
proxyproxy header for SUBSCRIBE.
routeSet the outbound proxy server
eventEvent header for SUBSCRIBE.
acceptAccept header.
expiresExpires header for SUBSCRIBE.

◆ am_subscription_build_initial_subscribe()

int am_subscription_build_initial_subscribe ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  _event,
const char *  accept,
int  expires,
osip_message_t **  asubscribe 
)

Configure amsip to start a SIP subscription.

Parameters
identitySIP url for caller.
urlSIP url for callee.
proxyproxy header for SUBSCRIBE.
routeSet the outbound proxy server
_eventEvent header for SUBSCRIBE.
acceptAccept header.
expiresExpires header for SUBSCRIBE.
asubscribepointer will contains a prepared SUBSCRIBE request.

◆ am_subscription_build_initial_refer()

int am_subscription_build_initial_refer ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  accept,
const char *  refer_to,
const char *  referred_by,
osip_message_t **  arefer 
)

Configure amsip to start a SIP subscription.

Parameters
identitySIP url for caller.
urlSIP url for callee.
proxyproxy header for SUBSCRIBE.
routeSet the outbound proxy server
acceptAccept header.
refer_toRefer-To header.
referred_byRefer-To header.
areferpointer will contains a prepared REFER request.

◆ am_subscription_start_with_initial_request()

int am_subscription_start_with_initial_request ( osip_message_t *  request)

Configure amsip to start a SIP subscription from a built SUBSCRIBE/REFER message.

Parameters
requestpointer containing prepared SUBSCRIBE or REFER request.

◆ am_subscription_refresh()

int am_subscription_refresh ( int  did,
const char *  event,
const char *  accept,
int  expires 
)

Build and send a SUBSCRIBE to refresh a subscription.

Parameters
didSession identifier.
eventEvent header for SUBSCRIBE.
acceptAccept header.
expiresexpires time (0 to stop subscription).

◆ am_subscription_build_refresh()

int am_subscription_build_refresh ( int  did,
const char *  event,
const char *  accept,
int  expires,
osip_message_t **  subscribe 
)

Build a SUBSCRIBE to refresh a subscription.

Parameters
didSession identifier.
eventEvent header for SUBSCRIBE.
acceptAccept header.
expiresexpires time (0 to stop subscription).
subscribepointer will contains a prepared SUBSCRIBE request.

◆ am_subscription_send_refresh()

int am_subscription_send_refresh ( int  did,
osip_message_t *  subscribe 
)

Send a SUBSCRIBE to refresh a subscription.

Parameters
dididentifier of the subscription.
subscribeSUBSCRIBE request to be sent.

◆ am_subscription_remove()

int am_subscription_remove ( int  did)

Remove outgoing subscription context.

Parameters
dididentifier of the subscription.