dnl Check for path to Sofia-SIP source/build tree
for dir in $sofia_path ; do
sofia_uadir="$dir/libsofia-sip-ua"
- sofia_srcdir=`(cd $srcdir/$dir && pwd)`
if test -d "$sofia_uadir"; then
found_sofia="yes"
- UNIMRCP_SOFIA_INCLUDES="-I$sofia_srcdir/$sofia_uadir -I$sofia_srcdir/$sofia_uadir/bnf -I$sofia_srcdir/$sofia_uadir/features -I$sofia_srcdir/$sofia_uadir/http -I$sofia_srcdir/$sofia_uadir/ipt -I$sofia_srcdir/$sofia_uadir/iptsec -I$sofia_srcdir/$sofia_uadir/msg -I$sofia_srcdir/$sofia_uadir/nea -I$sofia_srcdir/$sofia_uadir/nta -I$sofia_srcdir/$sofia_uadir/nth -I$sofia_srcdir/$sofia_uadir/nua -I$sofia_srcdir/$sofia_uadir/sdp -I$sofia_srcdir/$sofia_uadir/sip -I$sofia_srcdir/$sofia_uadir/soa -I$sofia_srcdir/$sofia_uadir/sresolv -I$sofia_srcdir/$sofia_uadir/stun -I$sofia_srcdir/$sofia_uadir/su -I$sofia_srcdir/$sofia_uadir/tport -I$sofia_srcdir/$sofia_uadir/url"
- UNIMRCP_SOFIA_LIBS="$sofia_srcdir/$sofia_uadir/libsofia-sip-ua.la"
+ sofia_abs_uadir="`cd $sofia_uadir && pwd`"
+ UNIMRCP_SOFIA_INCLUDES="-I$sofia_abs_uadir -I$sofia_abs_uadir/bnf -I$sofia_abs_uadir/features -I$sofia_abs_uadir/http -I$sofia_abs_uadir/ipt -I$sofia_abs_uadir/iptsec -I$sofia_abs_uadir/msg -I$sofia_abs_uadir/nea -I$sofia_abs_uadir/nta -I$sofia_abs_uadir/nth -I$sofia_abs_uadir/nua -I$sofia_abs_uadir/sdp -I$sofia_abs_uadir/sip -I$sofia_abs_uadir/soa -I$sofia_abs_uadir/sresolv -I$sofia_abs_uadir/stun -I$sofia_abs_uadir/su -I$sofia_abs_uadir/tport -I$sofia_abs_uadir/url"
+ UNIMRCP_SOFIA_LIBS="$sofia_abs_uadir/libsofia-sip-ua.la"
sofia_version="`sed -n 's/#define SOFIA_SIP_VERSION.* "\(.*\)"/\1/p' $sofia_uadir/features/sofia-sip/sofia_features.h`"
break
fi
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_client.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_H
MRCP_DECLARE(apt_bool_t) mrcp_client_connection_agent_register(mrcp_client_t *client, mrcp_connection_agent_t *connection_agent);
/** Create MRCP profile */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create(
- mrcp_resource_factory_t *resource_factory,
- mrcp_sig_agent_t *signaling_agent,
- mrcp_connection_agent_t *connection_agent,
- mpf_engine_t *media_engine,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- mrcp_sig_settings_t *signaling_settings,
- apr_pool_t *pool);
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_create(
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sig_agent_t *signaling_agent,
+ mrcp_connection_agent_t *connection_agent,
+ mpf_engine_t *media_engine,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool);
/** Create MRCP profile (extended version) */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create_ex(
- mrcp_version_e mrcp_version,
- mrcp_resource_factory_t *resource_factory,
- mrcp_sa_factory_t *sa_factory,
- mrcp_ca_factory_t *ca_factory,
- mpf_engine_factory_t *mpf_factory,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- mrcp_sig_settings_t *signaling_settings,
- apr_pool_t *pool);
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_create_ex(
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sa_factory_t *sa_factory,
+ mrcp_ca_factory_t *ca_factory,
+ mpf_engine_factory_t *mpf_factory,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool);
/**
* Set a tag to the profile.
* @param profile the profile to set a tag for
* @param tag the tag to set
*/
-MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_profile_t *profile, const char *tag);
+MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_client_profile_t *profile, const char *tag);
/**
* Register MRCP profile.
* @param profile the profile to set
* @param name the name of the profile
*/
-MRCP_DECLARE(apt_bool_t) mrcp_client_profile_register(mrcp_client_t *client, mrcp_profile_t *profile, const char *name);
+MRCP_DECLARE(apt_bool_t) mrcp_client_profile_register(mrcp_client_t *client, mrcp_client_profile_t *profile, const char *name);
/**
* Register MRCP application.
* @param client the MRCP client to get from
* @param name the name to lookup
*/
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_get(const mrcp_client_t *client, const char *name);
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_get(const mrcp_client_t *client, const char *name);
/**
* Get available profiles.
* @param tag the tag to be used as a filter (no filter is specified if tag is NULL)
* @return FALSE if the provided max number of profiles is less than the actual number of profiles
*/
-MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_profile_t *profiles[], apr_size_t *count, const char *tag);
+MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_client_profile_t *profiles[], apr_size_t *count, const char *tag);
/**
* Get directory layout.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_session.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_client_session.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_SESSION_H
/** External object associated with session */
void *app_obj;
/** Profile to use */
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
/** Media context */
mpf_context_t *context;
/** Codec manager */
const mpf_codec_manager_t *codec_manager;
-
/** RTP termination array (mrcp_termination_slot_t) */
apr_array_header_t *terminations;
/** MRCP control channel array (mrcp_channel_t*) */
apr_size_t id;
};
-
-/** MRCP profile */
-struct mrcp_profile_t {
+/** MRCP client profile */
+struct mrcp_client_profile_t {
/** Unique profile name */
const char *name;
/** Arbitrary tag set/used by user application */
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_client_types.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_TYPES_H
/** Opaque MRCP client declaration */
typedef struct mrcp_client_t mrcp_client_t;
-/** Opaque MRCP profile declaration */
-typedef struct mrcp_profile_t mrcp_profile_t;
+/** Opaque MRCP client profile declaration */
+typedef struct mrcp_client_profile_t mrcp_client_profile_t;
+/** Backward compatible declaration of MRCP profile */
+typedef mrcp_client_profile_t mrcp_profile_t;
/** Opaque MRCP application declaration */
typedef struct mrcp_application_t mrcp_application_t;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_application.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_application.c 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#include "mrcp_application.h"
/** Create client session */
MRCP_DECLARE(mrcp_session_t*) mrcp_application_session_create(mrcp_application_t *application, const char *profile_name, void *obj)
{
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
mrcp_client_session_t *session;
if(!application || !application->client || !profile_name) {
return NULL;
void *obj)
{
mrcp_resource_t *resource;
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
mrcp_client_session_t *client_session = (mrcp_client_session_t*)session;
if(!client_session || !client_session->profile) {
/* Invalid params */
MRCP_DECLARE(mrcp_message_t*) mrcp_application_message_create(mrcp_session_t *session, mrcp_channel_t *channel, mrcp_method_id method_id)
{
mrcp_message_t *mrcp_message;
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
mrcp_client_session_t *client_session = (mrcp_client_session_t*)session;
if(!client_session || !channel || !channel->resource) {
return NULL;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client.c 2234 2014-11-12 01:38:17Z achaloyan@gmail.com $
+ * $Id: mrcp_client.c 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#include <apr_thread_cond.h>
apr_hash_t *cnt_agent_table;
/** Table of RTP settings (mpf_rtp_settings_t*) */
apr_hash_t *rtp_settings_table;
- /** Table of profiles (mrcp_profile_t*) */
+ /** Table of profiles (mrcp_client_profile_t*) */
apr_hash_t *profile_table;
/** Table of applications (mrcp_application_t*) */
}
/** Create MRCP profile */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create(
- mrcp_resource_factory_t *resource_factory,
- mrcp_sig_agent_t *signaling_agent,
- mrcp_connection_agent_t *connection_agent,
- mpf_engine_t *media_engine,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- mrcp_sig_settings_t *signaling_settings,
- apr_pool_t *pool)
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_create(
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sig_agent_t *signaling_agent,
+ mrcp_connection_agent_t *connection_agent,
+ mpf_engine_t *media_engine,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool)
{
mrcp_sa_factory_t *sa_factory = NULL;
mrcp_ca_factory_t *ca_factory = NULL;
}
/** Create MRCP profile (extended version) */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create_ex(
- mrcp_version_e mrcp_version,
- mrcp_resource_factory_t *resource_factory,
- mrcp_sa_factory_t *sa_factory,
- mrcp_ca_factory_t *ca_factory,
- mpf_engine_factory_t *mpf_factory,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- mrcp_sig_settings_t *signaling_settings,
- apr_pool_t *pool)
-{
- mrcp_profile_t *profile = apr_palloc(pool,sizeof(mrcp_profile_t));
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_create_ex(
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sa_factory_t *sa_factory,
+ mrcp_ca_factory_t *ca_factory,
+ mpf_engine_factory_t *mpf_factory,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool)
+{
+ mrcp_client_profile_t *profile = apr_palloc(pool,sizeof(mrcp_client_profile_t));
profile->name = NULL;
profile->tag = NULL;
profile->mrcp_version = mrcp_version;
}
/** Set a tag to the profile */
-MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_profile_t *profile, const char *tag)
+MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_client_profile_t *profile, const char *tag)
{
if(profile) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Profile Tag [%s]",tag);
}
/** Register MRCP profile */
-MRCP_DECLARE(apt_bool_t) mrcp_client_profile_register(mrcp_client_t *client, mrcp_profile_t *profile, const char *name)
+MRCP_DECLARE(apt_bool_t) mrcp_client_profile_register(mrcp_client_t *client, mrcp_client_profile_t *profile, const char *name)
{
if(!profile || !name) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile: no name");
}
/** Get profile by name */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_get(const mrcp_client_t *client, const char *name)
+MRCP_DECLARE(mrcp_client_profile_t*) mrcp_client_profile_get(const mrcp_client_t *client, const char *name)
{
return apr_hash_get(client->profile_table,name,APR_HASH_KEY_STRING);
}
/** Get available profiles */
-MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_profile_t *profiles[], apr_size_t *count, const char *tag)
+MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_client_profile_t *profiles[], apr_size_t *count, const char *tag)
{
apr_hash_index_t *it;
void *val;
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
apr_size_t i = 0;
apt_bool_t status = TRUE;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_session.c 2237 2014-11-12 01:48:46Z achaloyan@gmail.com $
+ * $Id: mrcp_client_session.c 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#include "mrcp_client_session.h"
mpf_rtp_termination_descriptor_t *rtp_descriptor = NULL;
rtp_termination_slot_t *slot;
apr_pool_t *pool = session->base.pool;
- mrcp_profile_t *profile = session->profile;
+ mrcp_client_profile_t *profile = session->profile;
if(mrcp_client_channel_find(session,channel,NULL) == TRUE) {
/* update */
return mrcp_client_channel_modify(session,channel,TRUE);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_server.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_H
mrcp_connection_agent_t *connection_agent);
/** Create MRCP profile */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_create(
- const char *id,
- mrcp_version_e mrcp_version,
- mrcp_resource_factory_t *resource_factory,
- mrcp_sig_agent_t *signaling_agent,
- mrcp_connection_agent_t *connection_agent,
- mpf_engine_t *media_engine,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- apr_pool_t *pool);
+MRCP_DECLARE(mrcp_server_profile_t*) mrcp_server_profile_create(
+ const char *id,
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sig_agent_t *signaling_agent,
+ mrcp_connection_agent_t *connection_agent,
+ mpf_engine_t *media_engine,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ apr_pool_t *pool);
/**
* Register MRCP profile.
*/
MRCP_DECLARE(apt_bool_t) mrcp_server_profile_register(
mrcp_server_t *server,
- mrcp_profile_t *profile,
+ mrcp_server_profile_t *profile,
apr_table_t *plugin_map);
/**
* @param server the MRCP client to get from
* @param name the name to lookup
*/
-MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_get(const mrcp_server_t *server, const char *name);
+MRCP_DECLARE(mrcp_server_profile_t*) mrcp_server_profile_get(const mrcp_server_t *server, const char *name);
APT_END_EXTERN_C
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_session.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_server_session.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_SESSION_H
/** MRCP server */
mrcp_server_t *server;
/** MRCP profile */
- mrcp_profile_t *profile;
+ mrcp_server_profile_t *profile;
/** Media context */
mpf_context_t *context;
apr_size_t subrequest_count;
};
-/** MRCP profile */
-struct mrcp_profile_t {
+/** MRCP server profile */
+struct mrcp_server_profile_t {
/** Identifier of the profile */
const char *id;
/** MRCP version */
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_server_types.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_TYPES_H
/** Opaque MRCP server declaration */
typedef struct mrcp_server_t mrcp_server_t;
-/** Opaque MRCP profile declaration */
-typedef struct mrcp_profile_t mrcp_profile_t;
+/** Opaque MRCP server profile declaration */
+typedef struct mrcp_server_profile_t mrcp_server_profile_t;
APT_END_EXTERN_C
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server.c 2178 2014-09-13 02:36:05Z achaloyan@gmail.com $
+ * $Id: mrcp_server.c 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
*/
#include "mrcp_server.h"
apr_hash_t *cnt_agent_table;
/** Table of RTP settings (mpf_rtp_settings_t*) */
apr_hash_t *rtp_settings_table;
- /** Table of profiles (mrcp_profile_t*) */
+ /** Table of profiles (mrcp_server_profile_t*) */
apr_hash_t *profile_table;
/** Table of sessions */
}
/** Create MRCP profile */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_create(
- const char *id,
- mrcp_version_e mrcp_version,
- mrcp_resource_factory_t *resource_factory,
- mrcp_sig_agent_t *signaling_agent,
- mrcp_connection_agent_t *connection_agent,
- mpf_engine_t *media_engine,
- mpf_termination_factory_t *rtp_factory,
- mpf_rtp_settings_t *rtp_settings,
- apr_pool_t *pool)
-{
- mrcp_profile_t *profile = apr_palloc(pool,sizeof(mrcp_profile_t));
+MRCP_DECLARE(mrcp_server_profile_t*) mrcp_server_profile_create(
+ const char *id,
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sig_agent_t *signaling_agent,
+ mrcp_connection_agent_t *connection_agent,
+ mpf_engine_t *media_engine,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ apr_pool_t *pool)
+{
+ mrcp_server_profile_t *profile = apr_palloc(pool,sizeof(mrcp_server_profile_t));
profile->id = id;
profile->mrcp_version = mrcp_version;
profile->resource_factory = resource_factory;
return profile;
}
-static apt_bool_t mrcp_server_engine_table_make(mrcp_server_t *server, mrcp_profile_t *profile, apr_table_t *plugin_map)
+static apt_bool_t mrcp_server_engine_table_make(mrcp_server_t *server, mrcp_server_profile_t *profile, apr_table_t *plugin_map)
{
int i;
mrcp_resource_t *resource;
/** Register MRCP profile */
MRCP_DECLARE(apt_bool_t) mrcp_server_profile_register(
mrcp_server_t *server,
- mrcp_profile_t *profile,
+ mrcp_server_profile_t *profile,
apr_table_t *plugin_map)
{
if(!profile || !profile->id) {
}
/** Get profile by name */
-MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_get(const mrcp_server_t *server, const char *name)
+MRCP_DECLARE(mrcp_server_profile_t*) mrcp_server_profile_get(const mrcp_server_t *server, const char *name)
{
return apr_hash_get(server->profile_table,name,APR_HASH_KEY_STRING);
}
return apt_task_msg_signal(task,task_msg);
}
-static mrcp_profile_t* mrcp_server_profile_get_by_agent(mrcp_server_t *server, mrcp_server_session_t *session, mrcp_sig_agent_t *signaling_agent)
+static mrcp_server_profile_t* mrcp_server_profile_get_by_agent(mrcp_server_t *server, mrcp_server_session_t *session, const mrcp_sig_agent_t *signaling_agent)
{
- mrcp_profile_t *profile;
+ mrcp_server_profile_t *profile;
apr_hash_index_t *it;
void *val;
it = apr_hash_first(session->base.pool,server->profile_table);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sig_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_sig_agent.h 2253 2014-11-21 02:57:19Z achaloyan@gmail.com $
*/
#ifndef MRCP_SIG_AGENT_H
char *resource_location;
/** Map of the MRCP resource names (v1 only) */
apr_table_t *resource_map;
- /** Force destination ip address. Should be used only in case
+ /** Force destination IP address. Should be used only in case
SDP contains incorrect connection address (local IP address behind NAT) */
apt_bool_t force_destination;
/** Optional feature tags */
/** Virtual create_server_session */
mrcp_session_t* (*create_server_session)(mrcp_sig_agent_t *signaling_agent);
/** Virtual create_client_session */
- apt_bool_t (*create_client_session)(mrcp_session_t *session, mrcp_sig_settings_t *settings);
+ apt_bool_t (*create_client_session)(mrcp_session_t *session, const mrcp_sig_settings_t *settings);
};
/** Create signaling agent. */
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_connection.c 2235 2014-11-12 01:41:51Z achaloyan@gmail.com $
+ * $Id: mrcp_client_connection.c 2249 2014-11-19 05:26:24Z achaloyan@gmail.com $
*/
#include "mrcp_connection.h"
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
- apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,channel->log_obj,"Send MRCPv2 Stream %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,channel->log_obj,"Send MRCPv2 Data %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
connection->id,
stream.text.length,
connection->verbose == TRUE ? stream.text.length : 0,
status = TRUE;
}
else {
- apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,channel->log_obj,"Failed to Send MRCPv2 Stream %s",
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,channel->log_obj,"Failed to Send MRCPv2 Data %s",
connection->id);
}
}
else {
- apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,channel->log_obj,"Failed to Generate MRCPv2 Stream %s",
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,channel->log_obj,"Failed to Generate MRCPv2 Data %s",
connection->id);
}
}
/* calculate actual length of the stream */
stream->text.length = offset + length;
stream->pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive MRCPv2 Stream %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive MRCPv2 Data %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
connection->id,
length,
connection->verbose == TRUE ? length : 0,
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_connection.c 2235 2014-11-12 01:41:51Z achaloyan@gmail.com $
+ * $Id: mrcp_server_connection.c 2249 2014-11-19 05:26:24Z achaloyan@gmail.com $
*/
#include "mrcp_connection.h"
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send MRCPv2 Stream %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send MRCPv2 Data %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
connection->id,
stream.text.length,
connection->verbose == TRUE ? stream.text.length : 0,
status = TRUE;
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send MRCPv2 Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send MRCPv2 Data");
}
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCPv2 Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCPv2 Data");
}
}
while(result == APT_MESSAGE_STATUS_INCOMPLETE);
}
else if(status == APT_MESSAGE_STATUS_INVALID) {
/* error case */
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse MRCPv2 Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse MRCPv2 Data");
if(message && message->resource) {
mrcp_message_t *response;
response = mrcp_response_create(message,message->pool);
stream->text.length = offset + length;
stream->pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive MRCPv2 Stream %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive MRCPv2 Data %s [%"APR_SIZE_T_FMT" bytes]\n%.*s",
connection->id,
length,
connection->verbose == TRUE ? length : 0,
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_server.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: rtsp_server.h 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#ifndef RTSP_SERVER_H
RTSP_DECLARE(const rtsp_message_t*) rtsp_server_session_request_get(const rtsp_server_session_t *session);
/**
- * Get the session destination (client) ip address.
- * @param session the session to get ip address from
+ * Get the session destination (client) IP address.
+ * @param session the session to get IP address from
*/
RTSP_DECLARE(const char*) rtsp_server_session_destination_get(const rtsp_server_session_t *session);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_client.c 2220 2014-11-11 02:39:48Z achaloyan@gmail.com $
+ * $Id: rtsp_client.c 2249 2014-11-19 05:26:24Z achaloyan@gmail.com $
*/
#ifdef WIN32
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send RTSP Stream %s [%"APR_SIZE_T_FMT" bytes]\n%s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send RTSP Data %s [%"APR_SIZE_T_FMT" bytes]\n%s",
rtsp_connection->id,
stream->text.length,
stream->text.buf);
status = TRUE;
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send RTSP Data");
}
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Data");
}
}
while(result == APT_MESSAGE_STATUS_INCOMPLETE);
/* calculate actual length of the stream */
stream->text.length = offset + length;
stream->pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive RTSP Stream %s [%"APR_SIZE_T_FMT" bytes]\n%s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive RTSP Data %s [%"APR_SIZE_T_FMT" bytes]\n%s",
rtsp_connection->id,
length,
stream->pos);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_server.c 2173 2014-09-11 01:42:21Z achaloyan@gmail.com $
+ * $Id: rtsp_server.c 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#ifdef WIN32
return session->active_request;
}
-/** Get the session destination (client) ip address */
+/** Get the session destination (client) IP address */
RTSP_DECLARE(const char*) rtsp_server_session_destination_get(const rtsp_server_session_t *session)
{
if(session->connection) {
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send RTSP Stream %s [%"APR_SIZE_T_FMT" bytes]\n%s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send RTSP Data %s [%"APR_SIZE_T_FMT" bytes]\n%s",
rtsp_connection->id,
stream->text.length,
stream->text.buf);
status = TRUE;
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send RTSP Data");
}
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Data");
}
}
while(result == APT_MESSAGE_STATUS_INCOMPLETE);
else if(status == APT_MESSAGE_STATUS_INVALID) {
/* error case */
rtsp_message_t *response;
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse RTSP Data");
if(message) {
response = rtsp_response_create(message,RTSP_STATUS_CODE_BAD_REQUEST,
RTSP_REASON_PHRASE_BAD_REQUEST,message->pool);
/* calculate actual length of the stream */
stream->text.length = offset + length;
stream->pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive RTSP Stream %s [%"APR_SIZE_T_FMT" bytes]\n%s",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive RTSP Data %s [%"APR_SIZE_T_FMT" bytes]\n%s",
rtsp_connection->id,
length,
stream->pos);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_server_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_sofiasip_server_agent.h 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#ifndef MRCP_SOFIASIP_SERVER_AGENT_H
char *origin;
/** SIP transport */
char *transport;
- /** Force destination ip address. Should be used only in case
+ /** Force destination IP address. Should be used only in case
SDP contains incorrect connection address (local IP address behind NAT) */
apt_bool_t force_destination;
/** SIP T1 timer */
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_client_agent.c 2225 2014-11-12 00:45:19Z achaloyan@gmail.com $
+ * $Id: mrcp_sofiasip_client_agent.c 2253 2014-11-21 02:57:19Z achaloyan@gmail.com $
*/
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
#include <sofia-sip/su.h>
#include <sofia-sip/nua.h>
#include <sofia-sip/sip_status.h>
+#include <sofia-sip/sip_header.h>
#include <sofia-sip/sdp.h>
#include <sofia-sip/tport.h>
#include <sofia-sip/sofia_features.h>
struct mrcp_sofia_session_t {
mrcp_session_t *session;
- mrcp_sig_settings_t *sip_settings;
- char *sip_to_str;
+ const mrcp_sig_settings_t *sip_settings;
su_home_t *home;
nua_handle_t *nh;
};
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_client_config_t *config, apr_pool_t *pool);
-static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, mrcp_sig_settings_t *settings);
+static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, const mrcp_sig_settings_t *settings);
static void mrcp_sofia_event_callback( nua_event_t nua_event,
int status,
* an incoming call, etc, occur.
*/
sofia_agent->nua = nua_create(
- sofia_agent->root, /* Event loop */
- mrcp_sofia_event_callback, /* Callback for processing events */
- sofia_agent, /* Additional data to pass to callback */
- NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
- TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
- TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
- TAG_END()); /* Last tag should always finish the sequence */
- if(sofia_agent->nua) {
- nua_set_params(
- sofia_agent->nua,
- NUTAG_AUTOANSWER(0),
- NUTAG_APPL_METHOD("OPTIONS"),
- TAG_IF(sofia_config->sip_t1,NTATAG_SIP_T1(sofia_config->sip_t1)),
- TAG_IF(sofia_config->sip_t2,NTATAG_SIP_T2(sofia_config->sip_t2)),
- TAG_IF(sofia_config->sip_t4,NTATAG_SIP_T4(sofia_config->sip_t4)),
- TAG_IF(sofia_config->sip_t1x64,NTATAG_SIP_T1X64(sofia_config->sip_t1x64)),
- SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
- TAG_END());
- }
- else {
+ sofia_agent->root, /* Event loop */
+ mrcp_sofia_event_callback, /* Callback for processing events */
+ sofia_agent, /* Additional data to pass to callback */
+ NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
+ NUTAG_AUTOANSWER(0),
+ NUTAG_APPL_METHOD("OPTIONS"),
+ TAG_IF(sofia_config->sip_t1,NTATAG_SIP_T1(sofia_config->sip_t1)),
+ TAG_IF(sofia_config->sip_t2,NTATAG_SIP_T2(sofia_config->sip_t2)),
+ TAG_IF(sofia_config->sip_t4,NTATAG_SIP_T4(sofia_config->sip_t4)),
+ TAG_IF(sofia_config->sip_t1x64,NTATAG_SIP_T1X64(sofia_config->sip_t1x64)),
+ SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
+ TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
+ TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
+ TAG_END()); /* Last tag should always finish the sequence */
+ if(!sofia_agent->nua) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
apt_task_name_get(task),
sofia_agent->sip_bind_str);
return session->signaling_agent->obj;
}
-static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, mrcp_sig_settings_t *settings)
+static apt_bool_t mrcp_sofia_session_create(mrcp_session_t *session, const mrcp_sig_settings_t *settings)
{
+ const char *sip_to_str;
mrcp_sofia_agent_t *sofia_agent = mrcp_sofia_agent_get(session);
mrcp_sofia_session_t *sofia_session;
session->request_vtable = &session_request_vtable;
session->obj = sofia_session;
if(settings->user_name && *settings->user_name != '\0') {
- sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%hu",
+ sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%hu",
settings->user_name,
settings->server_ip,
settings->server_port);
}
else {
- sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s:%hu",
+ sip_to_str = apr_psprintf(session->pool,"sip:%s:%hu",
settings->server_ip,
settings->server_port);
}
sofia_session->nh = nua_handle(
sofia_agent->nua,
sofia_session,
- SIPTAG_TO_STR(sofia_session->sip_to_str),
+ SIPTAG_TO_STR(sip_to_str),
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_IF(settings->feature_tags,SIPTAG_ACCEPT_CONTACT_STR(settings->feature_tags)),
tagi_t tags[])
{
mrcp_session_t *session = sofia_session->session;
+ sip_to_t *sip_to;
sip_contact_t *sip_contact;
- if(!sip) {
+ if(!sip || !sip->sip_contact) {
return;
}
sip_contact = sip->sip_contact;
- if(!sip_contact) {
- return;
- }
- if(sip_contact->m_url->url_user && *sip_contact->m_url->url_user != '\0') {
- sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%s",
- sip_contact->m_url->url_user,
- sip_contact->m_url->url_host,
- sip_contact->m_url->url_port);
- }
- else {
- sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s:%s",
- sip_contact->m_url->url_host,
- sip_contact->m_url->url_port);
- }
-
apr_thread_mutex_lock(sofia_session->mutex);
- apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Redirect "APT_NAMESID_FMT" to %s",
+ sip_to = sip_to_create(sofia_session->home, (const url_string_t *) sip_contact->m_url);
+
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Redirect "APT_NAMESID_FMT" to "URL_PRINT_FORMAT,
session->name,
- MRCP_SESSION_SID(session),
- sofia_session->sip_to_str);
+ MRCP_SESSION_SID(session),
+ URL_PRINT_ARGS(sip_to->a_url));
if(sofia_session->nh) {
nua_handle_bind(sofia_session->nh, NULL);
sofia_session->nh = nua_handle(
sofia_agent->nua,
sofia_session,
- SIPTAG_TO_STR(sofia_session->sip_to_str),
+ SIPTAG_TO(sip_to),
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_END());
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_server_agent.c 2221 2014-11-11 02:44:03Z achaloyan@gmail.com $
+ * $Id: mrcp_sofiasip_server_agent.c 2250 2014-11-19 05:41:12Z achaloyan@gmail.com $
*/
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
* an incoming call, etc, occur.
*/
sofia_agent->nua = nua_create(
- sofia_agent->root, /* Event loop */
- mrcp_sofia_event_callback, /* Callback for processing events */
- sofia_agent, /* Additional data to pass to callback */
- NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
- TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
- TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
- TAG_END()); /* Last tag should always finish the sequence */
- if(sofia_agent->nua) {
- nua_set_params(
- sofia_agent->nua,
- NUTAG_AUTOANSWER(0),
- NUTAG_APPL_METHOD("OPTIONS"),
- TAG_IF(sofia_config->sip_t1,NTATAG_SIP_T1(sofia_config->sip_t1)),
- TAG_IF(sofia_config->sip_t2,NTATAG_SIP_T2(sofia_config->sip_t2)),
- TAG_IF(sofia_config->sip_t4,NTATAG_SIP_T4(sofia_config->sip_t4)),
- TAG_IF(sofia_config->sip_t1x64,NTATAG_SIP_T1X64(sofia_config->sip_t1x64)),
- SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
- TAG_END());
- }
- else {
+ sofia_agent->root, /* Event loop */
+ mrcp_sofia_event_callback, /* Callback for processing events */
+ sofia_agent, /* Additional data to pass to callback */
+ NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
+ NUTAG_AUTOANSWER(0),
+ NUTAG_APPL_METHOD("OPTIONS"),
+ TAG_IF(sofia_config->sip_t1,NTATAG_SIP_T1(sofia_config->sip_t1)),
+ TAG_IF(sofia_config->sip_t2,NTATAG_SIP_T2(sofia_config->sip_t2)),
+ TAG_IF(sofia_config->sip_t4,NTATAG_SIP_T4(sofia_config->sip_t4)),
+ TAG_IF(sofia_config->sip_t1x64,NTATAG_SIP_T1X64(sofia_config->sip_t1x64)),
+ SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
+ TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
+ TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
+ TAG_END()); /* Last tag should always finish the sequence */
+ if(!sofia_agent->nua) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
apt_task_name_get(task),
sofia_agent->sip_bind_str);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_server_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_unirtsp_server_agent.h 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#ifndef MRCP_UNIRTSP_SERVER_AGENT_H
/** Number of max RTSP connections */
apr_size_t max_connection_count;
- /** Force destination ip address. Should be used only in case
+ /** Force destination IP address. Should be used only in case
SDP contains incorrect connection address (local IP address behind NAT) */
apt_bool_t force_destination;
};
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_client_agent.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ * $Id: mrcp_unirtsp_client_agent.c 2253 2014-11-21 02:57:19Z achaloyan@gmail.com $
*/
#include <apr_general.h>
};
struct mrcp_unirtsp_session_t {
- mrcp_message_t *mrcp_message;
- mrcp_session_t *mrcp_session;
- rtsp_client_session_t *rtsp_session;
- mrcp_sig_settings_t *rtsp_settings;
- su_home_t *home;
+ mrcp_message_t *mrcp_message;
+ mrcp_session_t *mrcp_session;
+ rtsp_client_session_t *rtsp_session;
+ const mrcp_sig_settings_t *rtsp_settings;
+ su_home_t *home;
};
mrcp_unirtsp_on_session_event
};
-static apt_bool_t mrcp_unirtsp_session_create(mrcp_session_t *session, mrcp_sig_settings_t *settings);
+static apt_bool_t mrcp_unirtsp_session_create(mrcp_session_t *session, const mrcp_sig_settings_t *settings);
static apt_bool_t rtsp_config_validate(mrcp_unirtsp_agent_t *agent, rtsp_client_config_t *config, apr_pool_t *pool);
static apt_bool_t mrcp_unirtsp_on_resource_discover(mrcp_unirtsp_agent_t *agent, mrcp_unirtsp_session_t *session, rtsp_message_t *request, rtsp_message_t *response);
return agent;
}
-static apt_bool_t mrcp_unirtsp_session_create(mrcp_session_t *mrcp_session, mrcp_sig_settings_t *settings)
+static apt_bool_t mrcp_unirtsp_session_create(mrcp_session_t *mrcp_session, const mrcp_sig_settings_t *settings)
{
mrcp_unirtsp_agent_t *agent = mrcp_session->signaling_agent->obj;
mrcp_unirtsp_session_t *session;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_client.c 2231 2014-11-12 01:32:03Z achaloyan@gmail.com $
+ * $Id: unimrcp_client.c 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/** Pool to allocate memory from */
apr_pool_t *pool;
- /** Default ip address (named property) */
+ /** Default IP address (named property) */
const char *ip;
- /** Default external (NAT) ip address (named property) */
+ /** Default external (NAT) IP address (named property) */
const char *ext_ip;
- /** Default server ip address (named property) */
+ /** Default server IP address (named property) */
const char *server_ip;
- /** Implicitly detected, cached ip address */
+ /** Implicitly detected, cached IP address */
const char *auto_ip;
};
}
if(attr && strcasecmp(attr->value,"auto") == 0) {
- /* implicitly detect ip address, if not already detected */
+ /* implicitly detect IP address, if not already detected */
if(!loader->auto_ip) {
char *auto_addr = DEFAULT_IP_ADDRESS;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Detecting IP Address");
return apr_pstrdup(loader->pool,loader->auto_ip);
}
else if(attr && strcasecmp(attr->value,"iface") == 0) {
- /* get ip address by network interface name */
+ /* get IP address by network interface name */
char *ip_addr = DEFAULT_IP_ADDRESS;
if(is_cdata_valid(elem) == TRUE) {
const char *iface_name = cdata_text_get(elem);
}
if(is_cdata_valid(elem)) {
- /* use specified ip address */
+ /* use specified IP address */
return cdata_copy(elem,loader->pool);
}
- /* use default ip address */
+ /* use default IP address */
return apr_pstrdup(loader->pool,loader->ip);
}
}
if(!config->local_ip) {
- /* use default ip address if not specified */
+ /* use default IP address if not specified */
config->local_ip = apr_pstrdup(loader->pool,loader->ip);
}
if(!config->ext_ip && loader->ext_ip) {
- /* use default ext ip address if not specified */
+ /* use default ext IP address if not specified */
config->ext_ip = apr_pstrdup(loader->pool,loader->ext_ip);
}
static apt_bool_t unimrcp_client_mrcpv2_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id, const char *tag)
{
const apr_xml_elem *elem;
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
mrcp_sa_factory_t *sa_factory = NULL;
mrcp_ca_factory_t *ca_factory = NULL;
mpf_engine_factory_t *mpf_factory = NULL;
static apt_bool_t unimrcp_client_mrcpv1_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id, const char *tag)
{
const apr_xml_elem *elem;
- mrcp_profile_t *profile;
+ mrcp_client_profile_t *profile;
mrcp_sa_factory_t *sa_factory = NULL;
mpf_engine_factory_t *mpf_factory = NULL;
mpf_termination_factory_t *rtp_factory = NULL;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_server.c 2231 2014-11-12 01:32:03Z achaloyan@gmail.com $
+ * $Id: unimrcp_server.c 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/** Pool to allocate memory from */
apr_pool_t *pool;
- /** Default ip address (named property) */
+ /** Default IP address (named property) */
const char *ip;
- /** Default external (NAT) ip address (named property) */
+ /** Default external (NAT) IP address (named property) */
const char *ext_ip;
- /** Implicitly detected, cached ip address */
+ /** Implicitly detected, cached IP address */
const char *auto_ip;
};
}
if(attr && strcasecmp(attr->value,"auto") == 0) {
- /* implicitly detect ip address, if not already detected */
+ /* implicitly detect IP address, if not already detected */
if(!loader->auto_ip) {
char *auto_addr = DEFAULT_IP_ADDRESS;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Detecting IP Address");
return apr_pstrdup(loader->pool,loader->auto_ip);
}
else if(attr && strcasecmp(attr->value,"iface") == 0) {
- /* get ip address by network interface name */
+ /* get IP address by network interface name */
char *ip_addr = DEFAULT_IP_ADDRESS;
if(is_cdata_valid(elem) == TRUE) {
const char *iface_name = cdata_text_get(elem);
}
if(is_cdata_valid(elem)) {
- /* use provided ip address */
+ /* use provided IP address */
return cdata_copy(elem,loader->pool);
}
- /* use default ip address */
+ /* use default IP address */
return apr_pstrdup(loader->pool,loader->ip);
}
}
if(!config->local_ip) {
- /* use default ip address if not specified */
+ /* use default IP address if not specified */
config->local_ip = apr_pstrdup(loader->pool,loader->ip);
}
if(!config->ext_ip && loader->ext_ip) {
- /* use default ext ip address if not specified */
+ /* use default ext IP address if not specified */
config->ext_ip = apr_pstrdup(loader->pool,loader->ext_ip);
}
}
if(!config->local_ip) {
- /* use default ip address if not specified */
+ /* use default IP address if not specified */
config->local_ip = apr_pstrdup(loader->pool,loader->ip);
}
}
if(!mrcp_ip) {
- /* use default ip address if not specified */
+ /* use default IP address if not specified */
mrcp_ip = apr_pstrdup(loader->pool,loader->ip);
}
static apt_bool_t unimrcp_server_mrcpv2_profile_load(unimrcp_server_loader_t *loader, const apr_xml_elem *root, const char *id)
{
const apr_xml_elem *elem;
- mrcp_profile_t *profile;
+ mrcp_server_profile_t *profile;
mrcp_sig_agent_t *sip_agent = NULL;
mrcp_connection_agent_t *mrcpv2_agent = NULL;
mpf_engine_t *media_engine = NULL;
static apt_bool_t unimrcp_server_mrcpv1_profile_load(unimrcp_server_loader_t *loader, const apr_xml_elem *root, const char *id)
{
const apr_xml_elem *elem;
- mrcp_profile_t *profile;
+ mrcp_server_profile_t *profile;
mrcp_sig_agent_t *rtsp_agent = NULL;
mpf_engine_t *media_engine = NULL;
mpf_termination_factory_t *rtp_factory = NULL;
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: parse_gen_suite.c 2215 2014-11-06 03:07:23Z achaloyan@gmail.com $
+ * $Id: parse_gen_suite.c 2249 2014-11-19 05:26:24Z achaloyan@gmail.com $
*/
#include <apr_file_info.h>
if(status == APT_MESSAGE_STATUS_COMPLETE) {
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCP Stream [%"APR_SIZE_T_FMT" bytes]\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCPv2 Data [%"APR_SIZE_T_FMT" bytes]\n%s",stream.text.length,stream.text.buf);
}
else if(status == APT_MESSAGE_STATUS_INCOMPLETE) {
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCP Stream [%"APR_SIZE_T_FMT" bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCPv2 Data [%"APR_SIZE_T_FMT" bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
continuation = TRUE;
}
else if(status == APT_MESSAGE_STATUS_INVALID) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCPv2 Data");
}
}
while(continuation == TRUE);
/* calculate actual length of the stream */
stream.text.length = offset + length;
stream.pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse MRCP Stream [%"APR_SIZE_T_FMT" bytes]\n%s",length,stream.pos);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse MRCPv2 Data [%"APR_SIZE_T_FMT" bytes]\n%s",length,stream.pos);
/* reset pos */
apt_text_stream_reset(&stream);
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: parse_gen_suite.c 2240 2014-11-13 01:18:47Z achaloyan@gmail.com $
+ * $Id: parse_gen_suite.c 2249 2014-11-19 05:26:24Z achaloyan@gmail.com $
*/
#include <apr_file_info.h>
if(status == APT_MESSAGE_STATUS_COMPLETE) {
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Stream [%"APR_SIZE_T_FMT" bytes]\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Data [%"APR_SIZE_T_FMT" bytes]\n%s",stream.text.length,stream.text.buf);
}
else if(status == APT_MESSAGE_STATUS_INCOMPLETE) {
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Stream [%"APR_SIZE_T_FMT" bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Data [%"APR_SIZE_T_FMT" bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
continuation = TRUE;
}
else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Stream");
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Data");
}
}
while(continuation == TRUE);
/* calculate actual length of the stream */
stream.text.length = offset + length;
stream.pos[length] = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse RTSP Stream [%"APR_SIZE_T_FMT" bytes]\n%s",length,stream.pos);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse RTSP Data [%"APR_SIZE_T_FMT" bytes]\n%s",length,stream.pos);
/* reset pos */
apt_text_stream_reset(&stream);