<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][16773] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=16773">16773</a></dd>
<dt>Author</dt> <dd>sathieu</dd>
<dt>Date</dt> <dd>2010-02-24 06:01:31 -0600 (Wed, 24 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Milestone 3: Calls management: Add several messages structs
+ KeypadButtonMessage
+ StimulusMessage
+ OnHookMessage
+ OpenReceiveChannelAck
+ SoftKeyEventMessage
+ StartToneMessage
+ StopToneMessage
+ SetRingerMessage
+ SetLampMessage
+ SetSpeakerModeMessage
+ StartMediaTransmissionMessage
+ StopMediaTransmissionMessage
+ CallInfoMessage
+ OpenReceiveChannelMessage
+ SelectSoftKeysMessage
+ CallStateMessage
+ DisplayPromptStatusMessage
+ ClearPromptMessage
+ ActivateCallPlaneMessage
+ DialedNumberMessage</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyc">freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c (16772 => 16773)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c        2010-02-24 12:01:21 UTC (rev 16772)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c        2010-02-24 12:01:31 UTC (rev 16773)
</span><span class="lines">@@ -182,6 +182,29 @@
</span><span class="cx"> /* PortMessage */
</span><span class="cx"> #define PORT_MESSAGE 0x0002
</span><span class="cx">
</span><ins>+/* KeypadButtonMessage */
+#define KEYPAD_BUTTON_MESSAGE 0x0003
+struct keypad_button_message {
+        uint32_t button;
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+/* StimulusMessage */
+#define STIMULUS_MESSAGE 0x0005
+struct stimulus_message {
+        uint32_t type;
+        uint32_t instance;
+        uint32_t call_reference;
+};
+
+/* OnHookMessage */
+#define ON_HOOK_MESSAGE 0x0007
+struct on_hook_message {
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
</ins><span class="cx"> /* SpeedDialStatReqMessage */
</span><span class="cx"> #define SPEED_DIAL_STAT_REQ_MESSAGE 0x000A
</span><span class="cx"> struct speed_dial_stat_req_message {
</span><span class="lines">@@ -220,9 +243,26 @@
</span><span class="cx">         uint32_t alarm_param2;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/* OpenReceiveChannelAck */
+#define OPEN_RECEIVE_CHANNEL_ACK_MESSAGE 0x0022
+struct open_receive_channel_ack_message {
+        uint32_t status;
+        uint32_t ip;
+        uint32_t port;
+        uint32_t pass_thru_party_id;
+};
+
</ins><span class="cx"> /* SoftKeySetReqMessage */
</span><span class="cx"> #define SOFT_KEY_SET_REQ_MESSAGE 0x0025
</span><span class="cx">
</span><ins>+/* SoftKeyEventMessage */
+#define SOFT_KEY_EVENT_MESSAGE 0x0026
+struct soft_key_event_message {
+        uint32_t soft_key_event;
+        uint32_t line_instance;
+        uint32_t callreference;
+};
+
</ins><span class="cx"> /* UnregisterMessage */
</span><span class="cx"> #define UNREGISTER_MESSAGE 0x0027
</span><span class="cx">
</span><span class="lines">@@ -252,6 +292,126 @@
</span><span class="cx">         char reserved2[4];
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/* StartToneMessage */
+#define START_TONE_MESSAGE 0x0082
+struct start_tone_message {
+        uint32_t tone; /* see enum skinny_tone */
+        uint32_t reserved;
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+enum skinny_tone {
+        SKINNY_TONE_SILENCE = 0x00,
+        SKINNY_TONE_DIALTONE = 0x21,
+        SKINNY_TONE_BUSYTONE = 0x23,
+        SKINNY_TONE_ALERT = 0x24,
+        SKINNY_TONE_REORDER = 0x25,
+        SKINNY_TONE_CALLWAITTONE = 0x2D,
+        SKINNY_TONE_NOTONE = 0x7F,
+};
+
+/* StopToneMessage */
+#define STOP_TONE_MESSAGE 0x0083
+struct stop_tone_message {
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+/* SetRingerMessage */
+#define SET_RINGER_MESSAGE 0x0085
+struct set_ringer_message {
+        uint32_t ring_type; /* See enum skinny_ring_type */
+        uint32_t ring_status; /* See enum skinny_ring_status */
+        uint32_t unknown2;
+};
+
+enum skinny_ring_type {
+        SKINNY_RING_FOREVER = 1,
+        SKINNY_RING_ONCE = 2,
+};
+
+enum skinny_ring_status {
+        SKINNY_RING_OFF = 0,
+        SKINNY_RING_ON = 1,
+};
+
+/* SetLampMessage */
+#define SET_LAMP_MESSAGE 0x0086
+struct set_lamp_message {
+        uint32_t stimulus;
+        uint32_t stimulus_instance;
+        uint32_t mode; /* See enum skinny_lamp_mode */
+};
+
+enum skinny_lamp_mode {
+        SKINNY_LAMP_OFF = 1,
+        SKINNY_LAMP_ON = 2,
+        SKINNY_LAMP_WINK = 3,
+        SKINNY_LAMP_FLASH = 4,
+        SKINNY_LAMP_BLINK = 5,
+};
+
+/* SetSpeakerModeMessage */
+#define SET_SPEAKER_MODE_MESSAGE 0x0088
+struct set_speaker_mode_message {
+        uint32_t mode; /* See enum skinny_speaker_mode */
+};
+
+enum skinny_speaker_mode {
+        SKINNY_SPEAKER_ON = 1,
+        SKINNY_SPEAKER_OFF = 2,
+};
+
+/* StartMediaTransmissionMessage */
+#define START_MEDIA_TRANSMISSION_MESSAGE 0x008A
+struct start_media_transmission_message {
+        uint32_t conference_id;
+        uint32_t pass_thru_party_id;
+        uint32_t remote_ip;
+        uint32_t remote_port;
+        uint32_t ms_per_packet;
+        uint32_t payload_capacity;
+        uint32_t precedence;
+        uint32_t silence_suppression;
+        uint16_t max_frames_per_packet;
+        uint32_t g723_bitrate;
+        /* ... */
+};
+
+/* StopMediaTransmissionMessage */
+#define STOP_MEDIA_TRANSMISSION_MESSAGE 0x008B
+struct stop_media_transmission_message {
+        uint32_t conference_id;
+        uint32_t pass_thru_party_id;
+        /* ... */
+};
+
+/* CallInfoMessage */
+#define CALL_INFO_MESSAGE 0x008F
+struct call_info_message {
+        char calling_party_name[40];
+        char calling_party[24];
+        char called_party_name[40];
+        char called_party[24];
+        uint32_t line_instance;
+        uint32_t call_id;
+        uint32_t call_type; /* See enum skinny_call_type */
+        char original_called_party_name[40];
+        char original_called_party[24];
+        char last_redirecting_party_name[40];
+        char last_redirecting_party[24];
+        uint32_t original_called_party_redirect_reason;
+        uint32_t last_redirecting_reason;
+        char calling_party_voice_mailbox[24];
+        char called_party_voice_mailbox[24];
+        char original_called_party_voice_mailbox[24];
+        char last_redirecting_voice_mailbox[24];
+        uint32_t call_instance;
+        uint32_t call_security_status;
+        uint32_t party_pi_restriction_bits;
+};
+
</ins><span class="cx"> /* SpeedDialStatMessage */
</span><span class="cx"> #define SPEED_DIAL_STAT_RES_MESSAGE 0x0091
</span><span class="cx"> struct speed_dial_stat_res_message {
</span><span class="lines">@@ -295,6 +455,17 @@
</span><span class="cx"> /* KeepAliveAckMessage */
</span><span class="cx"> #define KEEP_ALIVE_ACK_MESSAGE 0x0100
</span><span class="cx">
</span><ins>+/* OpenReceiveChannelMessage */
+#define OPEN_RECEIVE_CHANNEL_MESSAGE 0x0105
+struct open_receive_channel_message {
+        uint32_t conference_id;
+        uint32_t pass_thru_party_id;
+        uint32_t packets;
+        uint32_t payload_capacity;
+        uint32_t echo_cancel_type;
+        uint32_t g723_bitrate;
+};
+
</ins><span class="cx"> /* SoftKeyTemplateResMessage */
</span><span class="cx"> #define SOFT_KEY_TEMPLATE_RES_MESSAGE 0x0108
</span><span class="cx">
</span><span class="lines">@@ -325,6 +496,66 @@
</span><span class="cx">         uint32_t res;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+/* SelectSoftKeysMessage */
+#define SELECT_SOFT_KEYS_MESSAGE 0x0110
+struct select_soft_keys_message {
+        uint32_t line_instance;
+        uint32_t call_id;
+        uint32_t soft_key_set; /* See enum skinny_key_set */
+        uint32_t validKeyMask;
+};
+
+enum skinny_key_set {
+        SKINNY_KEY_SET_ON_HOOK = 0,
+        SKINNY_KEY_SET_CONNECTED = 1,
+        SKINNY_KEY_SET_ON_HOLD = 2,
+        SKINNY_KEY_SET_RING_IN = 3,
+        SKINNY_KEY_SET_OFF_HOOK = 4,
+        SKINNY_KEY_SET_CONNECTED_WITH_TRANSFER = 5,
+        SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT = 6,
+        SKINNY_KEY_SET_CONNECTED_WITH_CONFERENCE = 7,
+        SKINNY_KEY_SET_RING_OUT = 8,
+        SKINNY_KEY_SET_OFF_HOOK_WITH_FEATURES = 9,
+};
+
+/* CallStateMessage */
+#define CALL_STATE_MESSAGE 0x0111
+struct call_state_message {
+        uint32_t call_state;
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+/* DisplayPromptStatusMessage */
+#define DISPLAY_PROMPT_STATUS_MESSAGE 0x0112
+struct display_prompt_status_message {
+        uint32_t timeout;
+        char display[32];
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+/* ClearPromptMessage */
+#define CLEAR_PROMPT_MESSAGE 0x0113
+struct clear_prompt_message {
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
+/* ActivateCallPlaneMessage */
+#define ACTIVATE_CALL_PLANE_MESSAGE 0x0116
+struct activate_call_plane_message {
+        uint32_t line_instance;
+};
+
+/* DialedNumberMessage */
+#define DIALED_NUMBER_MESSAGE 0x011D
+struct dialed_number_message {
+        char called_party[24];
+        uint32_t line_instance;
+        uint32_t call_id;
+};
+
</ins><span class="cx"> /* Message */
</span><span class="cx"> #define SKINNY_MESSAGE_FIELD_SIZE 4 /* 4-bytes field */
</span><span class="cx"> #define SKINNY_MESSAGE_HEADERSIZE 12 /* three 4-bytes fields */
</span><span class="lines">@@ -332,19 +563,39 @@
</span><span class="cx">
</span><span class="cx"> union skinny_data {
</span><span class="cx">         struct register_message reg;
</span><del>-        struct headset_status_message headset_status;
-        struct register_available_lines_message reg_lines;
-        struct register_ack_message reg_ack;
</del><ins>+        struct keypad_button_message keypad_button;
+        struct stimulus_message stimulus;
+        struct on_hook_message on_hook;
</ins><span class="cx">         struct speed_dial_stat_req_message speed_dial_req;
</span><span class="cx">         struct line_stat_req_message line_req;
</span><span class="cx">         struct capabilities_res_message cap_res;
</span><span class="cx">         struct alarm_message alarm;
</span><ins>+        struct open_receive_channel_ack_message open_receive_channel_ack;
+        struct soft_key_event_message soft_key_event;
+        struct headset_status_message headset_status;
+        struct register_available_lines_message reg_lines;
+        struct register_ack_message reg_ack;
+        struct start_tone_message start_tone;
+        struct stop_tone_message stop_tone;
+        struct set_ringer_message ringer;
+        struct set_lamp_message lamp;
+        struct set_speaker_mode_message speaker_mode;
+        struct start_media_transmission_message start_media;
+        struct stop_media_transmission_message stop_media;
+        struct call_info_message call_info;
</ins><span class="cx">         struct speed_dial_stat_res_message speed_dial_res;
</span><span class="cx">         struct line_stat_res_message line_res;
</span><span class="cx">         struct button_template_message button_template;
</span><span class="cx">         struct register_rej_message reg_rej;
</span><ins>+        struct open_receive_channel_message open_receive_channel;
</ins><span class="cx">         struct soft_key_template_res_message soft_key_template;
</span><span class="cx">         struct soft_key_set_res_message soft_key_set;
</span><ins>+        struct select_soft_keys_message select_soft_keys;
+        struct call_state_message call_state;
+        struct display_prompt_status_message display_prompt_status;
+        struct clear_prompt_message clear_prompt;
+        struct activate_call_plane_message activate_call_plane;
+        struct dialed_number_message dialed_number;
</ins><span class="cx">         
</span><span class="cx">         uint16_t as_uint16;
</span><span class="cx">         char as_char;
</span><span class="lines">@@ -1687,7 +1938,6 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> static switch_status_t skinny_handle_unregister(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><span class="cx">         switch_event_t *event = NULL;
</span><span class="lines">@@ -1709,6 +1959,7 @@
</span><span class="cx">         switch(request->type) {
</span><span class="cx">                 case ALARM_MESSAGE:
</span><span class="cx">                         return skinny_handle_alarm(listener, request);
</span><ins>+                /* registering phase */
</ins><span class="cx">                 case REGISTER_MESSAGE:
</span><span class="cx">                         return skinny_handle_register(listener, request);
</span><span class="cx">                 case HEADSET_STATUS_MESSAGE:
</span><span class="lines">@@ -1729,8 +1980,10 @@
</span><span class="cx">                         return skinny_handle_speed_dial_request(listener, request);
</span><span class="cx">                 case REGISTER_AVAILABLE_LINES_MESSAGE:
</span><span class="cx">                         return skinny_handle_register_available_lines_message(listener, request);
</span><ins>+                /* live phase */
</ins><span class="cx">                 case KEEP_ALIVE_MESSAGE:
</span><span class="cx">                         return skinny_handle_keep_alive_message(listener, request);
</span><ins>+                /* end phase */
</ins><span class="cx">                 case UNREGISTER_MESSAGE:
</span><span class="cx">                         return skinny_handle_unregister(listener, request);
</span><span class="cx">                 default:
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>