You can use modules like ESP32 with a FreeRTOS system to do such calling tasks and answer them independently, and then you can develop your system based on an RTOS system. Of course, you can also use such a module as part of the ESP32 system, use the serial port to communicate with it, and use the AT command or custom commands to complete the relevant task. However, such a communication module is open source, and you can develop mobile network or network applications based on such a module.
Here's a partial entry point for a test function:
cm_cmd_t cmd_vector[] = {
{"FWRITE", cm_test_write_file}, //CM:FWRITE
{"FREAD", cm_test_read_file}, //CM:FREAD
{"FMOVE", cm_test_move_file}, //CM:FMOVE
{"FDELETE", cm_test_delete_file}, //CM:FDELETE
{"GPIO_READ", cm_test_gpio_read},//CM:GPIO_READ:NUM:iomuxpin:iomuxfun
{"GPIO_WRITE", cm_test_gpio_write},//CM:GPIO_WRITE:NUM:iomuxpin:iomuxfun:value
{"GPIO_IRQ", cm_test_gpio_irq},//CM:GPIO_IRQ:NUM:iomuxpin:iomuxfun
{"GPIO_DEINIT", cm_test_gpio_deinit},//CM:GPIO_DEINIT:NUM
{"PM_REBOOT", cm_test_pm_reboot},//CM:PM_REBOOT
{"PM_POWEROFF", cm_test_pm_poweroff},//CM:PM_POWEROFF
{"PM_REASON", cm_test_pm_power_on_reason},//CM:PM_REASON
{"PM_SLEEP", cm_test_sleep_or_wakeup_enable},//CM:PM_SLEEP
{"PM_POWERKEY", cm_test_pm_powerkey},//CM:PM_POWERKEY
{"KEYPAD", cm_test_keypad},//CM:KEYPAD:5:0:1:2:3:4:5:0:1:2:3:4
{"PWM_OPEN", cm_test_pwm_start},//CM:PWM_OPEN:dev:period:period_h
{"PWM_CLOSE", cm_test_pwm_close},//CM:PWM_CLOSE:dev
{"LBS", cm_test_lbs_start},//CM:PLBS
{"HTTP", cm_test_http}, //CM:HTTP:operation
{"MQTT", cm_test_mqtt}, //CM:MQTT:...
{"ASOCKET", cm_test_asocket_cmd}, //CM:ASOCKET:...
{"VIRT_AT", cm_virt_at_test}, //CM:VIRT_AT:AT+xxxx
{"ATD", cm_demo_atd_call}, //CM:ATD
{"UPCNF", cm_demo_update_config}, //CM:UPCNF
{"KLBS", cm_demo_get_lbs_interval}, //CM:LBS
{"GETLBS", cm_kmy_lbs_start}, //CM:GETLBS
{"PIN_CMD", cm_test_pin_cmd},
{"NTP", cm_test_ntp}, //CM:NTP:operation
{"I2C", cm_test_i2c}, //CM:I2C
{"ADC", cm_test_adc}, //CM:ADC
{"SPI", cm_test_spi}, //CM:SPI
{"LCD", cm_test_lcd}, //CM:LCD
{"FOTA", cm_test_fota}, //CM:FOTA:operation
{"TTS", cm_test_tts}, //CM:TTS:operation
{"cJSON", cm_test_cJSON}, //CM:cJSON
{"FTP", cm_test_ftp} //CM:FTP
};
In addition to using the serial port for communication, there are also interfaces that support USB and PCIe.
The following function shows you how to call the group you want to call.
void cm_demo_atd_call(unsigned char **cmd,int len)
{
char at_operation[25] = {0};
snprintf(at_operation,sizeof(at_operation),"ATD%s;rn",phone_array[phone_index++]); // phone_array the group you want to call
if(cm_virt_at_init(oc_resp_cb)!=0)
{
cm_demo_printf("rnvirt_at_init:ATD-ERRrn");
return;
}
//cm_virt_at_urc_reg(oc_resp_urc_cb);
send_len = cm_virt_at_send((uint8_t *)at_operation,sizeof(at_operation));
if(send_len < 0)
{
cm_demo_printf("rnvirt_at_send:ATD-ERRrn");
cm_virt_at_deinit();
return;
}
}