00001 /* 00002 * Copyright 2008-2010 Arsen Chaloyan 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 * 00016 * $Id: mrcp_sofiasip_server_agent.h 1827 2011-12-30 03:47:37Z achaloyan $ 00017 */ 00018 00019 #ifndef MRCP_SOFIASIP_SERVER_AGENT_H 00020 #define MRCP_SOFIASIP_SERVER_AGENT_H 00021 00022 /** 00023 * @file mrcp_sofiasip_server_agent.h 00024 * @brief Implementation of MRCP Signaling Interface using Sofia-SIP 00025 */ 00026 00027 #include <apr_network_io.h> 00028 #include "mrcp_sig_agent.h" 00029 00030 APT_BEGIN_EXTERN_C 00031 00032 /** Sofia-SIP config declaration */ 00033 typedef struct mrcp_sofia_server_config_t mrcp_sofia_server_config_t; 00034 00035 /** Sofia-SIP config */ 00036 struct mrcp_sofia_server_config_t { 00037 /** Local IP address to bind to */ 00038 char *local_ip; 00039 /** External (NAT) IP address */ 00040 char *ext_ip; 00041 /** Local port to bind to */ 00042 apr_port_t local_port; 00043 /** SIP user name */ 00044 char *user_name; 00045 /** User agent name */ 00046 char *user_agent_name; 00047 /** SDP origin */ 00048 char *origin; 00049 /** SIP transport */ 00050 char *transport; 00051 /** Force destination ip address. Should be used only in case 00052 SDP contains incorrect connection address (local IP address behind NAT) */ 00053 apt_bool_t force_destination; 00054 /** SIP T1 timer */ 00055 apr_size_t sip_t1; 00056 /** SIP T2 timer */ 00057 apr_size_t sip_t2; 00058 /** SIP T4 timer */ 00059 apr_size_t sip_t4; 00060 /** SIP T1x64 timer */ 00061 apr_size_t sip_t1x64; 00062 /** Print out SIP messages to the console */ 00063 apt_bool_t tport_log; 00064 /** Dump SIP messages to the specified file */ 00065 char *tport_dump_file; 00066 }; 00067 00068 /** 00069 * Create Sofia-SIP signaling agent. 00070 */ 00071 MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_server_agent_create(const char *id, mrcp_sofia_server_config_t *config, apr_pool_t *pool); 00072 00073 /** 00074 * Allocate Sofia-SIP config. 00075 */ 00076 MRCP_DECLARE(mrcp_sofia_server_config_t*) mrcp_sofiasip_server_config_alloc(apr_pool_t *pool); 00077 00078 APT_END_EXTERN_C 00079 00080 #endif /* MRCP_SOFIASIP_SERVER_AGENT_H */