Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Right timing for a queue call


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
a.spadaccini at mediat...
Guest





PostPosted: Thu Jan 03, 2008 11:52 am    Post subject: [asterisk-users] Right timing for a queue call Reply with quote

Hello everybody,
I'd like to have more detailed records for calls related to queues. For
instance, if A enters in queue X, waits for Y secs and then talks to peer Z for
T seconds, I'd like to have two entries in my CDR:

- src: A, dst: X, duration: Y, state: ANSWERED
- src: A, dst: Z, duration: T, state: ANSWERED

This independently from how many peers the Queue app calls without success
(peer not connected or not answering).

The only way I could think of was giving an unique userfield to all the calls
related to the call from A to the queue X, e.g.:

- A -> X usrfield: AX-uniqueid
- call to peer B that doesn't answer, usrfield: AX-uniqueid
- call to peer C that isn't available, usrfield: AX-uniqueid
- call to peer Z that answers, usrfield: AX-uniqueid

And then do some math based on duration and call state in order to get the info
I need.

Do you think that it's a good idea? How can it be implemented? I see that
uniqueid changes for each call in the scenario that I described, so I'm a bit
stuck.

I'm using asterisk 1.2.2x (I know that I should migrate.. This is the last
release of our product that uses 1.2).

Thanks in advance,

--
Dr. Andrea Spadaccini
Multimedia Technologies Institute - MTI S.r.l.
Web: www.x-voice.it - Tel: +39 (0) 95 7224945
Back to top
atis at iq-labs.net
Guest





PostPosted: Thu Jan 03, 2008 2:01 pm    Post subject: [asterisk-users] Right timing for a queue call Reply with quote

Andrea Spadaccini wrote:
Quote:
Hello everybody,
I'd like to have more detailed records for calls related to queues. For
instance, if A enters in queue X, waits for Y secs and then talks to peer Z for
T seconds, I'd like to have two entries in my CDR:

- src: A, dst: X, duration: Y, state: ANSWERED
- src: A, dst: Z, duration: T, state: ANSWERED

This independently from how many peers the Queue app calls without success
(peer not connected or not answering).

The only way I could think of was giving an unique userfield to all the calls
related to the call from A to the queue X, e.g.:

- A -> X usrfield: AX-uniqueid
- call to peer B that doesn't answer, usrfield: AX-uniqueid
- call to peer C that isn't available, usrfield: AX-uniqueid
- call to peer Z that answers, usrfield: AX-uniqueid

And then do some math based on duration and call state in order to get the info
I need.

Do you think that it's a good idea? How can it be implemented? I see that
uniqueid changes for each call in the scenario that I described, so I'm a bit
stuck.

I'm using asterisk 1.2.2x (I know that I should migrate.. This is the last
release of our product that uses 1.2).

You can set some inheritable variable to uniqueid of channel before
entering queue, and then in answer-macro (Dial(..,..,M()) set the CDR
userfield to that variable. This would require use of Agent or Local
channel, so you can do custom Dial for queue member. Works for me.

Regards,
Atis
--
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835
Back to top
a.spadaccini at mediat...
Guest





PostPosted: Thu Jan 03, 2008 8:12 pm    Post subject: [asterisk-users] Right timing for a queue call Reply with quote

Ciao Atis,

Quote:
Quote:
Do you think that it's a good idea? How can it be implemented? I see that
uniqueid changes for each call in the scenario that I described, so I'm a
bit stuck.

I'm using asterisk 1.2.2x (I know that I should migrate.. This is the last
release of our product that uses 1.2).

You can set some inheritable variable to uniqueid of channel before
entering queue, and then in answer-macro (Dial(..,..,M()) set the CDR
userfield to that variable. This would require use of Agent or Local
channel, so you can do custom Dial for queue member. Works for me.

Thanks for your answer.
It didn't seem to work for me, as I already tried it.

Before calling the Queue app I set a variable to uniqueid, and then in the
context called from the Queue app I tried accessing it and it doesn't work.

I don't have the code right here (I'm at home), but it was something like

queues.conf

[somequeue]
member => Local/211 at somecontext
...
..

extensions.conf

[queue-caller]
exten => s,1,Set(TEST=a)
exten => s,n,Queue(various args)

[somecontext]
exten => 211,1,NoOP(${TEST})
exten => 211,n,Dial(SIP/211)

And then NoOp prints nothing.

Maybe I made some mistakes in the syntax (it's 2 AM here, and I'm just back
home), but I think that the concept is right.

Is this the same kind of setup that you have? Does it work for you?
Can you post some simplified working code?

Thanks in advance! Smile

--
Dott. Andrea Spadaccini
Multimedia Technologies Institute s.r.l.
Back to top
a.spadaccini at mediat...
Guest





PostPosted: Fri Jan 04, 2008 5:22 am    Post subject: [asterisk-users] Right timing for a queue call Reply with quote

Quote:
[queue-caller]
exten => s,1,Set(TEST=a)
exten => s,n,Queue(various args)

The error was that I didn't make the variable inheritable, prepending it with
one or two underscores.

Now it works, thanks!

--
Dr. Andrea Spadaccini
Multimedia Technologies Institute - MTI S.r.l.
Web: www.x-voice.it - Tel: +39 (0) 95 7224945
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services