libamsip  5.2.1
Functions
amsip request interface

Functions

int am_message_execute_uri (osip_message_t **message, const char *identity, const char *url, const char *proxy, const char *route, const char *buf)
 
int ams_message_build (osip_message_t **message, const char *identity, const char *url, const char *proxy, const char *route, const char *buf)
 
int ams_message_send (osip_message_t *message)
 
int am_message_send (const char *identity, const char *url, const char *proxy, const char *route, const char *buf)
 
int am_message_answer (int tid, int code)
 

Detailed Description

Function Documentation

◆ am_message_execute_uri()

int am_message_execute_uri ( osip_message_t **  message,
const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  buf 
)

This method build and send a SIP message.

The url argument can be used to specify the method: default will be MESSAGE. The url can contains "method" parameter to specify a different SIP method as well as SIP headers.

This message must then be sent using "ams_message_send".

Parameters
messageThe message to build.
identitySet your SIP identity.
urlSet the target SIP identity.
proxySet the proxy server.
routeSet the outbound proxy server
bufSet the body data.

◆ ams_message_build()

int ams_message_build ( osip_message_t **  message,
const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  buf 
)

Configure amsip to send a SIP MESSAGE (SIMPLE rfc) with text data.

The body must be text/plain. If you want to set other content, put NULL and then use am_message_set_body to specify your own content.

This message must then be sent using "ams_message_send".

Parameters
messageMessage pointer to build.
identitySet your SIP identity.
urlSet the target SIP identity.
proxySet the proxy server.
routeSet the outbound proxy server
bufSet the body data.

◆ ams_message_send()

int ams_message_send ( osip_message_t *  message)

This method send a any previously built SIP message.

Parameters
messageThe message to send.

◆ am_message_send()

int am_message_send ( const char *  identity,
const char *  url,
const char *  proxy,
const char *  route,
const char *  buf 
)

Configure amsip to send a SIP message with text data.

This method buil and send "MESSAGE" (SIMPLE rfc) with text/plain content-type.

Parameters
identitySet your SIP identity
urlSet the target SIP identity
proxySet the proxy server
routeSet the outbound proxy server
bufSet the body data.

◆ am_message_answer()

int am_message_answer ( int  tid,
int  code 
)

Configure amsip to answer any SIP request.

Parameters
tidid of transaction.
codeCode to answer.