forked from Mirrors/freeswitch
Skinny: split out server part
And try to keep each file below 2000 lines
This commit is contained in:
parent
51f1ad5072
commit
0bc11afa73
@ -3,7 +3,7 @@ include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_skinny
|
||||
|
||||
mod_LTLIBRARIES = mod_skinny.la
|
||||
mod_skinny_la_SOURCES = mod_skinny.c skinny_protocol.c skinny_tables.c skinny_api.c
|
||||
mod_skinny_la_SOURCES = mod_skinny.c skinny_protocol.c skinny_tables.c skinny_api.c skinny_server.c
|
||||
mod_skinny_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_skinny_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_skinny_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <switch.h>
|
||||
#include "mod_skinny.h"
|
||||
#include "skinny_protocol.h"
|
||||
#include "skinny_server.h"
|
||||
#include "skinny_tables.h"
|
||||
#include "skinny_labels.h"
|
||||
#include "skinny_api.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -621,7 +621,7 @@ enum skinny_codecs {
|
||||
SKINNY_CODEC_RFC2833_DYNPAYLOAD = 257
|
||||
};
|
||||
|
||||
typedef switch_status_t (*skinny_command_t) (char **argv, int argc, switch_stream_handle_t *stream);
|
||||
char* skinny_codec2string(enum skinny_codecs skinnycodec);
|
||||
|
||||
/*****************************************************************************/
|
||||
/* SKINNY FUNCTIONS */
|
||||
@ -638,22 +638,12 @@ switch_status_t skinny_read_packet(listener_t *listener, skinny_message_t **req)
|
||||
|
||||
switch_status_t skinny_device_event(listener_t *listener, switch_event_t **ev, switch_event_types_t event_id, const char *subclass_name);
|
||||
|
||||
switch_status_t skinny_session_send_call_info(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_walk_lines(skinny_profile_t *profile, char *channel_uuid, switch_core_db_callback_func_t callback, void *data);
|
||||
switch_call_cause_t skinny_ring_lines(private_t *tech_pvt);
|
||||
|
||||
switch_status_t skinny_create_ingoing_session(listener_t *listener, uint32_t *line_instance, switch_core_session_t **session);
|
||||
switch_status_t skinny_session_process_dest(switch_core_session_t *session, listener_t *listener, uint32_t line_instance, char *dest, char append_dest, uint32_t backspace);
|
||||
switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_answer(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_start_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_stop_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_hold_active_calls(listener_t *listener);
|
||||
|
||||
void skinny_line_get(listener_t *listener, uint32_t instance, struct line_stat_res_message **button);
|
||||
void skinny_speed_dial_get(listener_t *listener, uint32_t instance, struct speed_dial_stat_res_message **button);
|
||||
void skinny_service_url_get(listener_t *listener, uint32_t instance, struct service_url_stat_res_message **button);
|
||||
void skinny_feature_get(listener_t *listener, uint32_t instance, struct feature_stat_res_message **button);
|
||||
|
||||
switch_status_t skinny_perform_send_reply(listener_t *listener, const char *file, const char *func, int line, skinny_message_t *reply);
|
||||
#define skinny_send_reply(listener, reply) skinny_perform_send_reply(listener, __FILE__, __SWITCH_FUNC__, __LINE__, reply)
|
||||
@ -737,6 +727,7 @@ switch_status_t send_define_time_date(listener_t *listener,
|
||||
switch_status_t send_define_current_time_date(listener_t *listener);
|
||||
switch_status_t send_version(listener_t *listener,
|
||||
char *version);
|
||||
switch_status_t send_capabilities_req(listener_t *listener);
|
||||
switch_status_t send_register_reject(listener_t *listener,
|
||||
char *error);
|
||||
switch_status_t send_open_receive_channel(listener_t *listener,
|
||||
|
1877
src/mod/endpoints/mod_skinny/skinny_server.c
Normal file
1877
src/mod/endpoints/mod_skinny/skinny_server.c
Normal file
File diff suppressed because it is too large
Load Diff
64
src/mod/endpoints/mod_skinny/skinny_server.h
Normal file
64
src/mod/endpoints/mod_skinny/skinny_server.h
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2010, Mathieu Parent <math.parent@gmail.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mathieu Parent <math.parent@gmail.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Mathieu Parent <math.parent@gmail.com>
|
||||
*
|
||||
*
|
||||
* skinny_server.h -- Skinny Call Control Protocol (SCCP) Endpoint Module
|
||||
*
|
||||
*/
|
||||
#ifndef _SKINNY_SERVER_H
|
||||
#define _SKINNY_SERVER_H
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
/* SESSION FUNCTIONS */
|
||||
switch_status_t skinny_create_ingoing_session(listener_t *listener, uint32_t *line_instance, switch_core_session_t **session);
|
||||
switch_status_t skinny_session_process_dest(switch_core_session_t *session, listener_t *listener, uint32_t line_instance, char *dest, char append_dest, uint32_t backspace);
|
||||
switch_status_t skinny_session_send_call_info(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_call_cause_t skinny_ring_lines(private_t *tech_pvt);
|
||||
switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_answer(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_start_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_session_stop_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
|
||||
switch_status_t skinny_hold_active_calls(listener_t *listener);
|
||||
|
||||
/* SKINNY MESSAGE HANDLERS */
|
||||
|
||||
#endif /* _SKINNY_SERVER_H */
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user