diff options
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r-- | channels/chan_pjsip.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c index 2e87393a6..02da0db35 100644 --- a/channels/chan_pjsip.c +++ b/channels/chan_pjsip.c @@ -2433,6 +2433,11 @@ static struct ast_custom_function media_offer_function = { .write = pjsip_acf_media_offer_write }; +static struct ast_custom_function session_refresh_function = { + .name = "PJSIP_SEND_SESSION_REFRESH", + .write = pjsip_acf_session_refresh_write, +}; + /*! * \brief Load the module * @@ -2472,6 +2477,11 @@ static int load_module(void) goto end; } + if (ast_custom_function_register(&session_refresh_function)) { + ast_log(LOG_WARNING, "Unable to register PJSIP_SEND_SESSION_REFRESH dialplan function\n"); + goto end; + } + if (ast_sip_session_register_supplement(&chan_pjsip_supplement)) { ast_log(LOG_ERROR, "Unable to register PJSIP supplement\n"); goto end; @@ -2528,6 +2538,7 @@ end: pjsip_uids_onhold = NULL; ast_custom_function_unregister(&media_offer_function); ast_custom_function_unregister(&chan_pjsip_dial_contacts_function); + ast_custom_function_unregister(&session_refresh_function); ast_channel_unregister(&chan_pjsip_tech); ast_rtp_glue_unregister(&chan_pjsip_rtp_glue); @@ -2549,6 +2560,7 @@ static int unload_module(void) ast_custom_function_unregister(&media_offer_function); ast_custom_function_unregister(&chan_pjsip_dial_contacts_function); + ast_custom_function_unregister(&session_refresh_function); ast_channel_unregister(&chan_pjsip_tech); ao2_ref(chan_pjsip_tech.capabilities, -1); |