From: Tilghman Lesher Date: Tue, 25 Dec 2007 02:57:58 +0000 (+0000) Subject: Add channel thread ID to the information passed to AGI. X-Git-Tag: 1.6.0-beta1~3^2~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba57c36bbb41783d9d02a44517466d361c776cc6;p=thirdparty%2Fasterisk.git Add channel thread ID to the information passed to AGI. Reported by: dror99 Patch by: tilghman (Closes issue #11162) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94771 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_agi.c b/res/res_agi.c index 9747bdb116..6fa0d7d356 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -32,6 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include #include #include +#include #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}) */