diff options
author | George Joseph <gjoseph@digium.com> | 2017-09-11 04:46:35 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-09-13 09:24:28 -0500 |
commit | 446d48fd497786cdf6deff779131fa5fefd64b94 (patch) | |
tree | 9f221699c93287dfa3d69a63e5bc40af5b3ca6a0 /include | |
parent | ec940f4fec4e216b30be562a31ec3586f7d302c3 (diff) |
res_pjsip: Add handling for incoming unsolicited MWI NOTIFY
A new endpoint parameter "incoming_mwi_mailbox" allows Asterisk to
receive unsolicited MWI NOTIFY requests and make them available to
other modules via the stasis message bus.
res_pjsip_pubsub has a new handler "pubsub_on_rx_mwi_notify_request"
that parses a simple-message-summary body and, if
endpoint->incoming_mwi_account is set, calls ast_publish_mwi_state
with the voice-message counts from the message.
Change-Id: I08bae3d16e77af48fcccc2c936acce8fc0ef0f3c
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/res_pjsip.h | 2 | ||||
-rw-r--r-- | include/asterisk/strings.h | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index ad881382c..b6403d6fa 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -804,6 +804,8 @@ struct ast_sip_endpoint { unsigned int refer_blind_progress; /*! Whether to notifies dialog-info 'early' on INUSE && RINGING state */ unsigned int notify_early_inuse_ringing; + /*! If set, we'll push incoming MWI NOTIFYs to stasis using this mailbox */ + AST_STRING_FIELD_EXTENDED(incoming_mwi_mailbox); }; /*! URI parameter for symmetric transport */ diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index 1200eb983..963519dc7 100644 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -1383,4 +1383,24 @@ char *ast_generate_random_string(char *buf, size_t size); */ int ast_strings_match(const char *left, const char *op, const char *right); +/*! + * \brief Read lines from a string buffer + * \since 13.18.0 + * + * \param buffer [IN/OUT] A pointer to a char * string with either Unix or Windows line endings + * + * \return The "next" line + * + * \warning The original string and *buffer will be modified. + * + * \details + * Both '\n' and '\r\n' are treated as single delimiters but consecutive occurrances of + * the delimiters are NOT considered to be a single delimiter. This preserves blank + * lines in the input. + * + * MacOS line endings ('\r') are not supported at this time. + * + */ +char *ast_read_line_from_buffer(char **buffer); + #endif /* _ASTERISK_STRINGS_H */ |