[Asterisk-Users] Queue Join Event

Tressler, Joshua A tressler at purdue.edu
Sun Oct 23 11:00:22 MST 2005


Saul,

What you are suggesting follows along the lines of what I am currently
trying however I have determined that if the incoming call has no
callerid, then the channel name is just Zap/1-1/ . For some reason
asterisk doesn't even add the -XXXX to the end of the channel name....
My concern is that we could get a call that wouldn't go completely
through the queue (aka, the user hangs up, or a db problem) and then an
hour later get another private call on the same Zap/1-1/ channel and
then we could have an issue of the uniqueness of the record. Do you
follow my scenario? 

I really thought that this may work until the above problem. Do you have
any to this issue? Again, I appreciate your help with this. 

Thanks again,

Josh
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Saul Diaz
Sent: Sunday, October 23, 2005 12:28 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Queue Join Event

Tressler, Joshua A wrote:

> I did a quick Google search of the lists and I hope that I am not 
> asking a question that has already been answered recently.
>
> I have been working on a interface to use with our CRM software. I am 
> using the manager interface and mysql to store the changes. The only 
> issue I am having is when a caller joins the queue.
>
> Currently, I can show the status of phones (ready, not ready, ringing,

> ringing ack, in call, etc). What I am wanting to do is to be able to 
> track the status of the call in the database and do things with it 
> accordingly. I am able to accomplish this and make it work exactly as 
> I want, but it requires a modification to the source. For some reason,

> the JOIN event in the manager interface doesn't seem to have the 
> unique call id. Almost every other event does, but JOIN doesn't for 
> some reason. Can anyone explain why it doesn't?
>
> My boss asked us to remove our hack to the source and find another way

> as it we want to be able to update versions of asterisk and not modify

> the source. I thought that I could get around this by using the 
> NEWEXTEN event that happens just before the join, but I can't tie the 
> two events together.
>
I think you boss was right.. that will allow 100% compatibility with all
asterisk versions as far the events are there

lets see the events for a moment

HMMM the call enter go to the ivr so u will get 1 event like this for
the entire IVR

Event: Newexten
Privilege: call,all
Channel: SIP/s-f36c
Context: open
Extension: 0606
Priority: 7
Application: Queue
AppData: operator
Uniqueid: 1127422073.9183
Server: asterisk1

Ok this is the JOIN event still u can find things there that will allow
u to relate the call see the channel parameter.

Event: Join
Privilege: call,all
Channel: SIP/s-f36c
CallerID: ...
CallerIDName: ...
Queue: operator
Position: 1
Count: 1
Server: asterisk1

Now the asterisk is preparing himself for call an agent...

Event: Newchannel
Privilege: call,all
Channel: SIP/9915004-e198
State: Down
CallerID: <unknown>
CallerIDName: <unknown>
Uniqueid: 1127422096.9194
Server: asterisk1

Event: QueueMemberStatus
Privilege: agent,all
Queue: operator
Location: SIP/9915004
Membership: static
Penalty: 0
CallsTaken: 86
LastCall: 1127422074
Status: 0
Paused: 0
Server: asterisk1

Ahh magic again a wait to relate see the channelcalling.... and i bet
what ever u want that when the agent finish u will find the same
similarities.

Event: AgentCalled
Privilege: agent,all
AgentCalled: SIP/9915004
ChannelCalling: SIP/s-f36c
CallerID: .....
CallerIDName: ...
Context: open
Extension: 0606
Priority: 7
Server: asterisk1

so following the events for channel u will probably able to do the same
even without the uniqueid. 2 concurrent calls will have diferent
channels always.... u just have to be carefull to ensure u follow the
call from the beginning to the end.

regards
saul

> Basically, with the hack modified, here's what I do:
>
> Call comes in, enter the info into the database with uniqueid as the 
> key. When a call is answered, I update that record in the database and

> so on. Without the uniqueid on the JOIN event I am stuck.
>
> Any suggestions on a way around this, or a better way of doing it? I 
> would also be curious if anyone would share their setup if the are 
> attempting the same.
>
> Thanks,
>
>
> Josh
>
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list