diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-25 02:57:58 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-25 02:57:58 +0000 |
commit | d98d8ea32fb0b758ae06c0a244b9254827d7b10f (patch) | |
tree | ba4d1e6b2fcb23a93a22f6f9ad2876259837ce9b /res | |
parent | ce3def5acbef47bef1106cddcf896b8651847915 (diff) |
Add channel thread ID to the information passed to AGI.
Reported by: dror99
Patch by: tilghman
(Closes issue #11162)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94771 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_agi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index 9747bdb11..6fa0d7d35 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -32,6 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/time.h> #include <sys/wait.h> #include <sys/stat.h> +#include <pthread.h> #include "asterisk/paths.h" /* use many ast_config_AST_*_DIR */ #include "asterisk/network.h" @@ -392,6 +393,7 @@ static void setup_env(struct ast_channel *chan, char *request, int fd, int enhan /* User information */ ast_agi_fdprintf(chan, fd, "agi_accountcode: %s\n", chan->accountcode ? chan->accountcode : ""); + ast_agi_fdprintf(chan, fd, "agi_threadid: %ld\n", (long)pthread_self()); /* Send any parameters to the fastagi server that have been passed via the agi application */ /* Agi application paramaters take the form of: AGI(/path/to/example/script|${EXTEN}) */ |