<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Since Gosub is technically an application, you should be able to modify this snippet in features.conf<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>testfeature =&gt; #9,peer,Playback,tt-monkeys&nbsp; ;Allow both the caller and callee to play<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;tt-monkeys to the opposite channel<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>To this<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>testfeature =&gt; #9,peer,Gosub,play-monkeys,s,1&nbsp; ;Allow both the caller and callee to play<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;tt-monkeys to the opposite channel<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>And in extensions.conf add<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[play-monkeys]<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Exten =&gt; s,1,playback(tt-monkeys)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Exten =&gt; s,n,return()<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Olivier<br><b>Sent:</b> Friday, January 18, 2013 3:35 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] How to give users the capability to set CDR userfield for some calls<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>2013/1/17 Kevin Larsen &lt;<a href="mailto:kevin.larsen@pioneerballoon.com" target="_blank">kevin.larsen@pioneerballoon.com</a>&gt;<o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Possibly switch to using subroutines instead of Macros. Macros are being deprecated in place of subroutines.</span> <o:p></o:p></p><div><p class=MsoNormal><br><br>Interesting thing to try.<br>The trouble is I can't find any usable example of calling Gosub routines from features.conf's application map.<br>I've found old references explaining that this is not supported but I don't if it's still valid or not.<br><br>Any ex<br><br>&nbsp;<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><br>Kevin Larsen - Systems Analyst - Pioneer Balloon - Ph: <a href="tel:316-688-8208" target="_blank">316-688-8208</a></span> <br><br><br><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>From: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Olivier &lt;<a href="mailto:oza_4h07@yahoo.fr" target="_blank">oza_4h07@yahoo.fr</a>&gt;</span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>To: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Asterisk Users Mailing List - Non-Commercial Discussion &lt;<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a>&gt;, </span><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Date: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>01/17/2013 10:29 AM</span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Subject: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>[asterisk-users] How to give users the capability to set CDR &nbsp; &nbsp; &nbsp; &nbsp;userfield for some calls</span> <br><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#5F5F5F'>Sent by: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'><a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a></span> <o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" noshade style='color:#A0A0A0' align=center></div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hello,<br><br>To my surprise, with asterisk 1.8 (I've not tried with other versions), it seems you cannot set CDR's userfield from within a dialplan macro called by dynamic features.<br><br>See :<br><br>testfeature =&gt; *321,self/callee,Macro,toto<br><br>[macro-toto]<br>exten =&gt; s,1,Verbose(0,Into macro-toto with CDR(src) set to ${CDR(src)})<br>exten =&gt; s,n,Set(CDR(userfield)=foobar)<br><br>I'm planning to use this feature to let users mark in CDR an ongoing call as malicious or important or whatever.<br><br>Any hint ?<o:p></o:p></p></div></div><p class=MsoNormal>Regards<tt><span style='font-size:10.0pt'>--</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>_____________________________________________________________________</tt><br><tt>-- Bandwidth and Colocation Provided by </tt></span><a href="http://www.api-digital.com/" target="_blank"><tt><span style='font-size:10.0pt'>http://www.api-digital.com</span></tt></a><tt><span style='font-size:10.0pt'> --</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>New to Asterisk? Join us for a live introductory webinar every Thurs:</tt><br><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </tt></span><a href="http://www.asterisk.org/hello" target="_blank"><tt><span style='font-size:10.0pt'>http://www.asterisk.org/hello</span></tt></a><span style='font-size:10.0pt;font-family:"Courier New"'><br><br><tt>asterisk-users mailing list</tt><br><tt>To UNSUBSCRIBE or update options visit:</tt><br><tt>&nbsp; </tt></span><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"><tt><span style='font-size:10.0pt'>http://lists.digium.com/mailman/listinfo/asterisk-users</span></tt></a> <br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp; &nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>