A J Stiles
2010-Dec-20 16:33 UTC
[asterisk-users] Setting `userfield` from within a callfile
Our current Asterisk 1.6.2.9 setup includes a CGI auto-dial application (written by someone else before me) which sets up calls by creating files of the general form Channel: SIP/$INSIDE_NUMBER Context: $CONTEXT Extension: $OUTSIDE_NUMBER Priority: 1 CallerId: $INSIDE_NUMBER in /var/spool/asterisk/outgoing/ . It works very well. However, it would be nice to be able to attach an additional piece of information along with the call record There is a userfield in the SQL database, which is a VARCHAR(255) and would be plenty for what we need. Is there a way to set the userfield of the CDR database from within such a callfile? -- AJS
2010/12/20 A J Stiles <asterisk_list at earthshod.co.uk>> Our current Asterisk 1.6.2.9 setup includes a CGI auto-dial application > (written by someone else before me) which sets up calls by creating files > of > the general form > > Channel: SIP/$INSIDE_NUMBER > Context: $CONTEXT > Extension: $OUTSIDE_NUMBER > Priority: 1 > CallerId: $INSIDE_NUMBER > > in /var/spool/asterisk/outgoing/ . > > It works very well. However, it would be nice to be able to attach an > additional piece of information along with the call record There is a > userfield in the SQL database, which is a VARCHAR(255) and would be plenty > for what we need. Is there a way to set the userfield of the CDR database > from within such a callfile? >Yes, adding a Set field in your call file (see http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out), you'll be able to pass everything you need to your dialplan, and then, from there, write everything you need to your CDR. Cheers> > -- > AJS > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101220/e3408c54/attachment.htm>
Tilghman Lesher
2010-Dec-20 18:15 UTC
[asterisk-users] Setting `userfield` from within a callfile
On Monday 20 December 2010 10:33:33 A J Stiles wrote:> Our current Asterisk 1.6.2.9 setup includes a CGI auto-dial application > (written by someone else before me) which sets up calls by creating > files of the general form > > Channel: SIP/$INSIDE_NUMBER > Context: $CONTEXT > Extension: $OUTSIDE_NUMBER > Priority: 1 > CallerId: $INSIDE_NUMBER > > in /var/spool/asterisk/outgoing/ . > > It works very well. However, it would be nice to be able to attach an > additional piece of information along with the call record There is a > userfield in the SQL database, which is a VARCHAR(255) and would be > plenty for what we need. Is there a way to set the userfield of the > CDR database from within such a callfile?As is stated within sample.call (in the root directory of the Asterisk source): # # You can set channel variables that will be passed to the channel. # This includes writable dialplan functions. To set a writable dialplan # function, the module containing this function *must* be loaded. # #Set: file1=/tmp/to #Set: file2=/tmp/msg #Set: timestamp=20021023104500 #Set: CDR(userfield,r)=42 -- Tilghman