<div dir="ltr">you should set variable in extensions.conf not in features.conf</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 7:34 PM, Carlos Chavez <span dir="ltr"><<a href="mailto:cursor@telecomabmex.com" target="_blank">cursor@telecomabmex.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Right now it is a simple call between 2 extensions. The receiving<br>
extension dials the code. The 3rd line of my h extension is a<br>
Noop(${CRD(userfield)})<br>
<br>
pbxoficina*CLI> features reload<br>
== Parsing '/etc/asterisk/features.conf': == Found<br>
== Registered Feature 'cita1'<br>
== Mapping Feature 'cita1' to app 'SET(CDR(userfield)=111)' with<br>
code '#111'<br>
== Registered Feature 'cita2'<br>
== Mapping Feature 'cita2' to app 'Noop(${CDR(src)})' with code '#112'<br>
== Registered Feature 'cita3'<br>
== Mapping Feature 'cita3' to app 'AGI(pin.agi,113)' with code '#113'<br>
== Registered group 'cita'<br>
== Registered feature 'cita1' for group 'cita' at exten '#111'<br>
== Registered feature 'cita2' for group 'cita' at exten '#112'<br>
== Registered feature 'cita3' for group 'cita' at exten '#113'<br>
-- Added extension '700' priority 1 to parkedcalls<br>
-- Added extension '701' priority -1 to parkedcalls<br>
-- Added extension '702' priority -1 to parkedcalls<br>
-- Added extension '703' priority -1 to parkedcalls<br>
-- Added extension '704' priority -1 to parkedcalls<br>
-- Added extension '705' priority -1 to parkedcalls<br>
-- Added extension '706' priority -1 to parkedcalls<br>
-- Added extension '707' priority -1 to parkedcalls<br>
-- Added extension '708' priority -1 to parkedcalls<br>
-- Added extension '709' priority -1 to parkedcalls<br>
-- Added extension '710' priority -1 to parkedcalls<br>
-- Added extension '711' priority -1 to parkedcalls<br>
-- Added extension '712' priority -1 to parkedcalls<br>
-- Added extension '713' priority -1 to parkedcalls<br>
-- Added extension '714' priority -1 to parkedcalls<br>
-- Added extension '715' priority -1 to parkedcalls<br>
-- Added extension '716' priority -1 to parkedcalls<br>
-- Added extension '717' priority -1 to parkedcalls<br>
-- Added extension '718' priority -1 to parkedcalls<br>
-- Added extension '719' priority -1 to parkedcalls<br>
-- Added extension '720' priority -1 to parkedcalls<br>
== Using SIP RTP TOS bits 184<br>
== Using SIP RTP CoS mark 5<br>
-- Executing [2001@oficina:1] Macro("SIP/2003-0000000e",<br>
"stdexten,2001,SIP/2001") in new stack<br>
-- Executing [s@macro-stdexten:1] NoOp("SIP/2003-0000000e",<br>
"LLamada a extension estandar 2001") in new stack<br>
-- Executing [s@macro-stdexten:2] NoOp("SIP/2003-0000000e",<br>
"LLamada desde: "Carlos Chavez" <2003>") in new stack<br>
-- Executing [s@macro-stdexten:3] GotoIf("SIP/2003-0000000e",<br>
"0?UNAVAIL") in new stack<br>
-- Executing [s@macro-stdexten:4] GotoIf("SIP/2003-0000000e",<br>
"0?DESVIO") in new stack<br>
-- Executing [s@macro-stdexten:5] GotoIf("SIP/2003-0000000e",<br>
"0?FOLLOWME") in new stack<br>
-- Executing [s@macro-stdexten:6] Dial("SIP/2003-0000000e",<br>
"SIP/2001,25,tWw") in new stack<br>
== Using SIP RTP TOS bits 184<br>
== Using SIP RTP CoS mark 5<br>
-- Called SIP/2001<br>
== Extension Changed 2001[hints] new state Ringing for Notify User 4000<br>
-- SIP/2001-0000000f is ringing<br>
-- SIP/2001-0000000f answered SIP/2003-0000000e<br>
== Extension Changed 2001[hints] new state InUse for Notify User 4000<br>
[Apr 11 11:56:44] WARNING[5184]: translate.c:206 framein: no samples<br>
for ulawtolin<br>
-- Launched AGI Script /var/lib/asterisk/agi-bin/pin.agi<br>
<SIP/2003-0000000e>AGI Tx >> agi_request: pin.agi<br>
<SIP/2003-0000000e>AGI Tx >> agi_channel: SIP/2003-0000000e<br>
<SIP/2003-0000000e>AGI Tx >> agi_language: en<br>
<SIP/2003-0000000e>AGI Tx >> agi_type: SIP<br>
<SIP/2003-0000000e>AGI Tx >> agi_uniqueid: 1365699403.18<br>
<SIP/2003-0000000e>AGI Tx >> agi_version: 1.8.15.0<br>
<SIP/2003-0000000e>AGI Tx >> agi_callerid: 2003<br>
<SIP/2003-0000000e>AGI Tx >> agi_calleridname: Carlos Chavez<br>
<SIP/2003-0000000e>AGI Tx >> agi_callingpres: 0<br>
<SIP/2003-0000000e>AGI Tx >> agi_callingani2: 0<br>
<SIP/2003-0000000e>AGI Tx >> agi_callington: 0<br>
<SIP/2003-0000000e>AGI Tx >> agi_callingtns: 0<br>
<SIP/2003-0000000e>AGI Tx >> agi_dnid: 2001<br>
<SIP/2003-0000000e>AGI Tx >> agi_rdnis: unknown<br>
<SIP/2003-0000000e>AGI Tx >> agi_context: macro-stdexten<br>
<SIP/2003-0000000e>AGI Tx >> agi_extension: s<br>
<SIP/2003-0000000e>AGI Tx >> agi_priority: 6<br>
<SIP/2003-0000000e>AGI Tx >> agi_enhanced: 0.0<br>
<SIP/2003-0000000e>AGI Tx >> agi_accountcode: general<br>
<SIP/2003-0000000e>AGI Tx >> agi_threadid: 139796748805888<br>
<SIP/2003-0000000e>AGI Tx >> agi_arg_1: 113<br>
<SIP/2003-0000000e>AGI Tx >><br>
<SIP/2003-0000000e>AGI Rx << VERBOSE "Codigo: 113" 3<br>
-- pin.agi,113: Codigo: 113<br>
<SIP/2003-0000000e>AGI Tx >> 200 result=1<br>
<SIP/2003-0000000e>AGI Rx << SET VARIABLE CDR(userfield) "113"<br>
<SIP/2003-0000000e>AGI Tx >> 200 result=1<br>
-- <SIP/2003-0000000e>AGI Script pin.agi completed, returning 0<br>
-- Executing [h@oficina:1] NoOp("SIP/2003-0000000e", "Colgar<br>
llamada de 2003 en OFICINA") in new stack<br>
-- Executing [h@oficina:2] NoOp("SIP/2003-0000000e", "2003") in<br>
new stack<br>
-- Executing [h@oficina:3] NoOp("SIP/2003-0000000e", "") in new stack<br>
<br>
<br>
On 4/11/13 12:24 PM, Asghar Mohammad wrote:<br>
> how you are executing? show me your full context and how call enter<br>
> in context.<br>
><br>
><br>
> On Thu, Apr 11, 2013 at 7:07 PM, Carlos Chavez<br>
> <<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>>> wrote:<br>
><br>
> When I execute without using the AGI method I get no output on the<br>
> CLI at all.<br>
><br>
> On 4/11/13 11:54 AM, Asghar Mohammad wrote:<br>
>> i am using exten =><br>
>> _XXXXXXX.,n,Set(CDR(cli_name)=${CHANNEL(peerip)}) cli_name is<br>
>> field in mysql and it work fine. show me cli output without AGI.<br>
><br>
><br>
>> On Thu, Apr 11, 2013 at 6:41 PM, Carlos Chavez<br>
>> <<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>><br>
> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>>>><br>
> wrote:<br>
><br>
>> On 4/11/13 11:18 AM, Asghar Mohammad wrote:<br>
>>> hi, you have not assign any value to CDR(userfield). try code<br>
>>> => #111,self,SET(CDR(userfield)=111)<br>
><br>
><br>
>>> On Thu, Apr 11, 2013 at 12:53 AM, Carlos Chavez<br>
>>> <<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>><br>
> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>>><br>
>> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>><br>
> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a><br>
> <mailto:<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>>>>><br>
>> wrote:<br>
><br>
>>> I am trying to set the CDR(userfield) to a certain vaule using<br>
>>> the application map of features.conf but I am not able to do<br>
>>> it. When I receive a call I would like to tag it with a client<br>
>>> code (3 digit numeric) so I can referenci it later from the<br>
>>> CDR. I have edited features.conf with something like:<br>
><br>
>>> code => #111,self,SET(CDR(userfield(111))<br>
><br>
>>> or<br>
><br>
>>> code => #111,self,AGI(code.agi)<br>
><br>
>>> The DYNAMIC_FEATURES variable is in the globals section and<br>
>>> includes the application map name. When I do a "features<br>
>>> reload" I can see everything loads and when I dial the code<br>
>>> during a call I can see a message like:<br>
><br>
>>> -- Feature Found: code exten: code<br>
><br>
>>> The problem is that my CDR variable is not being written to.<br>
>>> The first example does not show anything on screen. For the<br>
>>> second when I turn agi debug on I can see:<br>
><br>
>>> <SIP/2001-00000003>AGI Rx << SET VARIABLE CDR(userfield) "111"<br>
><br>
>>> But when I hang up neither my h extension or the CDR itself<br>
>>> will show the value I set, it is empty. I do not know what I<br>
>>> am doing wrong or maybe CDR variables are not available from<br>
>>> features?<br>
><br>
><br>
>> That was a copy/paste error on my part. The line is as you put<br>
>> it but I cannot get the value after.<br>
><br>
><br>
>> --<br>
>> _____________________________________________________________________<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>
> --<br>
>> New to Asterisk? Join us for a live introductory webinar every<br>
>> Thurs: <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
>> asterisk-users mailing list To UNSUBSCRIBE or update options<br>
>> visit: <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
><br>
><br>
>> --<br>
>> _____________________________________________________________________<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>
> --<br>
>> New to Asterisk? Join us for a live introductory webinar every<br>
>> Thurs: <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
>> asterisk-users mailing list To UNSUBSCRIBE or update options<br>
>> visit: <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
><br>
> --<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<br>
> Thurs: <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list To UNSUBSCRIBE or update options<br>
> visit: <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
><br>
><br>
><br>
> --<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<br>
> Thurs: <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
><br>
> asterisk-users mailing list To UNSUBSCRIBE or update options<br>
> visit: <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
><br>
<br>
- --<br>
Telecomunicaciones Abiertas de México S.A. de C.V.<br>
Carlos Chávez Prats<br>
Director de Tecnología<br>
<a href="tel:%2B52-55-91169161%20ext%202001" value="+525591169161">+52-55-91169161 ext 2001</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)<br>
Comment: GPGTools - <a href="http://gpgtools.org" target="_blank">http://gpgtools.org</a><br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
iEYEARECAAYFAlFm9DMACgkQqmNh+MyHzx7kwgCdHX2VbatBYwN/3S7VRaJExFal<br>
C0YAoKSQEN25USZwUMPXiLt2b9g63m5V<br>
=+iSh<br>
-----END PGP SIGNATURE-----<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>
<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>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br></div>