[Asterisk-Users] Fw: setting outgoing caller ID by the queue an extension is logged into

Adam Goryachev mailinglists at websitemanagers.com.au
Tue Jan 24 05:00:43 MST 2006


On Mon, 2006-01-23 at 15:34 -0500, Franklin Webb wrote:

> Basically I have phone representatives that log into one of several
> queues (not using chan Agent, we log in by the extension), and
> frequently these agents have to make attended transfer calls to
> outside numbers.  This transfer basically amounts to a new outgoing
> call.  I have been asked to set the caller ID for these outgoing calls
> based on the queue the phone representative is currently logged in to.
>  
> Unfortunetly I cannot think of a way to do this.  The incomming and
> outgoing calls are two different calls.  I have considered using DBPut
> and DBGet to store this information in a database.  This might work,
> but I am also concerned about the overhead involved.  I cannot think
> of a way to do this using global variables since I need to store a
> seperate value for each extension.

I wouldn't think the overhead of a dbput/dbget would be enough to pose a
problem, but then you haven't told us how many calls/sec are being
answered, nor how many you are diverting outside. 

Personally, I'd just do a DBPUT when they login to the queue, then
whenever an outbound call is generated, just do:
exten => _X.,n,Set(CALLERID(num)=${DB/cid/${CALLERIDNUM}})

Which, hopefully if I got it right, will use the current CALLERIDNUM
value (ie, extensions number 5432) to look up the value of cid/5432
which should return the cid you set earlier as 12345678, and then set
that as the current calleridnum...

You might need to adjust the syntax etc, since that is just off the top
of my head...

also, a single dbput per login should not be a major load issue, and a
single dbget per transfer outbound should also be OK....

Regards,
Adam





More information about the asterisk-users mailing list