3 @@ -114,7 +114,44 @@ static int app_send_sms_exec (attribute_
7 +static int app_send_ussd_exec (attribute_unused struct ast_channel* channel, const char* data)
14 + AST_DECLARE_APP_ARGS (args,
15 + AST_APP_ARG (device);
19 + if (ast_strlen_zero (data))
24 + parse = ast_strdupa (data);
26 + AST_STANDARD_APP_ARGS (args, parse);
28 + if (ast_strlen_zero (args.device))
30 + ast_log (LOG_ERROR, "NULL device for ussd -- USSD will not be sent\n");
34 + if (ast_strlen_zero (args.ussd))
36 + ast_log (LOG_ERROR, "NULL ussd command -- USSD will not be sent\n");
40 + msg = send_ussd(args.device, args.ussd, &status, &msgid);
42 + ast_log (LOG_ERROR, "[%s] %s with id %p\n", args.device, msg, msgid);
46 static const struct dongle_application
48 @@ -144,7 +181,15 @@ static const struct dongle_application
49 " Message - text of the message\n"
50 " Validity - Validity period in minutes\n"
51 " Report - Boolean flag for report request\n"
57 + "DongleSendUSSD(Device,USSD)",
58 + "DongleSendUSSD(Device,USSD)\n"
59 + " Device - Id of device from dongle.conf\n"
60 + " USSD - ussd command\n"
64 #if ASTERISK_VERSION_NUM >= 10800