" call_state INTEGER\n"
");\n";
+/*****************************************************************************/
+/* TEXT FUNCTIONS */
+/*****************************************************************************/
+char *skinny_expand_textid(const char *str)
+{
+ char *tmp;
+ int i;
+
+ /* Look for \200, if found, next character indicates string id */
+ char match = (char) 128;
+
+ tmp = switch_mprintf("");
+
+ if (zstr(str)) {
+ return tmp;
+ }
+
+ for (i=0; i<strlen(str); i++)
+ {
+ char *old = tmp;
+
+ if ( str[i] == match ) {
+ if ( tmp[0] ) {
+ tmp = switch_mprintf("%s [%s] ", old, skinny_textid2str(str[i+1]));
+ } else {
+ tmp = switch_mprintf("[%s] ", skinny_textid2str(str[i+1]));
+ }
+ switch_safe_free(old);
+ i++;
+ } else {
+ tmp = switch_mprintf("%s%c", old, str[i]);
+ switch_safe_free(old);
+ }
+ }
+
+ return tmp;
+}
+
/*****************************************************************************/
/* PROFILES FUNCTIONS */
/*****************************************************************************/
switch_endpoint_interface_t *skinny_get_endpoint_interface();
/*****************************************************************************/
-/* MODULE FUNCTIONS */
+/* TEXT FUNCTIONS */
/*****************************************************************************/
#define skinny_textid2raw(label) (label > 0 ? switch_mprintf("\200%c", label) : switch_mprintf(""))
+char *skinny_expand_textid(const char *str);
#endif /* _MOD_SKINNY_H */
uint32_t call_id)
{
skinny_message_t *message;
+ char *tmp;
+
message = switch_core_alloc(listener->pool, 12+sizeof(message->data.display_prompt_status));
message->type = DISPLAY_PROMPT_STATUS_MESSAGE;
message->length = 4 + sizeof(message->data.display_prompt_status);
message->data.display_prompt_status.line_instance = line_instance;
message->data.display_prompt_status.call_id = call_id;
+ tmp = skinny_expand_textid(display);
+
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
"Send Display Prompt Status with Timeout (%d), Display (%s), Line Instance (%d), Call ID (%d)\n",
- timeout, display, line_instance, call_id);
+ timeout, tmp, line_instance, call_id);
+
+ switch_safe_free(tmp);
return skinny_send_reply_quiet(listener, message);
}