AGI Variable DEXTEN not being passed to custom module

This module was originally created for FreePBX 2.9 on AsteriskNOW 1.7 Distro, then upgraded by somebody else, and for whatever reason, it only works with that value as a separator for the dynamic features.

I see now. In the code the Dumpchan happens before the ChannelRedirect. In reality the Dumpchan needs to happen in the bsurvey context so that we can know what channel vars are actually there.

because itā€™s not a separator. Its a comment. It works because youā€™ve commented out the rest of the string.

How does your call get into the macro-bsurvey context in the first place?

Then with respect you should have to to to find that somebody else , it might work but probably not, and only that somebody else could help you, no?

Agent presses *5 at end of call.

Is this a survey for the callee to take about their agent? EG when I call in through my Health Care provider I am prompted with a ā€œdo you want to take a survey at the end of this call?ā€

Uncomment line 67 and comment out line 85. Then post the ChanDump results. Those are the variables you will be able to work with.

WTF is ALT_SV_Q*

not so much FreePBX, please elucidate

This looks pretty interesting, please add some license details to the GitHub repo when time permits.

2 Likes

@tm1000 I aplogize, when I changed PEERDIALEDNUMBER, the lines were commented out, so I never tried it, it did make progress, I now have my Device stored in the table, but not my name. We use Device and User mode, just to make things more complicatedā€¦

Here is the output from that run:

voip2*CLI>
    --  Feature Found: bsurvey1 exten: bsurvey1
    -- Executing [s@macro-bsurvey:1] DumpChan("SIP/2041-0000007d", "") in new stack

Dumping Info For Channel: SIP/2041-0000007d:
================================================================================
Info:
Name=               SIP/2041-0000007d
Type=               SIP
UniqueID=           1490140787.7251
LinkedID=           1490140786.7194
CallerIDNum=        2041
CallerIDName=       John Smith
ConnectedLineIDNum= +12155555555
ConnectedLineIDName=M0:TK-SAINT ALBANS NY
DNIDDigits=         (N/A)
RDNIS=              (N/A)
Parkinglot=         default
Language=           en
State=              Up (6)
Rings=              0
NativeFormat=       (ulaw)
WriteFormat=        ulaw
ReadFormat=         ulaw
RawWriteFormat=     ulaw
RawReadFormat=      ulaw
WriteTranscode=     No
ReadTranscode=      No
1stFileDescriptor=  40
Framesin=           326
Framesout=          313
TimetoHangup=       0
ElapsedTime=        0h0m8s
DirectBridge=       <none>
IndirectBridge=     <none>
Context=            macro-bsurvey
Extension=          s
Priority=           1
CallGroup=
PickupGroup=
Application=        DumpChan
Data=               (Empty)
Blocking_in=        (Not Blocking)

Variables:
MACRO_DEPTH=1
ARG1=1
MACRO_PRIORITY=1
MACRO_CONTEXT=macro-dial
MACRO_EXTEN=s
DYNAMIC_FEATURENAME=bsurvey1
DYNAMIC_PEERNAME=Local/847@from-queue-00000de8;2
BRIDGEPEER=Local/847@from-queue-00000de8;2
SIPADDHEADER01=
SIPADDHEADER02=
SIPADDHEADER03=
SIPADDHEADER04=
GOSUB_RETVAL=
FORWARD_CONTEXT=from-internal
CFIGNORE=
MACRO_RESULT=
sipkey=
SIPHEADERKEYS=
DIALEDPEERNUMBER=2041
[email protected]:5060
CWIGNORE=
KEEPCID=TRUE
SAVEDCIDNAME=TK-SAINT ALBANS NY
REC_STATUS=RECORDING
RECORD_ID=Local/847@from-queue-00000de8;2
MIXMON_ID=0x7fa26c005cf0
CALLFILENAME=external-847-613-20170321-195946-1490140787.7248
REC_POLICY_MODE=FORCE
FROMQ=true
MOHCLASS=classical-piano
NODEST=613
QUEUEWAIT=1490140787
TTL=64
CALLEE_ACCOUNCODE=
REALCALLERIDNUM=+12155555555
CALLINGNUMPRES_SV=allowed_not_screened
CALLINGNAMEPRES_SV=allowed_not_screened
REVERSAL_REJECT=FALSE
FROM_DID=2675555555
MON_FMT=wav
TIMESTR=20170321-195946
YEAR=2017
MONTH=03
DAY=21
DIRECTION=INBOUND
================================================================================
    -- Executing [s@macro-bsurvey:2] ChannelRedirect("SIP/2041-0000007d", "Local/847@from-queue-00000de8;2,bsurvey,1,1") in new stack
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('HANGUP',{ts '2017-03-21 19:59:55.707732'},'John Smith','2041','2041','','','s','bsurvey','SIP/2041-0000007d','AppDial','(Outgoing Line)',3,'','1490140787.7251','1490140786.7194','','','')]
  == Spawn extension (bsurvey, 1, 1) exited non-zero on 'Local/847@from-queue-00000de8;2' in macro 'dial'
  == Spawn extension (bsurvey, 1, 1) exited non-zero on 'Local/847@from-queue-00000de8;2'
    -- Executing [1@bsurvey:1] Set("Local/847@from-queue-00000de8;2", "bsurvey_name=support") in new stack
    -- Executing [1@bsurvey:2] Set("Local/847@from-queue-00000de8;2", "bsurvey_start=2017-03-21 19:59:47") in new stack
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('CHAN_END',{ts '2017-03-21 19:59:55.708299'},'John Smith','2041','2041','','','s','bsurvey','SIP/2041-0000007d','AppDial','(Outgoing Line)',3,'','1490140787.7251','1490140786.7194','','','')]
    -- Executing [1@bsurvey:3] Set("Local/847@from-queue-00000de8;2", "bsurvey_unqiueid=1490140787.7248") in new stack
    -- Executing [1@bsurvey:4] Set("Local/847@from-queue-00000de8;2", "bsurvey_agent=2041") in new stack
    -- Executing [1@bsurvey:5] Set("Local/847@from-queue-00000de8;2", "bsurvey_aname_key=/AMPUSER/2041/cidname=") in new stack
    -- Executing [1@bsurvey:6] Set("Local/847@from-queue-00000de8;2", "bsurvey_aname=") in new stack
    -- Executing [1@bsurvey:7] DumpChan("Local/847@from-queue-00000de8;2", "") in new stack

Dumping Info For Channel: Local/847@from-queue-00000de8;2:
================================================================================
Info:
Name=               Local/847@from-queue-00000de8;2
Type=               Local
UniqueID=           1490140787.7248
LinkedID=           1490140786.7194
CallerIDNum=        +12155555555
CallerIDName=       M0:TK-SAINT ALBANS NY
ConnectedLineIDNum= 2041
ConnectedLineIDName=John Smith
DNIDDigits=         (N/A)
RDNIS=              (N/A)
Parkinglot=
Language=           en
State=              Up (6)
Rings=              0
NativeFormat=       (ulaw)
WriteFormat=        ulaw
ReadFormat=         ulaw
RawWriteFormat=     ulaw
RawReadFormat=      ulaw
WriteTranscode=     No
ReadTranscode=      No
1stFileDescriptor=  -1
Framesin=           321
Framesout=          307
TimetoHangup=       0
ElapsedTime=        0h0m8s
DirectBridge=       <none>
IndirectBridge=     <none>
Context=            bsurvey
Extension=          1
Priority=           7
CallGroup=
PickupGroup=
Application=        DumpChan
Data=               (Empty)
Blocking_in=        (Not Blocking)

Variables:
bsurvey_aname=
bsurvey_aname_key=/AMPUSER/2041/cidname=
bsurvey_agent=2041
bsurvey_unqiueid=1490140787.7248
bsurvey_start=2017-03-21 19:59:47
bsurvey_name=support
MACRO_DEPTH=0
DIALSTATUS=ANSWER
DYNAMIC_FEATURENAME=bsurvey1
DYNAMIC_PEERNAME=SIP/2041-0000007d
[email protected]:5060
BRIDGEPEER=SIP/2041-0000007d
SIPADDHEADER02=
SIPADDHEADER03=
SIPADDHEADER04=
SIPADDHEADER01=
DIALEDPEERNUMBER=2041
DIALEDPEERNAME=SIP/2041-0000007d
DIALEDTIME=
ANSWEREDTIME=
ITER=2
DB_RESULT=
EXTTOCALL=847
LOOPCNT=1
AGISTATUS=SUCCESS
ds=SIP/2041,,trM(auto-blkvm)
FILTERED_DIAL=847
CWIGNORE=
DIALSTATUS_CW=
KEEPCID=TRUE
SAVEDCIDNAME=TK-SAINT ALBANS NY
GOSUB_RETVAL=
REC_STATUS=RECORDING
RECORD_ID=Local/847@from-queue-00000de8;2
MIXMON_ID=0x7fa26c005cf0
LOCAL_MIXMON_ID=0x7fa26c005cf0
MIXMONITOR_FILENAME=/var/spool/asterisk/monitor/2017/03/21/external-847-613-20170321-195946-1490140787.7248.wav
CALLFILENAME=external-847-613-20170321-195946-1490140787.7248
REC_POLICY_MODE=FORCE
CALLEE=force
CALLTYPE=external
REC_POLICY_MODE_SAVE=NO
FROMEXTEN=613
CALLTYPE_OVERRIDE=external
QDOPTS=
RingGroupMethod=none
FROMQ=true
QAGENT=847
MOHCLASS=classical-piano
FORWARD_CONTEXT=block-cf
CFIGNORE=TRUE
NODEST=613
QUEUEWAIT=1490140787
TTL=64
CALLEE_ACCOUNCODE=
REALCALLERIDNUM=+12155555555
CALLINGNUMPRES_SV=allowed_not_screened
CALLINGNAMEPRES_SV=allowed_not_screened
REVERSAL_REJECT=FALSE
FROM_DID=2675555555
MON_FMT=wav
TIMESTR=20170321-195946
YEAR=2017
MONTH=03
DAY=21
DIRECTION=INBOUND
================================================================================
    -- Executing [1@bsurvey:8] AGI("Local/847@from-queue-00000de8;2", "bsurvey.php") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/bsurvey.php
    -- bsurvey.php: Starting New survey
    -- AGI Script Executing Application: (Set) Options: (bsurvey_agent_name=${DB(/AMPUSER/2041/cidname)})
       > bsurvey.php: Running SQL Command SELECT a.*,b.`displayname` as dp FROM bsurvey as a left join recordings as b on b.id=a.`rec_id` WHERE a.`id` = '1'
       > bsurvey.php: Connected to MySQL database OK.
       > bsurvey.php: Selected database OK.
[2017-03-21 19:59:55] WARNING[20069][C-00000041]: file.c:701 ast_openstream_full: File Alt_SV_Announce does not exist in any format
       > bsurvey.php: Running SQL Command select `id` from survey.bsurvey_cdrs limit 0
    -- bsurvey.php: TABLE CREATED
       > bsurvey.php: Running SQL Command SELECT rec_id,bsurvey_id,b.filename as file,a.displayname,a.res_start,a.res_end FROM bsurvey_recs a left join recordings as b on a.rec_id= b.id where bsurvey_id='1' ORDER BY a.id
    -- bsurvey.php: Do questions
    -- bsurvey.php: REC Array
    -- bsurvey.php: (
    -- bsurvey.php:     [rec_id] => 65
    -- bsurvey.php:     [bsurvey_id] => 1
    -- bsurvey.php:     [file] => custom/alt_sv_q1
    -- bsurvey.php:     [displayname] => Call Satisfaction
    -- bsurvey.php:     [res_start] => 1
    -- bsurvey.php:     [res_end] => 5
    -- bsurvey.php: )
    -- bsurvey.php:
       > bsurvey.php: Running SQL Command insert into survey.bsurvey_cdrs(survey_name,question,res_start ,res_end,rec_file,unqiueid,
       > bsurvey.php:                   calldate,cid,answer,agent,agent_name) values
       > bsurvey.php:   ('support','Call Satisfaction','1','5','custom/alt_sv_q1','1490140787.7248',
       > bsurvey.php:                   '2017-03-21 19:59:47','','','2041','')
       > bsurvey.php: Running SQL Command select id from survey.bsurvey_cdrs where survey_name='support' and  question = 'Call Satisfaction' and  unqiueid='1490140787.7248' and agent_name = ''  limit 1
    -- <Local/847@from-queue-00000de8;2> Playing 'custom/alt_sv_q1.slin' (language 'en')
       > bsurvey.php: Running SQL Command update survey.bsurvey_cdrs set answer='5' where id=571316
    -- bsurvey.php: Do questions
    -- bsurvey.php: REC Array
    -- bsurvey.php: (
    -- bsurvey.php:     [rec_id] => 66
    -- bsurvey.php:     [bsurvey_id] => 1
    -- bsurvey.php:     [file] => custom/alt_sv_q2
    -- bsurvey.php:     [displayname] => Product Satisfaction
    -- bsurvey.php:     [res_start] => 1
    -- bsurvey.php:     [res_end] => 5
    -- bsurvey.php: )
    -- bsurvey.php:
       > bsurvey.php: Running SQL Command insert into survey.bsurvey_cdrs(survey_name,question,res_start ,res_end,rec_file,unqiueid,
       > bsurvey.php:                   calldate,cid,answer,agent,agent_name) values
       > bsurvey.php:   ('support','Product Satisfaction','1','5','custom/alt_sv_q2','1490140787.7248',
       > bsurvey.php:                   '2017-03-21 19:59:47','','','2041','')
       > bsurvey.php: Running SQL Command select id from survey.bsurvey_cdrs where survey_name='support' and  question = 'Product Satisfaction' and  unqiueid='1490140787.7248' and agent_name = ''  limit 1
    -- <Local/847@from-queue-00000de8;2> Playing 'custom/alt_sv_q2.slin' (language 'en')
       > bsurvey.php: Running SQL Command update survey.bsurvey_cdrs set answer='5' where id=571317
    -- bsurvey.php: Do questions
    -- bsurvey.php: REC
    -- <Local/847@from-queue-00000de8;2> Playing 'bsurvey-thanku.slin' (escape_digits=123456789) (sample_offset 0) (language 'en')
    -- <Local/847@from-queue-00000de8;2>AGI Script bsurvey.php completed, returning -1
    -- Executing [h@ext-queues:1] Macro("SIP/Digium_Test-0000007c", "hangupcall,") in new stack
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('HANGUP',{ts '2017-03-21 20:00:04.913646'},'M0:TK-SAINT ALBANS NY','+12155555555','+12155555555','','','1','bsurvey','Local/847@from-queue-00000de8;2','','',3,'','1490140787.7248','1490140786.7194','','','')]
       > [INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,uniqueid,recordingfile) VALUES ({ ts '2017-03-21 19:59:47' },'"M0:TK-SAINT ALBANS NY" <+12155555555>','+12155555555','847','from-queue-exten-only','Local/847@from-queue-00000de8;2','SIP/2041-0000007d','AGI','HANGUP',17,15,'ANSWERED',3,'1490140787.7248','external-847-613-20170321-195946-1490140787.7248.wav')]
    -- Executing [s@macro-hangupcall:1] ExecIf("SIP/Digium_Test-0000007c", "0?Set(CDR(recordingfile)=.wav)") in new stack
    -- Executing [s@macro-hangupcall:2] GotoIf("SIP/Digium_Test-0000007c", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,4)
  == MixMonitor close filestream (mixed)
    -- Executing [s@macro-hangupcall:4] ExecIf("SIP/Digium_Test-0000007c", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:5] Hangup("SIP/Digium_Test-0000007c", "") in new stack
  == Spawn extension (macro-hangupcall, s, 5) exited non-zero on 'SIP/Digium_Test-0000007c' in macro 'hangupcall'
  == Spawn extension (ext-queues, h, 1) exited non-zero on 'SIP/Digium_Test-0000007c'
  == End MixMonitor Recording Local/847@from-queue-00000de8;2
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('BRIDGE_END',{ts '2017-03-21 20:00:04.913883'},'TK-SAINT ALBANS NY','+12155555555','+12155555555','','2675555555','613','ext-queues','SIP/Digium_Test-0000007c','Queue','613,t,,,,,,,,',3,'','1490140786.7194','1490140786.7194','Local/847@from-queue-00000de8;1','','')]
       > [INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,uniqueid,did,cnum,cnam) VALUES ({ ts '2017-03-21 19:59:46' },'"TK-SAINT ALBANS NY" <+12155555555>','+12155555555','613','ext-queues','SIP/Digium_Test-0000007c','Local/847@from-queue-00000de8;1','Queue','613,t,,,,,,,,',18,18,'ANSWERED',3,'1490140786.7194','2675555555','+12155555555','TK-SAINT ALBANS NY')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('CHAN_END',{ts '2017-03-21 20:00:04.919004'},'M0:TK-SAINT ALBANS NY','+12155555555','+12155555555','','','1','bsurvey','Local/847@from-queue-00000de8;2','','',3,'','1490140787.7248','1490140786.7194','','','')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('HANGUP',{ts '2017-03-21 20:00:04.920342'},'John Smith','2041','','','','613','from-queue','Local/847@from-queue-00000de8;1','AppQueue','(Outgoing Line)',3,'','1490140787.7247','1490140786.7194','','','')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('CHAN_END',{ts '2017-03-21 20:00:04.920401'},'John Smith','2041','','','','613','from-queue','Local/847@from-queue-00000de8;1','AppQueue','(Outgoing Line)',3,'','1490140787.7247','1490140786.7194','','','')]
  == Spawn extension (ext-queues, 613, 41) exited non-zero on 'SIP/Digium_Test-0000007c'
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('APP_END',{ts '2017-03-21 20:00:04.921676'},'TK-SAINT ALBANS NY','+12155555555','+12155555555','','2675555555','613','ext-queues','SIP/Digium_Test-0000007c','Queue','613,t,,,,,,,,',3,'','1490140786.7194','1490140786.7194','','','')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('HANGUP',{ts '2017-03-21 20:00:04.921863'},'TK-SAINT ALBANS NY','+12155555555','+12155555555','','2675555555','613','ext-queues','SIP/Digium_Test-0000007c','','',3,'','1490140786.7194','1490140786.7194','','','')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('CHAN_END',{ts '2017-03-21 20:00:04.922537'},'TK-SAINT ALBANS NY','+12155555555','+12155555555','','2675555555','613','ext-queues','SIP/Digium_Test-0000007c','','',3,'','1490140786.7194','1490140786.7194','','','')]
       > [INSERT INTO cel (eventtype,eventtime,cid_name,cid_num,cid_ani,cid_rdnis,cid_dnid,exten,context,channame,appname,appdata,amaflags,accountcode,uniqueid,linkedid,peer,userdeftype,userfield) VALUES ('LINKEDID_END',{ts '2017-03-21 20:00:04.922557'},'TK-SAINT ALBANS NY','+12155555555','+12155555555','','2675555555','613','ext-queues','SIP/Digium_Test-0000007c','','',3,'','1490140786.7194','1490140786.7194','','','')]
voip2*CLI>

If I comment out line 85, the survey no longer happens when I press *5, unless you wanted me to dump the variables another way.

@lgaetz I will, yes I think its a missing feature in FreePBX, good time for me to brush up on my knowledge of License models.

Right because there is no place for it to fall into, sorry. Also in the second chandump DIALEDPEERNUMBER is valid so it should be filling it in. The fact that itā€™s not is a mystery.

You need to be careful about this. The person who owns it might own copyright and might have licensed it out to over customers over the years.

@tm1000 I feel we are making good progress, except I should have mentioned Device and User mode, it needs to be /AMPUSER/(MY Extension-847)/cidname=

Also, we paid for it to be developed, but im still not sure if that means we own itā€¦ But I did get permission from my CEO.

Device and User mode makes it infinitely more hard to work with. However your bigger issue is why isnā€™t ${DIALEDPEEREXTENSION} getting replaced with something. Anything. You should be trying to figure that out first.

@tm1000 I am aware its unsupported, but Iā€™m not going to be able to change the way my entire companys phone system is setupā€¦ I hope its not a deal breaker, we are very closeā€¦

IE:

Variables:
bsurvey_aname=
bsurvey_aname_key=/AMPUSER/2041/cidname=
bsurvey_agent=2041

(DIALEDPEEREXTENSION) Is working, I apologize for the confusion, if you look through the last dump, it inserted my Device number, but needs to be extension.

None of your variables are getting replaced though. DIALEDPEEREXTENSION should work and provide some number. Not nothing.

When did agent suddenly start working?

Oh. I missed this.

So PEERDIALEDNUMBER did work. You just need the U&D way to get it which should not be 2041 but 847?

@tm1000 that is correct. Again, my apologies, the first time I tried it, I didnā€™t realize I was changing commented code. But when I went to do another one of your steps, I realized what I had done, and I know my DEVICE = 2041 but my EXTENSION = 847

If you look at the working dump from my Prod Server you will see:

-- Executing [1@bsurvey:4] Set("Local/847@from-queue-001f9172;2", "bsurvey_agent=847") in new stack
-- Executing [1@bsurvey:5] Set("Local/847@from-queue-001f9172;2", "bsurvey_aname_key=/AMPUSER/847/cidname=") in new stack

Does this return the correct value? (this is something I added for U&D mode for 13 a while back)

asterisk -rvvvvv
database get DEVICE/2041 user

EG it should return 847ā€¦

2 Likes

Yes it does!

[root@voip2 ~]# asterisk -rvvvvv
Asterisk 11.24.1, Copyright (C) 1999 - 2013 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 11.24.1 currently running on voip2 (pid = 6892)
voip2*CLI> database get DEVICE/2041 user
Value: 847
voip2*CLI>