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