aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/cdr.h
diff options
context:
space:
mode:
authoranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-22 20:59:38 +0000
committeranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-22 20:59:38 +0000
commit56467260392efd129b41efbf5b7f111ffca751bd (patch)
treed1889cfa957277c7fc802e1b4369b6ae7b79a913 /include/asterisk/cdr.h
parent82cbe0bd521fca4d6e20d1a7a00da1441b1fc574 (diff)
This patch adds a new api call:
int pbx_builtin_serialize_variables(struct ast_channel *chan, char *buf, size_t size); takes a chan and a char * 'buf' assumed to be 'size' bytes. The function fills 'buf' with a <CR>('\n') delimited list of name,value pairs in turn delimeted by '=' eg: SIPCALLID=f30e4e72-f715193f@1.2.3.4 SIPUSERAGENT=Sipura/SPA2000-2.0.6(c) SIPDOMAIN=1.2.3.4 It returns the acutal number of variables encountered. If the attempt to fill 'buf' goes beyond 'size' bytes the operation is halted and the incomplete string is returned as is. To demonstrate a use for this, the "show channel <channame>" command has been retrofitted with the call so it also dumps all of the chan's vars *CLI> show channel Zap/5-1 -- General -- Name: Zap/5-1 Type: Zap UniqueID: 1098480666.17 Caller ID: 4999 Caller ID Name: Tony DNID Digits: (N/A) State: Up (6) Rings: 0 NativeFormat: 68 WriteFormat: 4 ReadFormat: 4 1st File Descriptor: 22 Frames in: 41969 Frames out: 83240 Time to Hangup: 0 Elapsed Time: 0h13m54s -- PBX -- Context: phone1 Extension: 4994 Priority: 2 Call Group: 2 Pickup Group: 2 Application: Dial Data: IAX2/ulaw@cube1/00010014994@croip Stack: 0 Blocking in: ast_waitfor_nandfds Variables: DIALEDPEERNUMBER=ulaw@cube1/00010014994@croip DIALEDPEERNAME=IAX2/cube1/3 CALLTYPE=SPEECH tempvar=tempval git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4051 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/cdr.h')
-rwxr-xr-xinclude/asterisk/cdr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h
index 807ad6419..6c0d12319 100755
--- a/include/asterisk/cdr.h
+++ b/include/asterisk/cdr.h
@@ -78,6 +78,7 @@ struct ast_cdr {
char uniqueid[32];
/* User field */
char userfield[AST_MAX_USER_FIELD];
+ struct ast_channel *chan;
struct ast_cdr *next;
};