mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-23 12:18:33 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1413 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f09491a69b
commit
c1d0488201
@ -800,7 +800,7 @@ static switch_status_t place_call(char *dest, switch_stream_handle_t *stream)
|
|||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
|
|
||||||
if (!dest) {
|
if (!dest) {
|
||||||
strncpy(out, "Usage: pacall <exten>", outlen - 1);
|
stream->write_function(stream, "Usage: pacall <exten>");
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -957,7 +957,7 @@ static switch_status_t call_info(char *callid, switch_stream_handle_t *stream)
|
|||||||
print_info(tech_pvt, stream);
|
print_info(tech_pvt, stream);
|
||||||
}
|
}
|
||||||
} else if (callid && (tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
|
} else if (callid && (tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
|
||||||
print_info(tech_pvt, out, outlen);
|
print_info(tech_pvt, stream);
|
||||||
} else {
|
} else {
|
||||||
stream->write_function(stream, "NO SUCH CALL");
|
stream->write_function(stream, "NO SUCH CALL");
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,8 @@ static int on_msg(void *user_data, ikspak * pak)
|
|||||||
{
|
{
|
||||||
char *cmd = iks_find_cdata(pak->x, "body");
|
char *cmd = iks_find_cdata(pak->x, "body");
|
||||||
char *arg = NULL;
|
char *arg = NULL;
|
||||||
char retbuf[1024] = "";
|
switch_stream_handle_t stream = {0};
|
||||||
|
char retbuf[2048] = "";
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if ((p = strchr(cmd, '\r')) != 0) {
|
if ((p = strchr(cmd, '\r')) != 0) {
|
||||||
@ -235,7 +236,10 @@ static int on_msg(void *user_data, ikspak * pak)
|
|||||||
*arg++ = '\0';
|
*arg++ = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_api_execute(cmd, arg, retbuf, sizeof(retbuf));
|
stream.data = retbuf;
|
||||||
|
stream.end = stream.data;
|
||||||
|
stream.data_size = sizeof(retbuf);
|
||||||
|
switch_api_execute(cmd, arg, &stream);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user