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_client_agent.h 1827 2011-12-30 03:47:37Z achaloyan $ 00017 */ 00018 00019 #ifndef MRCP_SOFIASIP_CLIENT_AGENT_H 00020 #define MRCP_SOFIASIP_CLIENT_AGENT_H 00021 00022 /** 00023 * @file mrcp_sofiasip_client_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_client_config_t mrcp_sofia_client_config_t; 00034 00035 /** Sofia-SIP config */ 00036 struct mrcp_sofia_client_config_t { 00037 /** Local IP address */ 00038 char *local_ip; 00039 /** External (NAT) IP address */ 00040 char *ext_ip; 00041 /** Local SIP port */ 00042 apr_port_t local_port; 00043 /** Local SIP user name */ 00044 char *local_user_name; 00045 /** User agent name */ 00046 char *user_agent_name; 00047 /** SDP origin */ 00048 char *origin; 00049 /** SIP transport */ 00050 char *transport; 00051 /** SIP T1 timer */ 00052 apr_size_t sip_t1; 00053 /** SIP T2 timer */ 00054 apr_size_t sip_t2; 00055 /** SIP T4 timer */ 00056 apr_size_t sip_t4; 00057 /** SIP T1x64 timer */ 00058 apr_size_t sip_t1x64; 00059 /** Print out SIP messages to the console */ 00060 apt_bool_t tport_log; 00061 /** Dump SIP messages to the specified file */ 00062 char *tport_dump_file; 00063 }; 00064 00065 /** 00066 * Create Sofia-SIP signaling agent. 00067 */ 00068 MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id, mrcp_sofia_client_config_t *config, apr_pool_t *pool); 00069 00070 /** 00071 * Allocate Sofia-SIP config. 00072 */ 00073 MRCP_DECLARE(mrcp_sofia_client_config_t*) mrcp_sofiasip_client_config_alloc(apr_pool_t *pool); 00074 00075 APT_END_EXTERN_C 00076 00077 #endif /* MRCP_SOFIASIP_CLIENT_AGENT_H */