The large GULP->PJSIP renaming effort.
The general gist is to have a clear boundary between old SIP stuff and new SIP stuff by having the word "SIP" for old stuff and "PJSIP" for new stuff. Here's a brief rundown of the changes: * The word "Gulp" in dialstrings, functions, and CLI commands is now "PJSIP" * chan_gulp.c is now chan_pjsip.c * Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*" * All files that were "res_sip*" are now "res_pjsip*" * The "res_sip" directory is now "res_pjsip" * Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*" * The configuration file is now "pjsip.conf" instead of "res_sip.conf" * The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP" * CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as the starting word instead of "sip" git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
895c8e0d2c
commit
735b30ad71
|
@ -20,15 +20,15 @@
|
|||
*
|
||||
* \author Joshua Colp <jcolp@digium.com>
|
||||
*
|
||||
* \brief Gulp SIP Channel Driver
|
||||
* \brief PSJIP SIP Channel Driver
|
||||
*
|
||||
* \ingroup channel_drivers
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -58,11 +58,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include "asterisk/stasis_channels.h"
|
||||
#include "asterisk/indications.h"
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<function name="GULP_DIAL_CONTACTS" language="en_US">
|
||||
<function name="PJSIP_DIAL_CONTACTS" language="en_US">
|
||||
<synopsis>
|
||||
Return a dial string for dialing all contacts on an AOR.
|
||||
</synopsis>
|
||||
|
@ -81,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
<para>Returns a properly formatted dial string for dialing all contacts on an AOR.</para>
|
||||
</description>
|
||||
</function>
|
||||
<function name="GULP_MEDIA_OFFER" language="en_US">
|
||||
<function name="PJSIP_MEDIA_OFFER" language="en_US">
|
||||
<synopsis>
|
||||
Media and codec offerings to be set on an outbound SIP channel prior to dialing.
|
||||
</synopsis>
|
||||
|
@ -96,8 +96,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
</function>
|
||||
***/
|
||||
|
||||
static const char desc[] = "Gulp SIP Channel";
|
||||
static const char channel_type[] = "Gulp";
|
||||
static const char desc[] = "PJSIP Channel";
|
||||
static const char channel_type[] = "PJSIP";
|
||||
|
||||
static unsigned int chan_idx;
|
||||
|
||||
|
@ -113,13 +113,13 @@ enum sip_session_media_position {
|
|||
SIP_MEDIA_SIZE,
|
||||
};
|
||||
|
||||
struct gulp_pvt {
|
||||
struct chan_pjsip_pvt {
|
||||
struct ast_sip_session_media *media[SIP_MEDIA_SIZE];
|
||||
};
|
||||
|
||||
static void gulp_pvt_dtor(void *obj)
|
||||
static void chan_pjsip_pvt_dtor(void *obj)
|
||||
{
|
||||
struct gulp_pvt *pvt = obj;
|
||||
struct chan_pjsip_pvt *pvt = obj;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < SIP_MEDIA_SIZE; ++i) {
|
||||
|
@ -129,70 +129,70 @@ static void gulp_pvt_dtor(void *obj)
|
|||
}
|
||||
|
||||
/* \brief Asterisk core interaction functions */
|
||||
static struct ast_channel *gulp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
|
||||
static int gulp_sendtext(struct ast_channel *ast, const char *text);
|
||||
static int gulp_digit_begin(struct ast_channel *ast, char digit);
|
||||
static int gulp_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
|
||||
static int gulp_call(struct ast_channel *ast, const char *dest, int timeout);
|
||||
static int gulp_hangup(struct ast_channel *ast);
|
||||
static int gulp_answer(struct ast_channel *ast);
|
||||
static struct ast_frame *gulp_read(struct ast_channel *ast);
|
||||
static int gulp_write(struct ast_channel *ast, struct ast_frame *f);
|
||||
static int gulp_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
|
||||
static int gulp_transfer(struct ast_channel *ast, const char *target);
|
||||
static int gulp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
|
||||
static int gulp_devicestate(const char *data);
|
||||
static int gulp_queryoption(struct ast_channel *ast, int option, void *data, int *datalen);
|
||||
static struct ast_channel *chan_pjsip_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause);
|
||||
static int chan_pjsip_sendtext(struct ast_channel *ast, const char *text);
|
||||
static int chan_pjsip_digit_begin(struct ast_channel *ast, char digit);
|
||||
static int chan_pjsip_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
|
||||
static int chan_pjsip_call(struct ast_channel *ast, const char *dest, int timeout);
|
||||
static int chan_pjsip_hangup(struct ast_channel *ast);
|
||||
static int chan_pjsip_answer(struct ast_channel *ast);
|
||||
static struct ast_frame *chan_pjsip_read(struct ast_channel *ast);
|
||||
static int chan_pjsip_write(struct ast_channel *ast, struct ast_frame *f);
|
||||
static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
|
||||
static int chan_pjsip_transfer(struct ast_channel *ast, const char *target);
|
||||
static int chan_pjsip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
|
||||
static int chan_pjsip_devicestate(const char *data);
|
||||
static int chan_pjsip_queryoption(struct ast_channel *ast, int option, void *data, int *datalen);
|
||||
|
||||
/*! \brief PBX interface structure for channel registration */
|
||||
static struct ast_channel_tech gulp_tech = {
|
||||
static struct ast_channel_tech chan_pjsip_tech = {
|
||||
.type = channel_type,
|
||||
.description = "Gulp SIP Channel Driver",
|
||||
.requester = gulp_request,
|
||||
.send_text = gulp_sendtext,
|
||||
.send_digit_begin = gulp_digit_begin,
|
||||
.send_digit_end = gulp_digit_end,
|
||||
.call = gulp_call,
|
||||
.hangup = gulp_hangup,
|
||||
.answer = gulp_answer,
|
||||
.read = gulp_read,
|
||||
.write = gulp_write,
|
||||
.write_video = gulp_write,
|
||||
.exception = gulp_read,
|
||||
.indicate = gulp_indicate,
|
||||
.transfer = gulp_transfer,
|
||||
.fixup = gulp_fixup,
|
||||
.devicestate = gulp_devicestate,
|
||||
.queryoption = gulp_queryoption,
|
||||
.description = "PJSIP Channel Driver",
|
||||
.requester = chan_pjsip_request,
|
||||
.send_text = chan_pjsip_sendtext,
|
||||
.send_digit_begin = chan_pjsip_digit_begin,
|
||||
.send_digit_end = chan_pjsip_digit_end,
|
||||
.call = chan_pjsip_call,
|
||||
.hangup = chan_pjsip_hangup,
|
||||
.answer = chan_pjsip_answer,
|
||||
.read = chan_pjsip_read,
|
||||
.write = chan_pjsip_write,
|
||||
.write_video = chan_pjsip_write,
|
||||
.exception = chan_pjsip_read,
|
||||
.indicate = chan_pjsip_indicate,
|
||||
.transfer = chan_pjsip_transfer,
|
||||
.fixup = chan_pjsip_fixup,
|
||||
.devicestate = chan_pjsip_devicestate,
|
||||
.queryoption = chan_pjsip_queryoption,
|
||||
.properties = AST_CHAN_TP_WANTSJITTER | AST_CHAN_TP_CREATESJITTER
|
||||
};
|
||||
|
||||
/*! \brief SIP session interaction functions */
|
||||
static void gulp_session_begin(struct ast_sip_session *session);
|
||||
static void gulp_session_end(struct ast_sip_session *session);
|
||||
static int gulp_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
static void gulp_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
static void chan_pjsip_session_begin(struct ast_sip_session *session);
|
||||
static void chan_pjsip_session_end(struct ast_sip_session *session);
|
||||
static int chan_pjsip_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
|
||||
/*! \brief SIP session supplement structure */
|
||||
static struct ast_sip_session_supplement gulp_supplement = {
|
||||
static struct ast_sip_session_supplement chan_pjsip_supplement = {
|
||||
.method = "INVITE",
|
||||
.priority = AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL,
|
||||
.session_begin = gulp_session_begin,
|
||||
.session_end = gulp_session_end,
|
||||
.incoming_request = gulp_incoming_request,
|
||||
.incoming_response = gulp_incoming_response,
|
||||
.session_begin = chan_pjsip_session_begin,
|
||||
.session_end = chan_pjsip_session_end,
|
||||
.incoming_request = chan_pjsip_incoming_request,
|
||||
.incoming_response = chan_pjsip_incoming_response,
|
||||
};
|
||||
|
||||
static int gulp_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
static int chan_pjsip_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||
|
||||
static struct ast_sip_session_supplement gulp_ack_supplement = {
|
||||
static struct ast_sip_session_supplement chan_pjsip_ack_supplement = {
|
||||
.method = "ACK",
|
||||
.priority = AST_SIP_SESSION_SUPPLEMENT_PRIORITY_CHANNEL,
|
||||
.incoming_request = gulp_incoming_ack,
|
||||
.incoming_request = chan_pjsip_incoming_ack,
|
||||
};
|
||||
|
||||
/*! \brief Dialplan function for constructing a dial string for calling all contacts */
|
||||
static int gulp_dial_contacts(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
|
||||
static int chan_pjsip_dial_contacts(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
|
||||
{
|
||||
RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
|
||||
RAII_VAR(struct ast_str *, dial, NULL, ast_free_ptr);
|
||||
|
@ -247,7 +247,7 @@ static int gulp_dial_contacts(struct ast_channel *chan, const char *cmd, char *d
|
|||
|
||||
it_contacts = ao2_iterator_init(contacts, 0);
|
||||
for (; (contact = ao2_iterator_next(&it_contacts)); ao2_ref(contact, -1)) {
|
||||
ast_str_append(&dial, -1, "Gulp/");
|
||||
ast_str_append(&dial, -1, "PJSIP/");
|
||||
|
||||
if (!ast_strlen_zero(args.request_user)) {
|
||||
ast_str_append(&dial, -1, "%s@", args.request_user);
|
||||
|
@ -265,9 +265,9 @@ static int gulp_dial_contacts(struct ast_channel *chan, const char *cmd, char *d
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct ast_custom_function gulp_dial_contacts_function = {
|
||||
.name = "GULP_DIAL_CONTACTS",
|
||||
.read = gulp_dial_contacts,
|
||||
static struct ast_custom_function chan_pjsip_dial_contacts_function = {
|
||||
.name = "PJSIP_DIAL_CONTACTS",
|
||||
.read = chan_pjsip_dial_contacts,
|
||||
};
|
||||
|
||||
static int media_offer_read_av(struct ast_sip_session *session, char *buf,
|
||||
|
@ -285,7 +285,7 @@ static int media_offer_read_av(struct ast_sip_session *session, char *buf,
|
|||
name = ast_getformatname(&fmt);
|
||||
|
||||
if (ast_strlen_zero(name)) {
|
||||
ast_log(LOG_WARNING, "GULP_MEDIA_OFFER unrecognized format %s\n", name);
|
||||
ast_log(LOG_WARNING, "PJSIP_MEDIA_OFFER unrecognized format %s\n", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -364,16 +364,16 @@ static int media_offer_write(struct ast_channel *chan, const char *cmd, char *da
|
|||
}
|
||||
|
||||
static struct ast_custom_function media_offer_function = {
|
||||
.name = "GULP_MEDIA_OFFER",
|
||||
.name = "PJSIP_MEDIA_OFFER",
|
||||
.read = media_offer_read,
|
||||
.write = media_offer_write
|
||||
};
|
||||
|
||||
/*! \brief Function called by RTP engine to get local audio RTP peer */
|
||||
static enum ast_rtp_glue_result gulp_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **instance)
|
||||
static enum ast_rtp_glue_result chan_pjsip_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **instance)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_endpoint *endpoint;
|
||||
|
||||
if (!pvt || !channel->session || !pvt->media[SIP_MEDIA_AUDIO]->rtp) {
|
||||
|
@ -398,10 +398,10 @@ static enum ast_rtp_glue_result gulp_get_rtp_peer(struct ast_channel *chan, stru
|
|||
}
|
||||
|
||||
/*! \brief Function called by RTP engine to get local video RTP peer */
|
||||
static enum ast_rtp_glue_result gulp_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **instance)
|
||||
static enum ast_rtp_glue_result chan_pjsip_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **instance)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_endpoint *endpoint;
|
||||
|
||||
if (!pvt || !channel->session || !pvt->media[SIP_MEDIA_VIDEO]->rtp) {
|
||||
|
@ -422,7 +422,7 @@ static enum ast_rtp_glue_result gulp_get_vrtp_peer(struct ast_channel *chan, str
|
|||
}
|
||||
|
||||
/*! \brief Function called by RTP engine to get peer capabilities */
|
||||
static void gulp_get_codec(struct ast_channel *chan, struct ast_format_cap *result)
|
||||
static void chan_pjsip_get_codec(struct ast_channel *chan, struct ast_format_cap *result)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
|
||||
|
@ -492,7 +492,7 @@ static int check_for_rtp_changes(struct ast_channel *chan, struct ast_rtp_instan
|
|||
}
|
||||
|
||||
/*! \brief Function called by RTP engine to change where the remote party should send media */
|
||||
static int gulp_set_rtp_peer(struct ast_channel *chan,
|
||||
static int chan_pjsip_set_rtp_peer(struct ast_channel *chan,
|
||||
struct ast_rtp_instance *rtp,
|
||||
struct ast_rtp_instance *vrtp,
|
||||
struct ast_rtp_instance *tpeer,
|
||||
|
@ -500,7 +500,7 @@ static int gulp_set_rtp_peer(struct ast_channel *chan,
|
|||
int nat_active)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session *session = channel->session;
|
||||
int changed = 0;
|
||||
struct ast_channel *bridge_peer;
|
||||
|
@ -545,32 +545,32 @@ static int gulp_set_rtp_peer(struct ast_channel *chan,
|
|||
}
|
||||
|
||||
/*! \brief Local glue for interacting with the RTP engine core */
|
||||
static struct ast_rtp_glue gulp_rtp_glue = {
|
||||
.type = "Gulp",
|
||||
.get_rtp_info = gulp_get_rtp_peer,
|
||||
.get_vrtp_info = gulp_get_vrtp_peer,
|
||||
.get_codec = gulp_get_codec,
|
||||
.update_peer = gulp_set_rtp_peer,
|
||||
static struct ast_rtp_glue chan_pjsip_rtp_glue = {
|
||||
.type = "PJSIP",
|
||||
.get_rtp_info = chan_pjsip_get_rtp_peer,
|
||||
.get_vrtp_info = chan_pjsip_get_vrtp_peer,
|
||||
.get_codec = chan_pjsip_get_codec,
|
||||
.update_peer = chan_pjsip_set_rtp_peer,
|
||||
};
|
||||
|
||||
/*! \brief Function called to create a new Gulp Asterisk channel */
|
||||
static struct ast_channel *gulp_new(struct ast_sip_session *session, int state, const char *exten, const char *title, const char *linkedid, const char *cid_name)
|
||||
/*! \brief Function called to create a new PJSIP Asterisk channel */
|
||||
static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int state, const char *exten, const char *title, const char *linkedid, const char *cid_name)
|
||||
{
|
||||
struct ast_channel *chan;
|
||||
struct ast_format fmt;
|
||||
RAII_VAR(struct gulp_pvt *, pvt, NULL, ao2_cleanup);
|
||||
RAII_VAR(struct chan_pjsip_pvt *, pvt, NULL, ao2_cleanup);
|
||||
struct ast_sip_channel_pvt *channel;
|
||||
|
||||
if (!(pvt = ao2_alloc(sizeof(*pvt), gulp_pvt_dtor))) {
|
||||
if (!(pvt = ao2_alloc(sizeof(*pvt), chan_pjsip_pvt_dtor))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(chan = ast_channel_alloc(1, state, S_OR(session->id.number.str, ""), S_OR(session->id.name.str, ""), "", "", "", linkedid, 0, "Gulp/%s-%08x", ast_sorcery_object_get_id(session->endpoint),
|
||||
if (!(chan = ast_channel_alloc(1, state, S_OR(session->id.number.str, ""), S_OR(session->id.name.str, ""), "", "", "", linkedid, 0, "PJSIP/%s-%08x", ast_sorcery_object_get_id(session->endpoint),
|
||||
ast_atomic_fetchadd_int((int *)&chan_idx, +1)))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ast_channel_tech_set(chan, &gulp_tech);
|
||||
ast_channel_tech_set(chan, &chan_pjsip_tech);
|
||||
|
||||
if (!(channel = ast_sip_channel_pvt_alloc(pvt, session))) {
|
||||
ast_hangup(chan);
|
||||
|
@ -650,8 +650,8 @@ static int answer(void *data)
|
|||
return (status == PJ_SUCCESS) ? 0 : -1;
|
||||
}
|
||||
|
||||
/*! \brief Function called by core when we should answer a Gulp session */
|
||||
static int gulp_answer(struct ast_channel *ast)
|
||||
/*! \brief Function called by core when we should answer a PJSIP session */
|
||||
static int chan_pjsip_answer(struct ast_channel *ast)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
|
||||
|
@ -672,7 +672,7 @@ static int gulp_answer(struct ast_channel *ast)
|
|||
}
|
||||
|
||||
/*! \brief Internal helper function called when CNG tone is detected */
|
||||
static struct ast_frame *gulp_cng_tone_detected(struct ast_sip_session *session, struct ast_frame *f)
|
||||
static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *session, struct ast_frame *f)
|
||||
{
|
||||
const char *target_context;
|
||||
int exists;
|
||||
|
@ -721,10 +721,10 @@ static struct ast_frame *gulp_cng_tone_detected(struct ast_sip_session *session,
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to read any waiting frames */
|
||||
static struct ast_frame *gulp_read(struct ast_channel *ast)
|
||||
static struct ast_frame *chan_pjsip_read(struct ast_channel *ast)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_frame *f;
|
||||
struct ast_sip_session_media *media = NULL;
|
||||
int rtcp = 0;
|
||||
|
@ -772,7 +772,7 @@ static struct ast_frame *gulp_read(struct ast_channel *ast)
|
|||
if (f && (f->frametype == AST_FRAME_DTMF)) {
|
||||
if (f->subclass.integer == 'f') {
|
||||
ast_debug(3, "Fax CNG detected on %s\n", ast_channel_name(ast));
|
||||
f = gulp_cng_tone_detected(channel->session, f);
|
||||
f = chan_pjsip_cng_tone_detected(channel->session, f);
|
||||
} else {
|
||||
ast_debug(3, "* Detected inband DTMF '%c' on '%s'\n", f->subclass.integer,
|
||||
ast_channel_name(ast));
|
||||
|
@ -784,10 +784,10 @@ static struct ast_frame *gulp_read(struct ast_channel *ast)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to write frames */
|
||||
static int gulp_write(struct ast_channel *ast, struct ast_frame *frame)
|
||||
static int chan_pjsip_write(struct ast_channel *ast, struct ast_frame *frame)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session_media *media;
|
||||
int res = 0;
|
||||
|
||||
|
@ -821,7 +821,7 @@ static int gulp_write(struct ast_channel *ast, struct ast_frame *frame)
|
|||
case AST_FRAME_MODEM:
|
||||
break;
|
||||
default:
|
||||
ast_log(LOG_WARNING, "Can't send %d type frames with Gulp\n", frame->frametype);
|
||||
ast_log(LOG_WARNING, "Can't send %d type frames with PJSIP\n", frame->frametype);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -837,7 +837,7 @@ static int fixup(void *data)
|
|||
{
|
||||
struct fixup_data *fix_data = data;
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(fix_data->chan);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
|
||||
channel->session->channel = fix_data->chan;
|
||||
if (pvt->media[SIP_MEDIA_AUDIO] && pvt->media[SIP_MEDIA_AUDIO]->rtp) {
|
||||
|
@ -851,7 +851,7 @@ static int fixup(void *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to change the underlying owner channel */
|
||||
static int gulp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
|
||||
static int chan_pjsip_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(newchan);
|
||||
struct fixup_data fix_data;
|
||||
|
@ -872,7 +872,7 @@ static int gulp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
|
|||
}
|
||||
|
||||
/*! \brief Function called to get the device state of an endpoint */
|
||||
static int gulp_devicestate(const char *data)
|
||||
static int chan_pjsip_devicestate(const char *data)
|
||||
{
|
||||
RAII_VAR(struct ast_sip_endpoint *, endpoint, ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", data), ao2_cleanup);
|
||||
enum ast_device_state state = AST_DEVICE_UNKNOWN;
|
||||
|
@ -934,7 +934,7 @@ static int gulp_devicestate(const char *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called to query options on a channel */
|
||||
static int gulp_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
|
||||
static int chan_pjsip_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct ast_sip_session *session = channel->session;
|
||||
|
@ -1099,10 +1099,10 @@ static int update_connected_line_information(void *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to ask the channel to indicate some sort of condition */
|
||||
static int gulp_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
|
||||
static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session_media *media;
|
||||
int response_code = 0;
|
||||
int res = 0;
|
||||
|
@ -1119,7 +1119,7 @@ static int gulp_indicate(struct ast_channel *ast, int condition, const void *dat
|
|||
} else {
|
||||
res = -1;
|
||||
}
|
||||
ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "Gulp/%s", ast_sorcery_object_get_id(channel->session->endpoint));
|
||||
ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "PJSIP/%s", ast_sorcery_object_get_id(channel->session->endpoint));
|
||||
break;
|
||||
case AST_CONTROL_BUSY:
|
||||
if (ast_channel_state(ast) != AST_STATE_UP) {
|
||||
|
@ -1335,7 +1335,7 @@ static int transfer(void *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core for Asterisk initiated transfer */
|
||||
static int gulp_transfer(struct ast_channel *chan, const char *target)
|
||||
static int chan_pjsip_transfer(struct ast_channel *chan, const char *target)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
struct transfer_data *trnf_data = transfer_data_alloc(channel->session, target);
|
||||
|
@ -1354,10 +1354,10 @@ static int gulp_transfer(struct ast_channel *chan, const char *target)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to start a DTMF digit */
|
||||
static int gulp_digit_begin(struct ast_channel *chan, char digit)
|
||||
static int chan_pjsip_digit_begin(struct ast_channel *chan, char digit)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
|
||||
int res = 0;
|
||||
|
||||
|
@ -1442,10 +1442,10 @@ static int transmit_info_dtmf(void *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to stop a DTMF digit */
|
||||
static int gulp_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
|
||||
static int chan_pjsip_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session_media *media = pvt->media[SIP_MEDIA_AUDIO];
|
||||
int res = 0;
|
||||
|
||||
|
@ -1498,7 +1498,7 @@ static int call(void *data)
|
|||
}
|
||||
|
||||
/*! \brief Function called by core to actually start calling a remote party */
|
||||
static int gulp_call(struct ast_channel *ast, const char *dest, int timeout)
|
||||
static int chan_pjsip_call(struct ast_channel *ast, const char *dest, int timeout)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
|
||||
|
@ -1587,7 +1587,7 @@ static struct hangup_data *hangup_data_alloc(int cause, struct ast_channel *chan
|
|||
}
|
||||
|
||||
/*! \brief Clear a channel from a session along with its PVT */
|
||||
static void clear_session_and_channel(struct ast_sip_session *session, struct ast_channel *ast, struct gulp_pvt *pvt)
|
||||
static void clear_session_and_channel(struct ast_sip_session *session, struct ast_channel *ast, struct chan_pjsip_pvt *pvt)
|
||||
{
|
||||
session->channel = NULL;
|
||||
if (pvt->media[SIP_MEDIA_AUDIO] && pvt->media[SIP_MEDIA_AUDIO]->rtp) {
|
||||
|
@ -1606,7 +1606,7 @@ static int hangup(void *data)
|
|||
struct hangup_data *h_data = data;
|
||||
struct ast_channel *ast = h_data->chan;
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
struct ast_sip_session *session = channel->session;
|
||||
int cause = h_data->cause;
|
||||
|
||||
|
@ -1626,11 +1626,11 @@ static int hangup(void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Function called by core to hang up a Gulp session */
|
||||
static int gulp_hangup(struct ast_channel *ast)
|
||||
/*! \brief Function called by core to hang up a PJSIP session */
|
||||
static int chan_pjsip_hangup(struct ast_channel *ast)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct gulp_pvt *pvt = channel->pvt;
|
||||
struct chan_pjsip_pvt *pvt = channel->pvt;
|
||||
int cause = hangup_cause2sip(ast_channel_hangupcause(channel->session->channel));
|
||||
struct hangup_data *h_data = hangup_data_alloc(cause, ast);
|
||||
|
||||
|
@ -1676,7 +1676,7 @@ static int request(void *obj)
|
|||
);
|
||||
|
||||
if (ast_strlen_zero(tmp)) {
|
||||
ast_log(LOG_ERROR, "Unable to create Gulp channel with empty destination\n");
|
||||
ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty destination\n");
|
||||
req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
|
||||
return -1;
|
||||
}
|
||||
|
@ -1692,10 +1692,10 @@ static int request(void *obj)
|
|||
}
|
||||
|
||||
if (ast_strlen_zero(endpoint_name)) {
|
||||
ast_log(LOG_ERROR, "Unable to create Gulp channel with empty endpoint name\n");
|
||||
ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
|
||||
req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
|
||||
} else if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
|
||||
ast_log(LOG_ERROR, "Unable to create Gulp channel - endpoint '%s' was not found\n", endpoint_name);
|
||||
ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name);
|
||||
req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
|
||||
return -1;
|
||||
}
|
||||
|
@ -1710,8 +1710,8 @@ static int request(void *obj)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Function called by core to create a new outgoing Gulp session */
|
||||
static struct ast_channel *gulp_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
|
||||
/*! \brief Function called by core to create a new outgoing PJSIP session */
|
||||
static struct ast_channel *chan_pjsip_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, const char *data, int *cause)
|
||||
{
|
||||
struct request_data req_data;
|
||||
RAII_VAR(struct ast_sip_session *, session, NULL, ao2_cleanup);
|
||||
|
@ -1726,7 +1726,7 @@ static struct ast_channel *gulp_request(const char *type, struct ast_format_cap
|
|||
|
||||
session = req_data.session;
|
||||
|
||||
if (!(session->channel = gulp_new(session, AST_STATE_DOWN, NULL, NULL, requestor ? ast_channel_linkedid(requestor) : NULL, NULL))) {
|
||||
if (!(session->channel = chan_pjsip_new(session, AST_STATE_DOWN, NULL, NULL, requestor ? ast_channel_linkedid(requestor) : NULL, NULL))) {
|
||||
/* Session needs to be terminated prematurely */
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1784,8 +1784,8 @@ static int sendtext(void *obj)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Function called by core to send text on Gulp session */
|
||||
static int gulp_sendtext(struct ast_channel *ast, const char *text)
|
||||
/*! \brief Function called by core to send text on PJSIP session */
|
||||
static int chan_pjsip_sendtext(struct ast_channel *ast, const char *text)
|
||||
{
|
||||
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(ast);
|
||||
struct sendtext_data *data = sendtext_data_create(channel->session, text);
|
||||
|
@ -1888,7 +1888,7 @@ static int hangup_sip2cause(int cause)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gulp_session_begin(struct ast_sip_session *session)
|
||||
static void chan_pjsip_session_begin(struct ast_sip_session *session)
|
||||
{
|
||||
RAII_VAR(struct ast_datastore *, datastore, NULL, ao2_cleanup);
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ static void gulp_session_begin(struct ast_sip_session *session)
|
|||
}
|
||||
|
||||
/*! \brief Function called when the session ends */
|
||||
static void gulp_session_end(struct ast_sip_session *session)
|
||||
static void chan_pjsip_session_end(struct ast_sip_session *session)
|
||||
{
|
||||
if (!session->channel) {
|
||||
return;
|
||||
|
@ -1924,7 +1924,7 @@ static void gulp_session_end(struct ast_sip_session *session)
|
|||
}
|
||||
|
||||
/*! \brief Function called when a request is received on the session */
|
||||
static int gulp_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
static int chan_pjsip_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
{
|
||||
pjsip_tx_data *packet = NULL;
|
||||
|
||||
|
@ -1932,12 +1932,12 @@ static int gulp_incoming_request(struct ast_sip_session *session, struct pjsip_r
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!(session->channel = gulp_new(session, AST_STATE_RING, session->exten, NULL, NULL, NULL))) {
|
||||
if (!(session->channel = chan_pjsip_new(session, AST_STATE_RING, session->exten, NULL, NULL, NULL))) {
|
||||
if (pjsip_inv_end_session(session->inv_session, 503, NULL, &packet) == PJ_SUCCESS) {
|
||||
ast_sip_session_send_response(session, packet);
|
||||
}
|
||||
|
||||
ast_log(LOG_ERROR, "Failed to allocate new GULP channel on incoming SIP INVITE\n");
|
||||
ast_log(LOG_ERROR, "Failed to allocate new PJSIP channel on incoming SIP INVITE\n");
|
||||
return -1;
|
||||
}
|
||||
/* channel gets created on incoming request, but we wait to call start
|
||||
|
@ -1967,7 +1967,7 @@ static int pbx_start_incoming_request(struct ast_sip_session *session, pjsip_rx_
|
|||
break;
|
||||
}
|
||||
|
||||
ast_debug(3, "Started PBX on new GULP channel %s\n", ast_channel_name(session->channel));
|
||||
ast_debug(3, "Started PBX on new PJSIP channel %s\n", ast_channel_name(session->channel));
|
||||
|
||||
return (res == AST_PBX_SUCCESS) ? 0 : -1;
|
||||
}
|
||||
|
@ -1979,7 +1979,7 @@ static struct ast_sip_session_supplement pbx_start_supplement = {
|
|||
};
|
||||
|
||||
/*! \brief Function called when a response is received on the session */
|
||||
static void gulp_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
{
|
||||
struct pjsip_status_line status = rdata->msg_info.msg->line.status;
|
||||
|
||||
|
@ -2005,7 +2005,7 @@ static void gulp_incoming_response(struct ast_sip_session *session, struct pjsip
|
|||
}
|
||||
}
|
||||
|
||||
static int gulp_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
static int chan_pjsip_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
{
|
||||
if (rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD) {
|
||||
if (session->endpoint->media.direct_media.enabled) {
|
||||
|
@ -2027,43 +2027,43 @@ static int gulp_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_da
|
|||
*/
|
||||
static int load_module(void)
|
||||
{
|
||||
if (!(gulp_tech.capabilities = ast_format_cap_alloc())) {
|
||||
if (!(chan_pjsip_tech.capabilities = ast_format_cap_alloc())) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
ast_format_cap_add_all_by_type(gulp_tech.capabilities, AST_FORMAT_TYPE_AUDIO);
|
||||
ast_format_cap_add_all_by_type(chan_pjsip_tech.capabilities, AST_FORMAT_TYPE_AUDIO);
|
||||
|
||||
ast_rtp_glue_register(&gulp_rtp_glue);
|
||||
ast_rtp_glue_register(&chan_pjsip_rtp_glue);
|
||||
|
||||
if (ast_channel_register(&gulp_tech)) {
|
||||
if (ast_channel_register(&chan_pjsip_tech)) {
|
||||
ast_log(LOG_ERROR, "Unable to register channel class %s\n", channel_type);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (ast_custom_function_register(&gulp_dial_contacts_function)) {
|
||||
ast_log(LOG_ERROR, "Unable to register GULP_DIAL_CONTACTS dialplan function\n");
|
||||
if (ast_custom_function_register(&chan_pjsip_dial_contacts_function)) {
|
||||
ast_log(LOG_ERROR, "Unable to register PJSIP_DIAL_CONTACTS dialplan function\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (ast_custom_function_register(&media_offer_function)) {
|
||||
ast_log(LOG_WARNING, "Unable to register GULP_MEDIA_OFFER dialplan function\n");
|
||||
ast_log(LOG_WARNING, "Unable to register PJSIP_MEDIA_OFFER dialplan function\n");
|
||||
}
|
||||
|
||||
if (ast_sip_session_register_supplement(&gulp_supplement)) {
|
||||
ast_log(LOG_ERROR, "Unable to register Gulp supplement\n");
|
||||
if (ast_sip_session_register_supplement(&chan_pjsip_supplement)) {
|
||||
ast_log(LOG_ERROR, "Unable to register PJSIP supplement\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (ast_sip_session_register_supplement(&pbx_start_supplement)) {
|
||||
ast_log(LOG_ERROR, "Unable to register Gulp pbx start supplement\n");
|
||||
ast_sip_session_unregister_supplement(&gulp_supplement);
|
||||
ast_log(LOG_ERROR, "Unable to register PJSIP pbx start supplement\n");
|
||||
ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (ast_sip_session_register_supplement(&gulp_ack_supplement)) {
|
||||
ast_log(LOG_ERROR, "Unable to register Gulp ACK supplement\n");
|
||||
if (ast_sip_session_register_supplement(&chan_pjsip_ack_supplement)) {
|
||||
ast_log(LOG_ERROR, "Unable to register PJSIP ACK supplement\n");
|
||||
ast_sip_session_unregister_supplement(&pbx_start_supplement);
|
||||
ast_sip_session_unregister_supplement(&gulp_supplement);
|
||||
ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
@ -2071,9 +2071,9 @@ static int load_module(void)
|
|||
|
||||
end:
|
||||
ast_custom_function_unregister(&media_offer_function);
|
||||
ast_custom_function_unregister(&gulp_dial_contacts_function);
|
||||
ast_channel_unregister(&gulp_tech);
|
||||
ast_rtp_glue_unregister(&gulp_rtp_glue);
|
||||
ast_custom_function_unregister(&chan_pjsip_dial_contacts_function);
|
||||
ast_channel_unregister(&chan_pjsip_tech);
|
||||
ast_rtp_glue_unregister(&chan_pjsip_rtp_glue);
|
||||
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
|
@ -2084,22 +2084,22 @@ static int reload(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/*! \brief Unload the Gulp channel from Asterisk */
|
||||
/*! \brief Unload the PJSIP channel from Asterisk */
|
||||
static int unload_module(void)
|
||||
{
|
||||
ast_custom_function_unregister(&media_offer_function);
|
||||
|
||||
ast_sip_session_unregister_supplement(&gulp_supplement);
|
||||
ast_sip_session_unregister_supplement(&chan_pjsip_supplement);
|
||||
ast_sip_session_unregister_supplement(&pbx_start_supplement);
|
||||
|
||||
ast_custom_function_unregister(&gulp_dial_contacts_function);
|
||||
ast_channel_unregister(&gulp_tech);
|
||||
ast_rtp_glue_unregister(&gulp_rtp_glue);
|
||||
ast_custom_function_unregister(&chan_pjsip_dial_contacts_function);
|
||||
ast_channel_unregister(&chan_pjsip_tech);
|
||||
ast_rtp_glue_unregister(&chan_pjsip_rtp_glue);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Gulp SIP Channel Driver",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Channel Driver",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
|
@ -43,8 +43,8 @@ snmp/agent.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_snmp)
|
|||
$(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
|
||||
ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
|
||||
|
||||
$(if $(filter res_sip,$(EMBEDDED_MODS)),modules.link,res_sip.so): $(subst .c,.o,$(wildcard res_sip/*.c))
|
||||
$(subst .c,.o,$(wildcard res_sip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_sip)
|
||||
$(if $(filter res_pjsip,$(EMBEDDED_MODS)),modules.link,res_pjsip.so): $(subst .c,.o,$(wildcard res_pjsip/*.c))
|
||||
$(subst .c,.o,$(wildcard res_pjsip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_pjsip)
|
||||
|
||||
$(if $(filter res_stasis,$(EMBEDDED_MODS)),modules.link,res_stasis.so): $(subst .c,.o,$(wildcard stasis/*.c))
|
||||
$(subst .c,.o,$(wildcard stasis/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_stasis)
|
||||
|
@ -74,7 +74,7 @@ ael/pval.o: ael/pval.c
|
|||
|
||||
clean::
|
||||
rm -f snmp/*.[oi] ael/*.[oi] ais/*.[oi] ari/*.[oi]
|
||||
rm -f res_sip/*.[oi] stasis/*.[oi]
|
||||
rm -f res_pjsip/*.[oi] stasis/*.[oi]
|
||||
rm -f parking/*.o parking/*.i
|
||||
|
||||
$(if $(filter res_parking,$(EMBEDDED_MODS)),modules.link,res_parking.so): $(subst .c,.o,$(wildcard parking/*.c))
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include <pjsip_simple.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "res_sip/include/res_sip_private.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "res_pjsip/include/res_pjsip_private.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/lock.h"
|
||||
|
@ -43,9 +43,9 @@
|
|||
***/
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<configInfo name="res_sip" language="en_US">
|
||||
<configInfo name="res_pjsip" language="en_US">
|
||||
<synopsis>SIP Resource using PJProject</synopsis>
|
||||
<configFile name="res_sip.conf">
|
||||
<configFile name="pjsip.conf">
|
||||
<configObject name="endpoint">
|
||||
<synopsis>Endpoint</synopsis>
|
||||
<description><para>
|
||||
|
@ -55,7 +55,7 @@
|
|||
accomplished via Addresses of Record (AoRs) which have one or more
|
||||
contacts assicated with them. Endpoints <emphasis>NOT</emphasis> configured to
|
||||
use a <literal>transport</literal> will default to first transport found
|
||||
in <filename>res_sip.conf</filename> that matches its type.
|
||||
in <filename>pjsip.conf</filename> that matches its type.
|
||||
</para>
|
||||
<para>Example: An Endpoint has been configured with no transport.
|
||||
When it comes time to call an AoR, PJSIP will find the
|
||||
|
@ -98,7 +98,7 @@
|
|||
<synopsis>Authentication Object(s) associated with the endpoint</synopsis>
|
||||
<description><para>
|
||||
This is a comma-delimited list of <replaceable>auth</replaceable> sections defined
|
||||
in <filename>res_sip.conf</filename> to be used to verify inbound connection attempts.
|
||||
in <filename>pjsip.conf</filename> to be used to verify inbound connection attempts.
|
||||
</para><para>
|
||||
Endpoints without an <literal>authentication</literal> object
|
||||
configured will allow connections without vertification.
|
||||
|
@ -286,7 +286,7 @@
|
|||
This will set the desired transport configuration to send SIP data through.
|
||||
</para>
|
||||
<warning><para>Not specifying a transport will <emphasis>DEFAULT</emphasis>
|
||||
to the first configured transport in <filename>res_sip.conf</filename> which is
|
||||
to the first configured transport in <filename>pjsip.conf</filename> which is
|
||||
valid for the URI we are trying to contact.
|
||||
</para></warning>
|
||||
</description>
|
||||
|
@ -297,12 +297,12 @@
|
|||
identification from the endpoint from headers such as P-Asserted-Identity
|
||||
or Remote-Party-ID header. This option applies both to calls originating from the
|
||||
endpoint and calls originating from Asterisk. If <literal>no</literal>, the
|
||||
configured Caller-ID from res_sip.conf will always be used as the identity for
|
||||
configured Caller-ID from pjsip.conf will always be used as the identity for
|
||||
the endpoint.</para></description>
|
||||
</configOption>
|
||||
<configOption name="trust_id_outbound" default="no">
|
||||
<synopsis>Send private identification details to the endpoint.</synopsis>
|
||||
<description><para>This option determines whether res_sip will send private
|
||||
<description><para>This option determines whether res_pjsip will send private
|
||||
identification information to the endpoint. If <literal>no</literal>,
|
||||
private Caller-ID information will not be forwarded to the endpoint.
|
||||
"Private" in this case refers to any method of restricting identification.
|
||||
|
@ -320,46 +320,46 @@
|
|||
<synopsis>Use Endpoint's requested packetisation interval</synopsis>
|
||||
</configOption>
|
||||
<configOption name="use_avpf" default="no">
|
||||
<synopsis>Determines whether res_sip will use and enforce usage of AVPF for this
|
||||
<synopsis>Determines whether res_pjsip will use and enforce usage of AVPF for this
|
||||
endpoint.</synopsis>
|
||||
<description><para>
|
||||
If set to <literal>yes</literal>, res_sip will use use the AVPF or SAVPF RTP
|
||||
If set to <literal>yes</literal>, res_pjsip will use use the AVPF or SAVPF RTP
|
||||
profile for all media offers on outbound calls and media updates and will
|
||||
decline media offers not using the AVPF or SAVPF profile.
|
||||
</para><para>
|
||||
If set to <literal>no</literal>, res_sip will use use the AVP or SAVP RTP
|
||||
If set to <literal>no</literal>, res_pjsip will use use the AVP or SAVP RTP
|
||||
profile for all media offers on outbound calls and media updates and will
|
||||
decline media offers not using the AVP or SAVP profile.
|
||||
</para></description>
|
||||
</configOption>
|
||||
<configOption name="media_encryption" default="no">
|
||||
<synopsis>Determines whether res_sip will use and enforce usage of media encryption
|
||||
<synopsis>Determines whether res_pjsip will use and enforce usage of media encryption
|
||||
for this endpoint.</synopsis>
|
||||
<description>
|
||||
<enumlist>
|
||||
<enum name="no"><para>
|
||||
res_sip will offer no encryption and allow no encryption to be setup.
|
||||
res_pjsip will offer no encryption and allow no encryption to be setup.
|
||||
</para></enum>
|
||||
<enum name="sdes"><para>
|
||||
res_sip will offer standard SRTP setup via in-SDP keys. Encrypted SIP
|
||||
res_pjsip will offer standard SRTP setup via in-SDP keys. Encrypted SIP
|
||||
transport should be used in conjunction with this option to prevent
|
||||
exposure of media encryption keys.
|
||||
</para></enum>
|
||||
<enum name="dtls"><para>
|
||||
res_sip will offer DTLS-SRTP setup.
|
||||
res_pjsip will offer DTLS-SRTP setup.
|
||||
</para></enum>
|
||||
</enumlist>
|
||||
</description>
|
||||
</configOption>
|
||||
<configOption name="inband_progress" default="no">
|
||||
<synopsis>Determines whether chan_gulp will indicate ringing using inband
|
||||
<synopsis>Determines whether chan_pjsip will indicate ringing using inband
|
||||
progress.</synopsis>
|
||||
<description><para>
|
||||
If set to <literal>yes</literal>, chan_gulp will send a 183 Session Progress
|
||||
If set to <literal>yes</literal>, chan_pjsip will send a 183 Session Progress
|
||||
when told to indicate ringing and will immediately start sending ringing
|
||||
as audio.
|
||||
</para><para>
|
||||
If set to <literal>no</literal>, chan_gulp will send a 180 Ringing when told
|
||||
If set to <literal>no</literal>, chan_pjsip will send a 180 Ringing when told
|
||||
to indicate ringing and will NOT send it as audio.
|
||||
</para></description>
|
||||
</configOption>
|
||||
|
@ -395,7 +395,7 @@
|
|||
<synopsis>The number of in-use channels which will cause busy to be returned as device state</synopsis>
|
||||
<description><para>
|
||||
When the number of in-use channels for the endpoint matches the devicestate_busy_at setting the
|
||||
Gulp channel driver will return busy as the device state instead of in use.
|
||||
PJSIP channel driver will return busy as the device state instead of in use.
|
||||
</para></description>
|
||||
</configOption>
|
||||
<configOption name="t38udptl" default="no">
|
||||
|
@ -601,13 +601,13 @@
|
|||
</para>
|
||||
<enumlist>
|
||||
<enum name="active"><para>
|
||||
res_sip will make a connection to the peer.
|
||||
res_pjsip will make a connection to the peer.
|
||||
</para></enum>
|
||||
<enum name="passive"><para>
|
||||
res_sip will accept connections from the peer.
|
||||
res_pjsip will accept connections from the peer.
|
||||
</para></enum>
|
||||
<enum name="actpass"><para>
|
||||
res_sip will offer and accept connections from the peer.
|
||||
res_pjsip will offer and accept connections from the peer.
|
||||
</para></enum>
|
||||
</enumlist>
|
||||
</description>
|
||||
|
@ -689,7 +689,7 @@
|
|||
<emphasis>Transports</emphasis>
|
||||
</para>
|
||||
<para>There are different transports and protocol derivatives
|
||||
supported by <literal>res_sip</literal>. They are in order of
|
||||
supported by <literal>res_pjsip</literal>. They are in order of
|
||||
preference: UDP, TCP, and WebSocket (WS).</para>
|
||||
<warning><para>
|
||||
Multiple endpoints using the same connection is <emphasis>NOT</emphasis>
|
||||
|
@ -826,7 +826,7 @@
|
|||
<configObject name="aor">
|
||||
<synopsis>The configuration for a location of an endpoint</synopsis>
|
||||
<description><para>
|
||||
An AoR is what allows Asterisk to contact an endpoint via res_sip. If no
|
||||
An AoR is what allows Asterisk to contact an endpoint via res_pjsip. If no
|
||||
AoRs are specified, an endpoint will not be reachable by Asterisk.
|
||||
Beyond that, an AoR has other uses within Asterisk.
|
||||
</para><para>
|
||||
|
@ -913,7 +913,7 @@
|
|||
The settings in this section are global. In addition to being global, the values will
|
||||
not be re-evaluated when a reload is performed. This is because the values must be set
|
||||
before the SIP stack is initialized. The only way to reset these values is to either
|
||||
restart Asterisk, or unload res_sip.so and then load it again.
|
||||
restart Asterisk, or unload res_pjsip.so and then load it again.
|
||||
</para></description>
|
||||
<configOption name="timert1" default="500">
|
||||
<synopsis>Set transaction timer T1 value (milliseconds).</synopsis>
|
||||
|
@ -1811,7 +1811,7 @@ static int load_module(void)
|
|||
|
||||
ast_sip_initialize_global_headers();
|
||||
|
||||
if (ast_res_sip_initialize_configuration()) {
|
||||
if (ast_res_pjsip_initialize_configuration()) {
|
||||
ast_log(LOG_ERROR, "Failed to initialize SIP configuration. Aborting load\n");
|
||||
goto error;
|
||||
}
|
||||
|
@ -1826,15 +1826,15 @@ static int load_module(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
ast_res_sip_init_options_handling(0);
|
||||
ast_res_pjsip_init_options_handling(0);
|
||||
|
||||
ast_res_sip_init_contact_transports();
|
||||
ast_res_pjsip_init_contact_transports();
|
||||
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
|
||||
error:
|
||||
ast_sip_destroy_distributor();
|
||||
ast_res_sip_destroy_configuration();
|
||||
ast_res_pjsip_destroy_configuration();
|
||||
ast_sip_destroy_global_headers();
|
||||
if (monitor_thread) {
|
||||
stop_monitor_thread();
|
||||
|
@ -1853,10 +1853,10 @@ error:
|
|||
|
||||
static int reload_module(void)
|
||||
{
|
||||
if (ast_res_sip_reload_configuration()) {
|
||||
if (ast_res_pjsip_reload_configuration()) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
ast_res_sip_init_options_handling(1);
|
||||
ast_res_pjsip_init_options_handling(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1877,7 +1877,7 @@ static int unload_pjsip(void *data)
|
|||
static int unload_module(void)
|
||||
{
|
||||
ast_sip_destroy_distributor();
|
||||
ast_res_sip_destroy_configuration();
|
||||
ast_res_pjsip_destroy_configuration();
|
||||
ast_sip_destroy_global_headers();
|
||||
if (monitor_thread) {
|
||||
stop_monitor_thread();
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
#include <pjlib.h>
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
|
||||
|
@ -102,7 +102,7 @@ static int auth_apply(const struct ast_sorcery *sorcery, void *obj)
|
|||
/*! \brief Initialize sorcery with auth support */
|
||||
int ast_sip_initialize_sorcery_auth(struct ast_sorcery *sorcery)
|
||||
{
|
||||
ast_sorcery_apply_default(sorcery, SIP_SORCERY_AUTH_TYPE, "config", "res_sip.conf,criteria=type=auth");
|
||||
ast_sorcery_apply_default(sorcery, SIP_SORCERY_AUTH_TYPE, "config", "pjsip.conf,criteria=type=auth");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, SIP_SORCERY_AUTH_TYPE, auth_alloc, NULL, auth_apply)) {
|
||||
return -1;
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include "pjsip.h"
|
||||
#include "pjlib.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
|
||||
|
@ -50,7 +50,7 @@ static void *domain_alias_alloc(const char *name)
|
|||
/*! \brief Initialize sorcery with domain alias support */
|
||||
int ast_sip_initialize_sorcery_domain_alias(struct ast_sorcery *sorcery)
|
||||
{
|
||||
ast_sorcery_apply_default(sorcery, SIP_SORCERY_DOMAIN_ALIAS_TYPE, "config", "res_sip.conf,criteria=type=domain_alias");
|
||||
ast_sorcery_apply_default(sorcery, SIP_SORCERY_DOMAIN_ALIAS_TYPE, "config", "pjsip.conf,criteria=type=domain_alias");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, SIP_SORCERY_DOMAIN_ALIAS_TYPE, domain_alias_alloc, NULL, NULL)) {
|
||||
return -1;
|
|
@ -21,7 +21,7 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
#include "asterisk/ast_version.h"
|
||||
|
||||
|
@ -74,7 +74,7 @@ int ast_sip_initialize_sorcery_global(struct ast_sorcery *sorcery)
|
|||
{
|
||||
snprintf(default_useragent, sizeof(default_useragent), "%s %s", DEFAULT_USERAGENT_PREFIX, ast_get_version());
|
||||
|
||||
ast_sorcery_apply_default(sorcery, "global", "config", "res_sip.conf,criteria=type=global");
|
||||
ast_sorcery_apply_default(sorcery, "global", "config", "pjsip.conf,criteria=type=global");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, "global", global_alloc, NULL, global_apply)) {
|
||||
return -1;
|
|
@ -19,14 +19,14 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
#include "asterisk.h"
|
||||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
#include "asterisk/acl.h"
|
||||
|
@ -67,7 +67,7 @@ static void *security_alloc(const char *name)
|
|||
int ast_sip_initialize_sorcery_security(struct ast_sorcery *sorcery)
|
||||
{
|
||||
ast_sorcery_apply_default(sorcery, SIP_SORCERY_SECURITY_TYPE,
|
||||
"config", "res_sip.conf,criteria=type=security");
|
||||
"config", "pjsip.conf,criteria=type=security");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, SIP_SORCERY_SECURITY_TYPE,
|
||||
security_alloc, NULL, NULL)) {
|
|
@ -21,9 +21,9 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
#include "include/res_sip_private.h"
|
||||
#include "include/res_pjsip_private.h"
|
||||
|
||||
#define TIMER_T1_MIN 100
|
||||
#define DEFAULT_TIMER_T1 500
|
||||
|
@ -88,9 +88,9 @@ int ast_sip_initialize_system(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
ast_sorcery_apply_config(system_sorcery, "res_sip");
|
||||
ast_sorcery_apply_config(system_sorcery, "res_pjsip");
|
||||
|
||||
ast_sorcery_apply_default(system_sorcery, "system", "config", "res_sip.conf,criteria=type=system");
|
||||
ast_sorcery_apply_default(system_sorcery, "system", "config", "pjsip.conf,criteria=type=system");
|
||||
|
||||
if (ast_sorcery_object_register(system_sorcery, "system", system_alloc, NULL, system_apply)) {
|
||||
ast_sorcery_unref(system_sorcery);
|
|
@ -21,7 +21,7 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
|
@ -307,7 +307,7 @@ static int transport_localnet_handler(const struct aco_option *opt, struct ast_v
|
|||
/*! \brief Initialize sorcery with transport support */
|
||||
int ast_sip_initialize_sorcery_transport(struct ast_sorcery *sorcery)
|
||||
{
|
||||
ast_sorcery_apply_default(sorcery, "transport", "config", "res_sip.conf,criteria=type=transport");
|
||||
ast_sorcery_apply_default(sorcery, "transport", "config", "pjsip.conf,criteria=type=transport");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, "transport", transport_alloc, NULL, transport_apply)) {
|
||||
return -1;
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* res_sip.h
|
||||
* res_pjsip.h
|
||||
*
|
||||
* Created on: Jan 25, 2013
|
||||
* Author: mjordan
|
||||
|
@ -11,19 +11,19 @@
|
|||
struct ao2_container;
|
||||
|
||||
/*!
|
||||
* \brief Initialize the configuration for res_sip
|
||||
* \brief Initialize the configuration for res_pjsip
|
||||
*/
|
||||
int ast_res_sip_initialize_configuration(void);
|
||||
int ast_res_pjsip_initialize_configuration(void);
|
||||
|
||||
/*!
|
||||
* \brief Annihilate the configuration objects
|
||||
*/
|
||||
void ast_res_sip_destroy_configuration(void);
|
||||
void ast_res_pjsip_destroy_configuration(void);
|
||||
|
||||
/*!
|
||||
* \brief Reload the configuration
|
||||
*/
|
||||
int ast_res_sip_reload_configuration(void);
|
||||
int ast_res_pjsip_reload_configuration(void);
|
||||
|
||||
/*!
|
||||
* \brief Initialize OPTIONS request handling.
|
||||
|
@ -37,7 +37,7 @@ int ast_res_sip_reload_configuration(void);
|
|||
* \retval 0 on success
|
||||
* \retval other on failure
|
||||
*/
|
||||
int ast_res_sip_init_options_handling(int reload);
|
||||
int ast_res_pjsip_init_options_handling(int reload);
|
||||
|
||||
/*!
|
||||
* \brief Initialize transport storage for contacts.
|
||||
|
@ -45,7 +45,7 @@ int ast_res_sip_init_options_handling(int reload);
|
|||
* \retval 0 on success
|
||||
* \retval other on failure
|
||||
*/
|
||||
int ast_res_sip_init_contact_transports(void);
|
||||
int ast_res_pjsip_init_contact_transports(void);
|
||||
|
||||
/*!
|
||||
* \brief Initialize outbound authentication support
|
|
@ -20,11 +20,11 @@
|
|||
#include "pjsip.h"
|
||||
#include "pjlib.h"
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
#include "include/res_sip_private.h"
|
||||
#include "include/res_pjsip_private.h"
|
||||
|
||||
#define CONTACT_TRANSPORTS_BUCKETS 7
|
||||
static struct ao2_container *contact_transports;
|
||||
|
@ -286,7 +286,7 @@ static int permanent_uri_handler(const struct aco_option *opt, struct ast_variab
|
|||
int ast_sip_initialize_sorcery_location(struct ast_sorcery *sorcery)
|
||||
{
|
||||
ast_sorcery_apply_default(sorcery, "contact", "astdb", "registrar");
|
||||
ast_sorcery_apply_default(sorcery, "aor", "config", "res_sip.conf,criteria=type=aor");
|
||||
ast_sorcery_apply_default(sorcery, "aor", "config", "pjsip.conf,criteria=type=aor");
|
||||
|
||||
if (ast_sorcery_object_register(sorcery, "contact", contact_alloc, NULL, NULL) ||
|
||||
ast_sorcery_object_register(sorcery, "aor", aor_alloc, NULL, NULL)) {
|
||||
|
@ -313,7 +313,7 @@ int ast_sip_initialize_sorcery_location(struct ast_sorcery *sorcery)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ast_res_sip_init_contact_transports(void)
|
||||
int ast_res_pjsip_init_contact_transports(void)
|
||||
{
|
||||
if (contact_transports) {
|
||||
ao2_t_ref(contact_transports, -1, "Remove old contact transports");
|
|
@ -10,8 +10,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "include/res_sip_private.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "include/res_pjsip_private.h"
|
||||
#include "asterisk/cli.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
@ -76,7 +76,7 @@ static int persistent_endpoint_update_state(void *obj, void *arg, int flags)
|
|||
|
||||
ast_endpoint_blob_publish(persistent->endpoint, ast_endpoint_state_type(), blob);
|
||||
|
||||
ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "Gulp/%s", ast_endpoint_get_resource(persistent->endpoint));
|
||||
ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, "PJSIP/%s", ast_endpoint_get_resource(persistent->endpoint));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -105,10 +105,10 @@ static char *handle_cli_show_endpoints(struct ast_cli_entry *e, int cmd, struct
|
|||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "sip show endpoints";
|
||||
e->command = "pjsip show endpoints";
|
||||
e->usage =
|
||||
"Usage: sip show endpoints\n"
|
||||
" Show the registered SIP endpoints\n";
|
||||
"Usage: pjsip show endpoints\n"
|
||||
" Show the registered PJSIP endpoints\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
return NULL;
|
||||
|
@ -191,10 +191,10 @@ static char *cli_show_endpoint(struct ast_cli_entry *e, int cmd, struct ast_cli_
|
|||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "sip show endpoint";
|
||||
e->command = "pjsip show endpoint";
|
||||
e->usage =
|
||||
"Usage: sip show endpoint <endpoint>\n"
|
||||
" Show the given SIP endpoint.\n";
|
||||
"Usage: pjsip show endpoint <endpoint>\n"
|
||||
" Show the given PJSIP endpoint.\n";
|
||||
return NULL;
|
||||
case CLI_GENERATE:
|
||||
return NULL;
|
||||
|
@ -219,8 +219,8 @@ static char *cli_show_endpoint(struct ast_cli_entry *e, int cmd, struct ast_cli_
|
|||
}
|
||||
|
||||
static struct ast_cli_entry cli_commands[] = {
|
||||
AST_CLI_DEFINE(handle_cli_show_endpoints, "Show SIP Endpoints"),
|
||||
AST_CLI_DEFINE(cli_show_endpoint, "Show SIP Endpoint")
|
||||
AST_CLI_DEFINE(handle_cli_show_endpoints, "Show PJSIP Endpoints"),
|
||||
AST_CLI_DEFINE(cli_show_endpoint, "Show PJSIP Endpoint")
|
||||
};
|
||||
|
||||
static int dtmf_handler(const struct aco_option *opt, struct ast_variable *var, void *obj)
|
||||
|
@ -562,7 +562,7 @@ static struct ast_endpoint *persistent_endpoint_find_or_create(const struct ast_
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!(persistent->endpoint = ast_endpoint_create("Gulp", ast_sorcery_object_get_id(endpoint)))) {
|
||||
if (!(persistent->endpoint = ast_endpoint_create("PJSIP", ast_sorcery_object_get_id(endpoint)))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -593,7 +593,7 @@ static int sip_endpoint_apply_handler(const struct ast_sorcery *sorcery, void *o
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ast_res_sip_initialize_configuration(void)
|
||||
int ast_res_pjsip_initialize_configuration(void)
|
||||
{
|
||||
if (ast_cli_register_multiple(cli_commands, ARRAY_LEN(cli_commands))) {
|
||||
return -1;
|
||||
|
@ -608,7 +608,7 @@ int ast_res_sip_initialize_configuration(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
ast_sorcery_apply_config(sip_sorcery, "res_sip");
|
||||
ast_sorcery_apply_config(sip_sorcery, "res_pjsip");
|
||||
|
||||
if (ast_sip_initialize_sorcery_auth(sip_sorcery)) {
|
||||
ast_log(LOG_ERROR, "Failed to register SIP authentication support\n");
|
||||
|
@ -617,7 +617,7 @@ int ast_res_sip_initialize_configuration(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
ast_sorcery_apply_default(sip_sorcery, "endpoint", "config", "res_sip.conf,criteria=type=endpoint");
|
||||
ast_sorcery_apply_default(sip_sorcery, "endpoint", "config", "pjsip.conf,criteria=type=endpoint");
|
||||
|
||||
ast_sorcery_apply_default(sip_sorcery, "nat_hook", "memory", NULL);
|
||||
|
||||
|
@ -759,13 +759,13 @@ int ast_res_sip_initialize_configuration(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ast_res_sip_destroy_configuration(void)
|
||||
void ast_res_pjsip_destroy_configuration(void)
|
||||
{
|
||||
ast_cli_unregister_multiple(cli_commands, ARRAY_LEN(cli_commands));
|
||||
ast_sorcery_unref(sip_sorcery);
|
||||
}
|
||||
|
||||
int ast_res_sip_reload_configuration(void)
|
||||
int ast_res_pjsip_reload_configuration(void)
|
||||
{
|
||||
if (sip_sorcery) {
|
||||
ast_sorcery_reload(sip_sorcery);
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
|
||||
static int distribute(void *data);
|
||||
static pj_bool_t distributor(pjsip_rx_data *rdata);
|
|
@ -21,7 +21,7 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
|
||||
static pj_status_t add_request_headers(pjsip_tx_data *tdata);
|
|
@ -22,13 +22,13 @@
|
|||
#include <pjsip_ua.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/cli.h"
|
||||
#include "asterisk/time.h"
|
||||
#include "include/res_sip_private.h"
|
||||
#include "include/res_pjsip_private.h"
|
||||
|
||||
#define DEFAULT_LANGUAGE "en"
|
||||
#define DEFAULT_ENCODING "text/plain"
|
||||
|
@ -741,7 +741,7 @@ static void qualify_and_schedule_permanent(void)
|
|||
qualify_and_schedule_permanent_cb, NULL);
|
||||
}
|
||||
|
||||
int ast_res_sip_init_options_handling(int reload)
|
||||
int ast_res_pjsip_init_options_handling(int reload)
|
||||
{
|
||||
const pj_str_t STR_OPTIONS = { "OPTIONS", 7 };
|
||||
|
|
@ -21,9 +21,9 @@
|
|||
#define bzero bzero
|
||||
#include "pjsip.h"
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "include/res_sip_private.h"
|
||||
#include "include/res_pjsip_private.h"
|
||||
|
||||
static pj_bool_t outbound_auth(pjsip_rx_data *rdata);
|
||||
|
|
@ -30,7 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/security_events.h"
|
||||
|
||||
static int find_transport_in_use(void *obj, void *arg, int flags)
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,21 +26,21 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
#include "asterisk/acl.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<configInfo name="res_sip_acl" language="en_US">
|
||||
<configInfo name="res_pjsip_acl" language="en_US">
|
||||
<synopsis>SIP ACL module</synopsis>
|
||||
<description><para>
|
||||
<emphasis>ACL</emphasis>
|
||||
</para>
|
||||
<para>The ACL module used by <literal>res_sip</literal>. This module is
|
||||
<para>The ACL module used by <literal>res_pjsip</literal>. This module is
|
||||
independent of <literal>endpoints</literal> and operates on all inbound
|
||||
SIP communication using res_sip.
|
||||
SIP communication using res_pjsip.
|
||||
</para><para>
|
||||
It should be noted that this module can also reference ACLs from
|
||||
<filename>acl.conf</filename>.
|
||||
|
@ -49,7 +49,7 @@
|
|||
and <literal>Contact Header</literal>. It is possible to create a combined ACL using
|
||||
both IP and Contact.
|
||||
</para></description>
|
||||
<configFile name="res_sip.conf">
|
||||
<configFile name="pjsip.conf">
|
||||
<configObject name="acl">
|
||||
<synopsis>Access Control List</synopsis>
|
||||
<configOption name="acl">
|
||||
|
@ -206,7 +206,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP ACL Resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP ACL Resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/strings.h"
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -459,7 +459,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP authentication resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP authentication resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload_module,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/callerid.h"
|
||||
|
@ -710,7 +710,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Caller ID Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Caller ID Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/callerid.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/module.h"
|
||||
|
@ -339,7 +339,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Add Diversion Header Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Add Diversion Header Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
static int dtmf_info_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
||||
|
@ -122,7 +122,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP DTMF INFO Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP DTMF INFO Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
static int get_endpoint_details(pjsip_rx_data *rdata, char *domain, size_t domain_size)
|
||||
|
@ -118,7 +118,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Anonymous endpoint identifier",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Anonymous endpoint identifier",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_DEFAULT,
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
static struct ast_sip_endpoint *constant_identify(pjsip_rx_data *rdata)
|
||||
|
@ -61,7 +61,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Constant Endpoint Identifier",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Constant Endpoint Identifier",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,14 +26,14 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/acl.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<configInfo name="res_sip_endpoint_identifier_ip" language="en_US">
|
||||
<configInfo name="res_pjsip_endpoint_identifier_ip" language="en_US">
|
||||
<synopsis>Module that identifies endpoints via source IP address</synopsis>
|
||||
<configFile name="res_sip.conf">
|
||||
<configFile name="res_pjsip.conf">
|
||||
<configObject name="identify">
|
||||
<configOption name="endpoint">
|
||||
<synopsis>Name of Endpoint</synopsis>
|
||||
|
@ -135,7 +135,7 @@ static int ip_identify_match_handler(const struct aco_option *opt, struct ast_va
|
|||
|
||||
static int load_module(void)
|
||||
{
|
||||
ast_sorcery_apply_default(ast_sip_get_sorcery(), "identify", "config", "res_sip.conf,criteria=type=identify");
|
||||
ast_sorcery_apply_default(ast_sip_get_sorcery(), "identify", "config", "res_pjsip.conf,criteria=type=identify");
|
||||
|
||||
if (ast_sorcery_object_register(ast_sip_get_sorcery(), "identify", ip_identify_alloc, NULL, NULL)) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
|
@ -163,7 +163,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP IP endpoint identifier",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP IP endpoint identifier",
|
||||
.load = load_module,
|
||||
.reload = reload_module,
|
||||
.unload = unload_module,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
static int get_endpoint_details(pjsip_rx_data *rdata, char *endpoint, size_t endpoint_size, char *domain, size_t domain_size)
|
||||
|
@ -122,7 +122,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP username endpoint identifier",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP username endpoint identifier",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_pubsub</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_pubsub</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -29,9 +29,9 @@
|
|||
#include <pjsip_simple.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_pubsub.h"
|
||||
#include "asterisk/res_sip_exten_state.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_pubsub.h"
|
||||
#include "asterisk/res_pjsip_exten_state.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
|
@ -614,7 +614,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "SIP Extension State Notifications",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "PJSIP Extension State Notifications",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/logger.h"
|
||||
|
||||
|
@ -75,7 +75,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Packet Logger",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Packet Logger",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
|||
#include "asterisk/message.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
|
||||
const pjsip_method pjsip_message_method = {PJSIP_OTHER_METHOD, {"MESSAGE", 7} };
|
||||
|
||||
|
@ -653,7 +653,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Messaging Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Messaging Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
|||
#include <pjsip_simple.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_pubsub.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_pubsub.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
|
@ -39,8 +39,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_pubsub</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_pubsub</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -715,7 +715,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP MWI resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP MWI resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/acl.h"
|
||||
|
||||
|
@ -230,7 +230,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP NAT Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP NAT Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include "asterisk/manager.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/sorcery.h"
|
||||
|
||||
#define CONTENT_TYPE_SIZE 64
|
||||
|
@ -584,9 +584,9 @@ static char *cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a
|
|||
|
||||
switch (cmd) {
|
||||
case CLI_INIT:
|
||||
e->command = "gulp notify";
|
||||
e->command = "pjsip notify";
|
||||
e->usage =
|
||||
"Usage: gulp notify <type> <peer> [<peer>...]\n"
|
||||
"Usage: pjsip notify <type> <peer> [<peer>...]\n"
|
||||
" Send a NOTIFY request to an endpoint\n"
|
||||
" Message types are defined in sip_notify.conf\n";
|
||||
return NULL;
|
||||
|
@ -645,7 +645,7 @@ static int manager_notify(struct mansession *s, const struct message *m)
|
|||
struct ast_variable *vars = astman_get_variables(m);
|
||||
|
||||
if (ast_strlen_zero(endpoint_name)) {
|
||||
astman_send_error(s, m, "GulpNotify requires a channel name");
|
||||
astman_send_error(s, m, "PJSIPNotify requires a channel name");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -687,7 +687,7 @@ static int load_module(void)
|
|||
}
|
||||
|
||||
ast_cli_register_multiple(cli_options, ARRAY_LEN(cli_options));
|
||||
ast_manager_register_xml("GulpNotify", EVENT_FLAG_SYSTEM, manager_notify);
|
||||
ast_manager_register_xml("PJSIPNotify", EVENT_FLAG_SYSTEM, manager_notify);
|
||||
|
||||
return AST_MODULE_LOAD_SUCCESS;
|
||||
}
|
||||
|
@ -700,13 +700,13 @@ static int reload_module(void)
|
|||
|
||||
static int unload_module(void)
|
||||
{
|
||||
ast_manager_unregister("GulpNotify");
|
||||
ast_manager_unregister("PJSIPNotify");
|
||||
aco_info_destroy(¬ify_cfg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "CLI/AGI SIP Notify Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "CLI/AMI PJSIP Notify Support",
|
||||
.load = load_module,
|
||||
.reload = reload_module,
|
||||
.unload = unload_module,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
|||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/features.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/features_config.h"
|
||||
|
||||
|
@ -121,7 +121,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP INFO One Touch Recording Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP INFO One Touch Recording Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/strings.h"
|
||||
|
@ -112,7 +112,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP authentication resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP authentication resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -27,24 +27,24 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/taskprocessor.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<configInfo name="res_sip_outbound_registration" language="en_US">
|
||||
<configInfo name="res_pjsip_outbound_registration" language="en_US">
|
||||
<synopsis>SIP resource for outbound registrations</synopsis>
|
||||
<description><para>
|
||||
<emphasis>Outbound Registration</emphasis>
|
||||
</para>
|
||||
<para>This module allows <literal>res_sip</literal> to register to other SIP servers.</para>
|
||||
<para>This module allows <literal>res_pjsip</literal> to register to other SIP servers.</para>
|
||||
</description>
|
||||
<configFile name="res_sip.conf">
|
||||
<configFile name="pjsip.conf">
|
||||
<configObject name="registration">
|
||||
<synopsis>The configuration for outbound registration</synopsis>
|
||||
<description><para>
|
||||
Registration is <emphasis>COMPLETELY</emphasis> separate from the rest of
|
||||
<literal>res_sip.conf</literal>. A minimal configuration consists of
|
||||
<literal>pjsip.conf</literal>. A minimal configuration consists of
|
||||
setting a <literal>server_uri</literal> and a <literal>client_uri</literal>.
|
||||
</para></description>
|
||||
<configOption name="auth_rejection_permanent" default="yes">
|
||||
|
@ -81,7 +81,7 @@
|
|||
<synopsis>Transport used for outbound authentication</synopsis>
|
||||
<description>
|
||||
<note><para>A <replaceable>transport</replaceable> configured in
|
||||
<literal>res_sip.conf</literal>. As with other <literal>res_sip</literal> modules, this will use the first available transport of the appropriate type if unconfigured.</para></note>
|
||||
<literal>pjsip.conf</literal>. As with other <literal>res_pjsip</literal> modules, this will use the first available transport of the appropriate type if unconfigured.</para></note>
|
||||
</description>
|
||||
</configOption>
|
||||
<configOption name="type">
|
||||
|
@ -706,7 +706,7 @@ static int outbound_auth_handler(const struct aco_option *opt, struct ast_variab
|
|||
|
||||
static int load_module(void)
|
||||
{
|
||||
ast_sorcery_apply_default(ast_sip_get_sorcery(), "registration", "config", "res_sip.conf,criteria=type=registration");
|
||||
ast_sorcery_apply_default(ast_sip_get_sorcery(), "registration", "config", "pjsip.conf,criteria=type=registration");
|
||||
|
||||
if (ast_sorcery_object_register(ast_sip_get_sorcery(), "registration", sip_outbound_registration_alloc, NULL, sip_outbound_registration_apply)) {
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
|
@ -741,7 +741,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Outbound Registration Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Outbound Registration Support",
|
||||
.load = load_module,
|
||||
.reload = reload_module,
|
||||
.unload = unload_module,
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_pubsub</depend>
|
||||
<depend>res_sip_exten_state</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_pubsub</depend>
|
||||
<depend>res_pjsip_exten_state</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -31,8 +31,8 @@
|
|||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_exten_state.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_exten_state.h"
|
||||
|
||||
enum state {
|
||||
NOTIFY_OPEN,
|
||||
|
@ -334,7 +334,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Extension State PIDF Provider",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Extension State PIDF Provider",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include <pjsip_simple.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip_pubsub.h"
|
||||
#include "asterisk/res_pjsip_pubsub.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/linkedlists.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
|
@ -39,7 +39,7 @@
|
|||
#include "asterisk/uuid.h"
|
||||
#include "asterisk/taskprocessor.h"
|
||||
#include "asterisk/sched.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
|
||||
static pj_bool_t pubsub_on_rx_request(pjsip_rx_data *rdata);
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "SIP event resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "PJSIP event resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DEPEND,
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_sip_pubsub</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<depend>res_pjsip_pubsub</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/pbx.h"
|
||||
#include "asterisk/taskprocessor.h"
|
||||
|
@ -860,7 +860,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Blind and Attended Transfer Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Blind and Attended Transfer Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
|
||||
/*! \brief Internal function which returns the expiration time for a contact */
|
||||
|
@ -383,7 +383,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Registrar Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Registrar Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <pjsip.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/sched.h"
|
||||
|
||||
|
@ -220,7 +220,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP Contact Auto-Expiration",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Contact Auto-Expiration",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
|||
#include <pjsip.h>
|
||||
#include <pjsip_ua.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/causes.h"
|
||||
|
||||
|
@ -140,7 +140,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP RFC3326 Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP RFC3326 Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -49,8 +49,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include "asterisk/acl.h"
|
||||
#include "asterisk/sdp_srtp.h"
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
|
||||
/*! \brief Scheduler for RTCP purposes */
|
||||
static struct ast_sched_context *sched;
|
||||
|
@ -1208,7 +1208,7 @@ end:
|
|||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP SDP RTP/AVP stream handler",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP SDP RTP/AVP stream handler",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -28,12 +28,12 @@
|
|||
#include <pjsip_ua.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/datastore.h"
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/uuid.h"
|
||||
|
@ -2125,7 +2125,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "SIP Session resource",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "PJSIP Session resource",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_sip_session</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_pjsip_session</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
||||
|
@ -45,8 +45,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||
#include "asterisk/channel.h"
|
||||
#include "asterisk/acl.h"
|
||||
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
|
||||
/*! \brief The number of seconds after receiving a T.38 re-invite before automatically rejecting it */
|
||||
#define T38_AUTOMATIC_REJECTION_SECONDS 5
|
||||
|
@ -846,7 +846,7 @@ end:
|
|||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP T.38 UDPTL Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP T.38 UDPTL Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_CHANNEL_DRIVER,
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/*** MODULEINFO
|
||||
<depend>pjproject</depend>
|
||||
<depend>res_sip</depend>
|
||||
<depend>res_pjsip</depend>
|
||||
<depend>res_http_websocket</depend>
|
||||
<support_level>core</support_level>
|
||||
***/
|
||||
|
@ -34,8 +34,8 @@
|
|||
|
||||
#include "asterisk/module.h"
|
||||
#include "asterisk/http_websocket.h"
|
||||
#include "asterisk/res_sip.h"
|
||||
#include "asterisk/res_sip_session.h"
|
||||
#include "asterisk/res_pjsip.h"
|
||||
#include "asterisk/res_pjsip_session.h"
|
||||
#include "asterisk/taskprocessor.h"
|
||||
|
||||
static int transport_type_ws;
|
||||
|
@ -395,7 +395,7 @@ static int unload_module(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP WebSocket Transport Support",
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP WebSocket Transport Support",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_APP_DEPEND,
|
Loading…
Reference in New Issue