diff --git a/channels/chan_gulp.c b/channels/chan_pjsip.c similarity index 85% rename from channels/chan_gulp.c rename to channels/chan_pjsip.c index 78694e3faa..527ba27932 100644 --- a/channels/chan_gulp.c +++ b/channels/chan_pjsip.c @@ -20,15 +20,15 @@ * * \author Joshua Colp * - * \brief Gulp SIP Channel Driver + * \brief PSJIP SIP Channel Driver * * \ingroup channel_drivers */ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -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 - + Return a dial string for dialing all contacts on an AOR. @@ -81,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Returns a properly formatted dial string for dialing all contacts on an AOR. - + Media and codec offerings to be set on an outbound SIP channel prior to dialing. @@ -96,8 +96,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ***/ -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, diff --git a/configs/res_sip.conf.sample b/configs/pjsip.conf.sample similarity index 100% rename from configs/res_sip.conf.sample rename to configs/pjsip.conf.sample diff --git a/include/asterisk/res_sip.h b/include/asterisk/res_pjsip.h similarity index 100% rename from include/asterisk/res_sip.h rename to include/asterisk/res_pjsip.h diff --git a/include/asterisk/res_sip_exten_state.h b/include/asterisk/res_pjsip_exten_state.h similarity index 100% rename from include/asterisk/res_sip_exten_state.h rename to include/asterisk/res_pjsip_exten_state.h diff --git a/include/asterisk/res_sip_pubsub.h b/include/asterisk/res_pjsip_pubsub.h similarity index 100% rename from include/asterisk/res_sip_pubsub.h rename to include/asterisk/res_pjsip_pubsub.h diff --git a/include/asterisk/res_sip_session.h b/include/asterisk/res_pjsip_session.h similarity index 100% rename from include/asterisk/res_sip_session.h rename to include/asterisk/res_pjsip_session.h diff --git a/res/Makefile b/res/Makefile index 616ad4d7ec..c9c8dd857d 100644 --- a/res/Makefile +++ b/res/Makefile @@ -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)) diff --git a/res/res_sip.c b/res/res_pjsip.c similarity index 97% rename from res/res_sip.c rename to res/res_pjsip.c index 06be279c12..2326c9add7 100644 --- a/res/res_sip.c +++ b/res/res_pjsip.c @@ -23,8 +23,8 @@ #include #include -#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 - + SIP Resource using PJProject - + Endpoint @@ -55,7 +55,7 @@ accomplished via Addresses of Record (AoRs) which have one or more contacts assicated with them. Endpoints NOT configured to use a transport will default to first transport found - in res_sip.conf that matches its type. + in pjsip.conf that matches its type. 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 @@ Authentication Object(s) associated with the endpoint This is a comma-delimited list of auth sections defined - in res_sip.conf to be used to verify inbound connection attempts. + in pjsip.conf to be used to verify inbound connection attempts. Endpoints without an authentication object configured will allow connections without vertification. @@ -286,7 +286,7 @@ This will set the desired transport configuration to send SIP data through. Not specifying a transport will DEFAULT - to the first configured transport in res_sip.conf which is + to the first configured transport in pjsip.conf which is valid for the URI we are trying to contact. @@ -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 no, 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. Send private identification details to the endpoint. - This option determines whether res_sip will send private + This option determines whether res_pjsip will send private identification information to the endpoint. If no, 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 @@ Use Endpoint's requested packetisation interval - Determines whether res_sip will use and enforce usage of AVPF for this + Determines whether res_pjsip will use and enforce usage of AVPF for this endpoint. - If set to yes, res_sip will use use the AVPF or SAVPF RTP + If set to yes, 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. - If set to no, res_sip will use use the AVP or SAVP RTP + If set to no, 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. - Determines whether res_sip will use and enforce usage of media encryption + Determines whether res_pjsip will use and enforce usage of media encryption for this endpoint. - 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. - 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. - res_sip will offer DTLS-SRTP setup. + res_pjsip will offer DTLS-SRTP setup. - Determines whether chan_gulp will indicate ringing using inband + Determines whether chan_pjsip will indicate ringing using inband progress. - If set to yes, chan_gulp will send a 183 Session Progress + If set to yes, chan_pjsip will send a 183 Session Progress when told to indicate ringing and will immediately start sending ringing as audio. - If set to no, chan_gulp will send a 180 Ringing when told + If set to no, chan_pjsip will send a 180 Ringing when told to indicate ringing and will NOT send it as audio. @@ -395,7 +395,7 @@ The number of in-use channels which will cause busy to be returned as device state 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. @@ -601,13 +601,13 @@ - res_sip will make a connection to the peer. + res_pjsip will make a connection to the peer. - res_sip will accept connections from the peer. + res_pjsip will accept connections from the peer. - res_sip will offer and accept connections from the peer. + res_pjsip will offer and accept connections from the peer. @@ -689,7 +689,7 @@ Transports There are different transports and protocol derivatives - supported by res_sip. They are in order of + supported by res_pjsip. They are in order of preference: UDP, TCP, and WebSocket (WS). Multiple endpoints using the same connection is NOT @@ -826,7 +826,7 @@ The configuration for a location of an endpoint - 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. @@ -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. Set transaction timer T1 value (milliseconds). @@ -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(); diff --git a/res/res_sip.exports.in b/res/res_pjsip.exports.in similarity index 100% rename from res/res_sip.exports.in rename to res/res_pjsip.exports.in diff --git a/res/res_sip/config_auth.c b/res/res_pjsip/config_auth.c similarity index 98% rename from res/res_sip/config_auth.c rename to res/res_pjsip/config_auth.c index 836b90805e..e5deb2d896 100644 --- a/res/res_sip/config_auth.c +++ b/res/res_pjsip/config_auth.c @@ -20,7 +20,7 @@ #include #include -#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; diff --git a/res/res_sip/config_domain_aliases.c b/res/res_pjsip/config_domain_aliases.c similarity index 95% rename from res/res_sip/config_domain_aliases.c rename to res/res_pjsip/config_domain_aliases.c index 90cd82f942..6ca3736a09 100644 --- a/res/res_sip/config_domain_aliases.c +++ b/res/res_pjsip/config_domain_aliases.c @@ -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; diff --git a/res/res_sip/config_global.c b/res/res_pjsip/config_global.c similarity index 95% rename from res/res_sip/config_global.c rename to res/res_pjsip/config_global.c index 4c1d71a37d..2b2c021ee2 100644 --- a/res/res_sip/config_global.c +++ b/res/res_pjsip/config_global.c @@ -21,7 +21,7 @@ #include #include -#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; diff --git a/res/res_sip/config_security.c b/res/res_pjsip/config_security.c similarity index 96% rename from res/res_sip/config_security.c rename to res/res_pjsip/config_security.c index b813bdbb2b..3caff2b56a 100644 --- a/res/res_sip/config_security.c +++ b/res/res_pjsip/config_security.c @@ -19,14 +19,14 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ #include "asterisk.h" #include -#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)) { diff --git a/res/res_sip/config_system.c b/res/res_pjsip/config_system.c similarity index 94% rename from res/res_sip/config_system.c rename to res/res_pjsip/config_system.c index 7c5218e104..b1f13898bf 100644 --- a/res/res_sip/config_system.c +++ b/res/res_pjsip/config_system.c @@ -21,9 +21,9 @@ #include #include -#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); diff --git a/res/res_sip/config_transport.c b/res/res_pjsip/config_transport.c similarity index 99% rename from res/res_sip/config_transport.c rename to res/res_pjsip/config_transport.c index e5a23a107d..82a995cb6a 100644 --- a/res/res_sip/config_transport.c +++ b/res/res_pjsip/config_transport.c @@ -21,7 +21,7 @@ #include #include -#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; diff --git a/res/res_sip/include/res_sip_private.h b/res/res_pjsip/include/res_pjsip_private.h similarity index 78% rename from res/res_sip/include/res_sip_private.h rename to res/res_pjsip/include/res_pjsip_private.h index 96a954bab2..ee9cc06ef2 100644 --- a/res/res_sip/include/res_sip_private.h +++ b/res/res_pjsip/include/res_pjsip_private.h @@ -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 diff --git a/res/res_sip/location.c b/res/res_pjsip/location.c similarity index 98% rename from res/res_sip/location.c rename to res/res_pjsip/location.c index bc1b5211ed..4ba945fc9c 100644 --- a/res/res_sip/location.c +++ b/res/res_pjsip/location.c @@ -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"); diff --git a/res/res_sip/sip_configuration.c b/res/res_pjsip/pjsip_configuration.c similarity index 97% rename from res/res_sip/sip_configuration.c rename to res/res_pjsip/pjsip_configuration.c index 0fb433b58c..4d703e54bc 100644 --- a/res/res_sip/sip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -10,8 +10,8 @@ #include #include -#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 \n" - " Show the given SIP endpoint.\n"; + "Usage: pjsip show 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); diff --git a/res/res_sip/sip_distributor.c b/res/res_pjsip/pjsip_distributor.c similarity index 99% rename from res/res_sip/sip_distributor.c rename to res/res_pjsip/pjsip_distributor.c index d3615478f3..7597ae79e5 100644 --- a/res/res_sip/sip_distributor.c +++ b/res/res_pjsip/pjsip_distributor.c @@ -20,7 +20,7 @@ #include -#include "asterisk/res_sip.h" +#include "asterisk/res_pjsip.h" static int distribute(void *data); static pj_bool_t distributor(pjsip_rx_data *rdata); diff --git a/res/res_sip/sip_global_headers.c b/res/res_pjsip/pjsip_global_headers.c similarity index 99% rename from res/res_sip/sip_global_headers.c rename to res/res_pjsip/pjsip_global_headers.c index 5a47adb0bb..eff8703149 100644 --- a/res/res_sip/sip_global_headers.c +++ b/res/res_pjsip/pjsip_global_headers.c @@ -21,7 +21,7 @@ #include #include -#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); diff --git a/res/res_sip/sip_options.c b/res/res_pjsip/pjsip_options.c similarity index 99% rename from res/res_sip/sip_options.c rename to res/res_pjsip/pjsip_options.c index a580684af3..cc12af420f 100644 --- a/res/res_sip/sip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -22,13 +22,13 @@ #include #include -#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 }; diff --git a/res/res_sip/sip_outbound_auth.c b/res/res_pjsip/pjsip_outbound_auth.c similarity index 97% rename from res/res_sip/sip_outbound_auth.c rename to res/res_pjsip/pjsip_outbound_auth.c index d31a526287..5996d919bc 100644 --- a/res/res_sip/sip_outbound_auth.c +++ b/res/res_pjsip/pjsip_outbound_auth.c @@ -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); diff --git a/res/res_sip/security_events.c b/res/res_pjsip/security_events.c similarity index 99% rename from res/res_sip/security_events.c rename to res/res_pjsip/security_events.c index 068e8551ff..7b4913753b 100644 --- a/res/res_sip/security_events.c +++ b/res/res_pjsip/security_events.c @@ -30,7 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include -#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) diff --git a/res/res_sip_acl.c b/res/res_pjsip_acl.c similarity index 94% rename from res/res_sip_acl.c rename to res/res_pjsip_acl.c index 7c9e43af1a..7cb498a964 100644 --- a/res/res_sip_acl.c +++ b/res/res_pjsip_acl.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,21 +26,21 @@ #include -#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 - + SIP ACL module ACL - The ACL module used by res_sip. This module is + The ACL module used by res_pjsip. This module is independent of endpoints and operates on all inbound - SIP communication using res_sip. + SIP communication using res_pjsip. It should be noted that this module can also reference ACLs from acl.conf. @@ -49,7 +49,7 @@ and Contact Header. It is possible to create a combined ACL using both IP and Contact. - + Access Control List @@ -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, diff --git a/res/res_sip_authenticator_digest.c b/res/res_pjsip_authenticator_digest.c similarity index 98% rename from res/res_sip_authenticator_digest.c rename to res/res_pjsip_authenticator_digest.c index 8b6399b58f..b2c6cccb4e 100644 --- a/res/res_sip_authenticator_digest.c +++ b/res/res_pjsip_authenticator_digest.c @@ -20,14 +20,14 @@ #include -#include "asterisk/res_sip.h" +#include "asterisk/res_pjsip.h" #include "asterisk/logger.h" #include "asterisk/module.h" #include "asterisk/strings.h" /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -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, diff --git a/res/res_sip_caller_id.c b/res/res_pjsip_caller_id.c similarity index 99% rename from res/res_sip_caller_id.c rename to res/res_pjsip_caller_id.c index 3ccf84057b..440cea7096 100644 --- a/res/res_sip_caller_id.c +++ b/res/res_pjsip_caller_id.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -28,8 +28,8 @@ #include #include -#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, diff --git a/res/res_sip_diversion.c b/res/res_pjsip_diversion.c similarity index 97% rename from res/res_sip_diversion.c rename to res/res_pjsip_diversion.c index 7936ed55c0..358ef2644d 100644 --- a/res/res_sip_diversion.c +++ b/res/res_pjsip_diversion.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -28,8 +28,8 @@ #include #include -#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, diff --git a/res/res_sip_dtmf_info.c b/res/res_pjsip_dtmf_info.c similarity index 92% rename from res/res_sip_dtmf_info.c rename to res/res_pjsip_dtmf_info.c index 1954c695ea..6c69b53181 100644 --- a/res/res_sip_dtmf_info.c +++ b/res/res_pjsip_dtmf_info.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -28,8 +28,8 @@ #include #include -#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, diff --git a/res/res_sip_endpoint_identifier_anonymous.c b/res/res_pjsip_endpoint_identifier_anonymous.c similarity index 96% rename from res/res_sip_endpoint_identifier_anonymous.c rename to res/res_pjsip_endpoint_identifier_anonymous.c index 6f947e1a14..902dc0276a 100644 --- a/res/res_sip_endpoint_identifier_anonymous.c +++ b/res/res_pjsip_endpoint_identifier_anonymous.c @@ -19,7 +19,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -27,7 +27,7 @@ #include -#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, diff --git a/res/res_sip_endpoint_identifier_constant.c b/res/res_pjsip_endpoint_identifier_constant.c similarity index 91% rename from res/res_sip_endpoint_identifier_constant.c rename to res/res_pjsip_endpoint_identifier_constant.c index 212cca263a..2430dc9e4a 100644 --- a/res/res_sip_endpoint_identifier_constant.c +++ b/res/res_pjsip_endpoint_identifier_constant.c @@ -20,7 +20,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip no core ***/ @@ -29,7 +29,7 @@ #include -#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, diff --git a/res/res_sip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c similarity index 94% rename from res/res_sip_endpoint_identifier_ip.c rename to res/res_pjsip_endpoint_identifier_ip.c index 9e39b277ad..30f1ccb9c8 100644 --- a/res/res_sip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,14 +26,14 @@ #include -#include "asterisk/res_sip.h" +#include "asterisk/res_pjsip.h" #include "asterisk/module.h" #include "asterisk/acl.h" /*** DOCUMENTATION - + Module that identifies endpoints via source IP address - + Name of Endpoint @@ -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, diff --git a/res/res_sip_endpoint_identifier_user.c b/res/res_pjsip_endpoint_identifier_user.c similarity index 96% rename from res/res_sip_endpoint_identifier_user.c rename to res/res_pjsip_endpoint_identifier_user.c index 86d3d3b862..29266febf6 100644 --- a/res/res_sip_endpoint_identifier_user.c +++ b/res/res_pjsip_endpoint_identifier_user.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,7 +26,7 @@ #include -#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, diff --git a/res/res_sip_exten_state.c b/res/res_pjsip_exten_state.c similarity index 98% rename from res/res_sip_exten_state.c rename to res/res_pjsip_exten_state.c index e57ac05a03..c921d4437f 100644 --- a/res/res_sip_exten_state.c +++ b/res/res_pjsip_exten_state.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_pubsub + res_pjsip + res_pjsip_pubsub core ***/ @@ -29,9 +29,9 @@ #include #include -#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, diff --git a/res/res_sip_exten_state.exports.in b/res/res_pjsip_exten_state.exports.in similarity index 100% rename from res/res_sip_exten_state.exports.in rename to res/res_pjsip_exten_state.exports.in diff --git a/res/res_sip_logger.c b/res/res_pjsip_logger.c similarity index 93% rename from res/res_sip_logger.c rename to res/res_pjsip_logger.c index 663572e1e4..a013bb5a55 100644 --- a/res/res_sip_logger.c +++ b/res/res_pjsip_logger.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,7 +26,7 @@ #include -#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, diff --git a/res/res_sip_messaging.c b/res/res_pjsip_messaging.c similarity index 98% rename from res/res_sip_messaging.c rename to res/res_pjsip_messaging.c index da5bf0eca2..8f5151292e 100644 --- a/res/res_sip_messaging.c +++ b/res/res_pjsip_messaging.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -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, diff --git a/res/res_sip_mwi.c b/res/res_pjsip_mwi.c similarity index 98% rename from res/res_sip_mwi.c rename to res/res_pjsip_mwi.c index 6b44d52d07..b1f696aae5 100644 --- a/res/res_sip_mwi.c +++ b/res/res_pjsip_mwi.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -28,8 +28,8 @@ #include #include -#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 pjproject - res_sip - res_sip_pubsub + res_pjsip + res_pjsip_pubsub core ***/ @@ -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, diff --git a/res/res_sip_nat.c b/res/res_pjsip_nat.c similarity index 98% rename from res/res_sip_nat.c rename to res/res_pjsip_nat.c index 2776cfeb65..d045051076 100644 --- a/res/res_sip_nat.c +++ b/res/res_pjsip_nat.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -27,7 +27,7 @@ #include #include -#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, diff --git a/res/res_sip_notify.c b/res/res_pjsip_notify.c similarity index 97% rename from res/res_sip_notify.c rename to res/res_pjsip_notify.c index 0a534050e8..8bda962cb2 100644 --- a/res/res_sip_notify.c +++ b/res/res_pjsip_notify.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -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 [...]\n" + "Usage: pjsip notify [...]\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, diff --git a/res/res_sip_one_touch_record_info.c b/res/res_pjsip_one_touch_record_info.c similarity index 93% rename from res/res_sip_one_touch_record_info.c rename to res/res_pjsip_one_touch_record_info.c index d001dd828d..f0ecbbfbf8 100644 --- a/res/res_sip_one_touch_record_info.c +++ b/res/res_pjsip_one_touch_record_info.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -29,8 +29,8 @@ #include #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, diff --git a/res/res_sip_outbound_authenticator_digest.c b/res/res_pjsip_outbound_authenticator_digest.c similarity index 95% rename from res/res_sip_outbound_authenticator_digest.c rename to res/res_pjsip_outbound_authenticator_digest.c index d89bf7d4c4..0a262f354f 100644 --- a/res/res_sip_outbound_authenticator_digest.c +++ b/res/res_pjsip_outbound_authenticator_digest.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,7 +26,7 @@ #include -#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, diff --git a/res/res_sip_outbound_registration.c b/res/res_pjsip_outbound_registration.c similarity index 97% rename from res/res_sip_outbound_registration.c rename to res/res_pjsip_outbound_registration.c index a9351d95ff..6d9368ec16 100644 --- a/res/res_sip_outbound_registration.c +++ b/res/res_pjsip_outbound_registration.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -27,24 +27,24 @@ #include #include -#include "asterisk/res_sip.h" +#include "asterisk/res_pjsip.h" #include "asterisk/module.h" #include "asterisk/taskprocessor.h" /*** DOCUMENTATION - + SIP resource for outbound registrations Outbound Registration - This module allows res_sip to register to other SIP servers. + This module allows res_pjsip to register to other SIP servers. - + The configuration for outbound registration Registration is COMPLETELY separate from the rest of - res_sip.conf. A minimal configuration consists of + pjsip.conf. A minimal configuration consists of setting a server_uri and a client_uri. @@ -81,7 +81,7 @@ Transport used for outbound authentication A transport configured in - res_sip.conf. As with other res_sip modules, this will use the first available transport of the appropriate type if unconfigured. + pjsip.conf. As with other res_pjsip modules, this will use the first available transport of the appropriate type if unconfigured. @@ -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, diff --git a/res/res_sip_pidf.c b/res/res_pjsip_pidf.c similarity index 97% rename from res/res_sip_pidf.c rename to res/res_pjsip_pidf.c index 78633da9a5..1891e54cb0 100644 --- a/res/res_sip_pidf.c +++ b/res/res_pjsip_pidf.c @@ -18,9 +18,9 @@ /*** MODULEINFO pjproject - res_sip - res_sip_pubsub - res_sip_exten_state + res_pjsip + res_pjsip_pubsub + res_pjsip_exten_state core ***/ @@ -31,8 +31,8 @@ #include #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, diff --git a/res/res_sip_pubsub.c b/res/res_pjsip_pubsub.c similarity index 99% rename from res/res_sip_pubsub.c rename to res/res_pjsip_pubsub.c index ad20947a52..1ccfc1972a 100644 --- a/res/res_sip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -21,7 +21,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -31,7 +31,7 @@ #include #include -#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, diff --git a/res/res_sip_pubsub.exports.in b/res/res_pjsip_pubsub.exports.in similarity index 100% rename from res/res_sip_pubsub.exports.in rename to res/res_pjsip_pubsub.exports.in diff --git a/res/res_sip_refer.c b/res/res_pjsip_refer.c similarity index 99% rename from res/res_sip_refer.c rename to res/res_pjsip_refer.c index 098f4bdd0c..d9c2aecebe 100644 --- a/res/res_sip_refer.c +++ b/res/res_pjsip_refer.c @@ -18,9 +18,9 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session - res_sip_pubsub + res_pjsip + res_pjsip_session + res_pjsip_pubsub core ***/ @@ -29,8 +29,8 @@ #include #include -#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, diff --git a/res/res_sip_registrar.c b/res/res_pjsip_registrar.c similarity index 98% rename from res/res_sip_registrar.c rename to res/res_pjsip_registrar.c index 7661f8d937..b30771f0f4 100644 --- a/res/res_sip_registrar.c +++ b/res/res_pjsip_registrar.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -27,7 +27,7 @@ #include #include -#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, diff --git a/res/res_sip_registrar_expire.c b/res/res_pjsip_registrar_expire.c similarity index 97% rename from res/res_sip_registrar_expire.c rename to res/res_pjsip_registrar_expire.c index bbfa7e1181..64f61ce413 100644 --- a/res/res_sip_registrar_expire.c +++ b/res/res_pjsip_registrar_expire.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -26,7 +26,7 @@ #include -#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, diff --git a/res/res_sip_rfc3326.c b/res/res_pjsip_rfc3326.c similarity index 94% rename from res/res_sip_rfc3326.c rename to res/res_pjsip_rfc3326.c index f6bb8533ed..66594fef58 100644 --- a/res/res_sip_rfc3326.c +++ b/res/res_pjsip_rfc3326.c @@ -18,8 +18,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -28,8 +28,8 @@ #include #include -#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, diff --git a/res/res_sip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c similarity index 99% rename from res/res_sip_sdp_rtp.c rename to res/res_pjsip_sdp_rtp.c index 4670fe2bee..c97c0cb40e 100644 --- a/res/res_sip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -26,8 +26,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -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, diff --git a/res/res_sip_session.c b/res/res_pjsip_session.c similarity index 99% rename from res/res_sip_session.c rename to res/res_pjsip_session.c index 7f24dcc1bc..fd136082df 100644 --- a/res/res_sip_session.c +++ b/res/res_pjsip_session.c @@ -18,7 +18,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip core ***/ @@ -28,12 +28,12 @@ #include #include -#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, diff --git a/res/res_sip_session.exports.in b/res/res_pjsip_session.exports.in similarity index 100% rename from res/res_sip_session.exports.in rename to res/res_pjsip_session.exports.in diff --git a/res/res_sip_t38.c b/res/res_pjsip_t38.c similarity index 99% rename from res/res_sip_t38.c rename to res/res_pjsip_t38.c index a710546a49..eb5d8eaec9 100644 --- a/res/res_sip_t38.c +++ b/res/res_pjsip_t38.c @@ -25,8 +25,8 @@ /*** MODULEINFO pjproject - res_sip - res_sip_session + res_pjsip + res_pjsip_session core ***/ @@ -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, diff --git a/res/res_sip_transport_websocket.c b/res/res_pjsip_transport_websocket.c similarity index 98% rename from res/res_sip_transport_websocket.c rename to res/res_pjsip_transport_websocket.c index e83011cfcc..f36ede3a6a 100644 --- a/res/res_sip_transport_websocket.c +++ b/res/res_pjsip_transport_websocket.c @@ -22,7 +22,7 @@ /*** MODULEINFO pjproject - res_sip + res_pjsip res_http_websocket core ***/ @@ -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,