Author Topic: EXPERIMENTAL: replace the queueDial.agi with a pure-scripting solution  (Read 32001 times)

goit

  • Newbie
  • *
  • Posts: 6
  • Karma: 1
    • View Profile
Re: EXPERIMENTAL: replace the queueDial.agi with a pure-scripting solution
« Reply #15 on: December 17, 2008, 14:27:03 »
Thank you for the reply. 

My concern is for the "Dial" command. As you can see (Macro(ael-druid-trunkdial), DRUID executes an AEL script to do the dialing. It does not use asterisk "dial" command direclty. the AEL script is the one that executes the "Dial" command. I don't think what you suggested will work, but i will give it a try.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: EXPERIMENTAL: replace the queueDial.agi with a pure-scripting solution
« Reply #16 on: December 17, 2008, 14:44:57 »
Well there is no reason to be concerned - I'm not sure what the macro does, but surely is not needed by the underlying Asterisk architecture, as long as the trunk name makes sense.  ;D

qmax

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • Asterisk-11.7.0-ubuntu, Queuemetrics-15.10.1-tgz
    • View Profile
    • Email
the Dial application sets channel variables
DIALEDTIME and ANSWEREDTIME

what is the reason of using EPOCH and having global variables ?
Upd. what i mean is:

Why:
Code: [Select]
exten => h,n(case-A),Set(WT=$[${GLOBAL(${GM}ans)} - ${ST}])
exten => h,n,Set(CT=$[${EPOCH} - ${GLOBAL(${GM}ans)}])
exten => h,n,QueueLog(${QUEUEID},${UNIQUEID},Agent/${AGENTID},COMPLETEAGENT,${WT},${CT})
is preffered over:
Code: [Select]
exten => h,n(case-A),QueueLog(${QUEUEID},${UNIQUEID},Agent/${AGENTID},COMPLETEAGENT,$[${DIALEDTIME} - ${ANSWEREDTIME}],${ANSWEREDTIME})
w/out using any global variables
here, DIALEDTIME and ANSWEREDTIME are channel variables set by Dial application
« Last Edit: June 25, 2009, 12:44:40 by qmax »

qmax

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • Asterisk-11.7.0-ubuntu, Queuemetrics-15.10.1-tgz
    • View Profile
    • Email
another question...
when call is answered, Dial sets DIALSTASUS to "ANSWER"

what is the reason of using GLOBAL(${GM}) ?

is it possible, that macro set by M option is not called, while dialstatus is still set to ANSWER ?
asterisk documentation it is not quote clean for me.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
You would better do a trace ands see steèp-by-step what it does.