if (!dest) {
if (backspace) { /* backspace */
*tech_pvt->caller_profile->destination_number++ = '\0';
+ send_back_space_request(listener, line_instance, tech_pvt->call_id);
}
if (append_dest != '\0' && !backspace) {/* append digit */
tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool,
send_start_tone(listener, SKINNY_TONE_DIALTONE, 0, line_instance, tech_pvt->call_id);
if(backspace) {
send_select_soft_keys(listener, line_instance, tech_pvt->call_id, SKINNY_KEY_SET_OFF_HOOK, 0xffff);
- /* TODO: How to clear the screen? */
}
} else if (strlen(tech_pvt->caller_profile->destination_number) == 1) {/* first digit */
send_stop_tone(listener, line_instance, tech_pvt->call_id);
return skinny_send_reply(listener, message);
}
+switch_status_t send_back_space_request(listener_t *listener,
+ uint32_t line_instance,
+ uint32_t call_id)
+{
+ skinny_message_t *message;
+ message = switch_core_alloc(listener->pool, 12+sizeof(message->data.back_space_req));
+ message->type = BACK_SPACE_REQ_MESSAGE;
+ message->length = 4 + sizeof(message->data.back_space_req);
+ message->data.back_space_req.line_instance = line_instance;
+ message->data.back_space_req.call_id = call_id;
+ return skinny_send_reply(listener, message);
+
+}
+
switch_status_t send_dialed_number(listener_t *listener,
char called_party[24],
uint32_t line_instance,
uint32_t unregister_status;
};
+/* BackSpaceReqMessage */
+#define BACK_SPACE_REQ_MESSAGE 0x0119
+struct back_space_req_message {
+ uint32_t line_instance;
+ uint32_t call_id;
+};
+
/* DialedNumberMessage */
#define DIALED_NUMBER_MESSAGE 0x011D
struct dialed_number_message {
struct clear_prompt_status_message clear_prompt_status;
struct activate_call_plane_message activate_call_plane;
struct unregister_ack_message unregister_ack;
+ struct back_space_req_message back_space_req;
struct dialed_number_message dialed_number;
struct feature_stat_res_message feature_res;
struct display_pri_notify_message display_pri_notify;
uint32_t call_id);
switch_status_t send_activate_call_plane(listener_t *listener,
uint32_t line_instance);
+switch_status_t send_back_space_request(listener_t *listener,
+ uint32_t line_instance,
+ uint32_t call_id);
switch_status_t send_dialed_number(listener_t *listener,
char called_party[24],
uint32_t line_instance,
{"ClearPromptStatusMessage", CLEAR_PROMPT_STATUS_MESSAGE},
{"ActivateCallPlaneMessage", ACTIVATE_CALL_PLANE_MESSAGE},
{"UnregisterAckMessage", UNREGISTER_ACK_MESSAGE},
+ {"BackSpaceReqMessage", BACK_SPACE_REQ_MESSAGE},
{"DialedNumberMessage", DIALED_NUMBER_MESSAGE},
{"FeatureResMessage", FEATURE_STAT_RES_MESSAGE},
{"DisplayPriNotifyMessage", DISPLAY_PRI_NOTIFY_MESSAGE},
}
-struct skinny_table SKINNY_MESSAGE_TYPES[56];
+struct skinny_table SKINNY_MESSAGE_TYPES[57];
const char *skinny_message_type2str(uint32_t id);
uint32_t skinny_str2message_type(const char *str);
#define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)