res_pjsip_messaging: send message to a default outbound endpoint

In some cases messages need to be sent to a direct URI (sip:<ip address>). This
patch adds in that support by using a default outbound endpoint.  When sending
messages, if no endpoint can be found then the default one is used.

To facilitate this a new default_outbound_endpoint option was added to the
globals section for pjsip.conf.

Review: https://reviewboard.asterisk.org/r/2944/
........

Merged revisions 403680 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin Harwell
2013-12-11 20:24:50 +00:00
parent 90108b15a0
commit c602b086ed
7 changed files with 131 additions and 40 deletions

View File

@@ -105,4 +105,15 @@ int ast_sip_for_each_channel_snapshot(const struct ast_endpoint_snapshot *endpoi
on_channel_snapshot_t on_channel_snapshot,
void *arg);
/*!
* \brief Retrieve the name of the default outbound endpoint.
*
* \note This returns a memory allocated copy of the name that
* needs to be freed by the caller.
*
* \retval The name of the default outbound endpoint.
* \retval NULL if configuration not found.
*/
char *ast_sip_global_default_outbound_endpoint(void);
#endif /* RES_PJSIP_PRIVATE_H_ */