[asterisk-users] Setting SIP header on agent calls made by aqueue
Danny Nicholas
danny at debsinc.com
Wed Feb 18 09:51:43 CST 2009
Lets say your dialplan looks like this:
exten => s,1,Answer()
exten => s,n,SIPAddHeader(X-Unique-ID: ${UNIQUEID})
exten => s,n,Queue(myQueue)
exten => s,n,blah
exten => s,n,Hangup()
you would make a macro like this
[macro-siphead]
exten => s,n,SIPAddHeader(X-Unique-ID: ${ARG1})
exten => s,n,Queue(myQueue)
and change your dialplan to do this
exten => s,1,Answer()
exten => s,n(redial),Noop()
exten => s,n,Macro(siphead, ${UNIQUEID})
exten => s,n,GOTOIF(blah),?redial
exten => s,n,blah
exten => s,n,Hangup()
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Wednesday, February 18, 2009 9:20 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Setting SIP header on agent calls made by
aqueue
Interestiong - how would you do this? I thought macros on the queue command
were only for 1.6.
l.
2009/2/18 Danny Nicholas <danny at debsinc.com>
Put this snippet in a macro and call the macro. That way the data lives
for the duration of the incoming call.
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Lenz Emilitri
Sent: Wednesday, February 18, 2009 3:05 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Setting SIP header on agent calls made by a queue
Hello list,
I am trying to set a custom SIP header on all calls that are made by the app
queue because I want to track a certain state at the SIP level.
If I use the following code:
exten => s,n,SIPAddHeader(X-Unique-ID: ${UNIQUEID})
exten => s,n,Queue(myQueue)
this works fine for the FIRST call made from the queue to an agent; but if
that call does not go through, it's not repeated on subsequent calls.
I know I could use Local channels as members of the queue, but I was
wondering if ther was something more general and that worked whatever your
channel configuration might be.
I also tried exporting the variable by setting the URL field of the queue()
call, but it is not shown in the resulting SIP dialog.
Any suggestion but patching the source?
l.
--
Loway - home of QueueMetrics - http://queuemetrics.com
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
Loway - home of QueueMetrics - http://queuemetrics.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090218/a0a43054/attachment.htm
More information about the asterisk-users
mailing list