From Eratic Goat, 9 Years ago, written in Plain Text.
- view diff
Embed
  1.  
  2. static switch_digit_action_target_t str2target(const char *target_str)
  3. {
  4.         if (!strcasecmp(target_str, "peer")) {
  5.                 return DIGIT_TARGET_PEER;
  6.         }
  7.  
  8.         if (!strcasecmp(target_str, "both")) {
  9.                 return DIGIT_TARGET_BOTH;
  10.         }
  11.  
  12.         return DIGIT_TARGET_SELF;
  13. }
  14.  
  15. #define CLEAR_DIGIT_ACTION_USAGE "<realm>|all[,target]"
  16. SWITCH_STANDARD_APP(clear_digit_action_function)
  17. {
  18.         //switch_channel_t *channel = switch_core_session_get_channel(session);
  19.         switch_ivr_dmachine_t *dmachine;
  20.         char *realm = NULL;
  21.         char *target_str;
  22.         switch_digit_action_target_t target = DIGIT_TARGET_SELF;
  23.  
  24.         if (zstr((char *)data)) {
  25.                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "clear_digit_action called with no args");
  26.                 return;
  27.         }
  28.  

Replies to Untitled rss

Title Name Language When
Re: Untitled Funky Motmot c 9 Years ago.