// Play a file (8000 samples/sec, 16 bit unsigned, mono PCM) bool playFile(char* szFile, SIPX_CALL hCall) { bool bRC = false ; sipxCallPlayFile(hCall, g_szFile, true, true) ; return true ; }
int CallPlayFileCommand::execute(int argc, char* argv[]) { int commandStatus = CommandProcessor::COMMAND_FAILED; if(argc == 5) { if(sipxCallPlayFile(atoi(argv[1]), argv[2], atoi(argv[3]), atoi(argv[4])) == SIPX_RESULT_SUCCESS) { printf("File with filename: %s is being played.\n", argv[2]); } else { printf("File with filename: %s was unable to be played.\n", argv[2]); } } else { UtlString usage; getUsage(argv[0], &usage); printf("%s", usage.data()); commandStatus = CommandProcessor::COMMAND_BAD_SYNTAX; } return commandStatus; }