switch_core_session_add_stream(session,NULL); channel = switch_core_session_get_channel(session); tech_pvt = (private_t*) switch_core_session_alloc(session,sizeof(*tech_pvt)); p = switch_core_session_strdup(session, modem->digits);if(*p =='*') { ani = p +1;if((digits =strchr(...
WSChannel *wsChannel =NULL;// 创建channel// switch_memory_pool_t *pool = switch_core_session_get_pool(session);wsChannel = (WSChannel *)switch_core_alloc(mpPool,sizeof(WSChannel)); wsChannel->session = session; wsChannel->parser =this; wsChannel->uuid_str = switch_core_strdup(mpPool...
caller_channel=switch_core_session_get_channel(caller_session);if(*exten =='&'&& *(exten +1)) { switch_caller_extension_t*extension =NULL;char*app_name = switch_core_session_strdup(caller_session, (exten +1));char*arg = NULL, *e;if((e = strchr(app_name,')'))) {*e ='\0';...
switch_channel_hangup(switch_core_session_get_channel(session), cause); } else { switch_ivr_schedule_hangup(when, switch_core_session_get_uuid(session), cause, bleg); } } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No time specified.\n"); } } ...
channel->name = switch_core_session_strdup(channel->session, name); switch_channel_set_variable(channel, SWITCH_CHANNEL_NAME_VARIABLE, name); if (old) { switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_NOTICE, "Rename Channel %s->%s [%s]\n", old, name, uuid); ...
(mydata = switch_core_session_strdup(session, data))) { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Params!\n"); return; } argc = switch_separate_string(mydata, '|', argv, sizeof(argv) / sizeof(argv[0])); if (argc == 0) { switch_log_...
channel->name = switch_core_session_strdup(channel->session, name); switch_channel_set_variable(channel, SWITCH_CHANNEL_NAME_VARIABLE, name); if (old) { switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_NOTICE, "Rename Channel %s->%s [%s]\n", old, name, uuid); ...
char *uuid = switch_core_session_get_uuid(channel->session); channel->name = switch_core_session_strdup(channel->session, name); switch_channel_set_variable(channel, SWITCH_CHANNEL_NAME_VARIABLE, name); if (old) { switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_NOTICE, ...
#defineSYNTAX_PLAYBACK "<path> <offset>"SWITCH_STANDARD_APP(playback_function){switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"**playback_function**\n");intargc;char*argv[2]={0};char*mydata;if(!zstr(data)&&(mydata=switch_core_session_strdup(session,data))){if((argc=switch_...
channel->name = switch_core_session_strdup(channel->session, name); switch_channel_set_variable(channel, SWITCH_CHANNEL_NAME_VARIABLE, name); if (old) { switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_NOTICE, "Rename Channel %s->%s [%s]\n", old, name, uuid); ...