I'm running into a new problem because of the Local channels.

I add Local/Agent1 using QueueAdd.
When the PJSIP Agent dials a feature code, it adds/removes/pauses/unpauses the 
appropriate EmergencyAgent for the queue.

When the code executes the Queue, I was planning to have that Local section 
dial plan Dial the appropriate PJSIP EmergencyAgent endpoint (using the 
pre-dial).

However, the Queue never sees the local channels because they have no device 
state.
[Aug 28 18:05:06] DEBUG[17868][C-00000004] app_queue.c: TestApp_EmergencyAgent5 
is unavailable because his device state is 'invalid'
[Aug 28 18:05:06] DEBUG[17868][C-00000004] app_queue.c: TestApp_EmergencyAgent3 
is unavailable because his device state is 'invalid'
[Aug 28 18:05:06] DEBUG[17868][C-00000004] app_queue.c: TestApp_EmergencyAgent2 
is unavailable because his device state is 'invalid'
[Aug 28 18:05:06] DEBUG[17868][C-00000004] app_queue.c: TestApp_EmergencyAgent1 
is unavailable because his device state is 'invalid'

It seems I may be stuck using chan_sip since it's Queue behavior does add any 
SIPADDHEADERs when it executes the INVITE.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Dan Cropp
Sent: Friday, August 28, 2015 8:20 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Is it possible to perform PJSIP Add Header prior 
to calling Queue and have it part of the INVITE packet?

Thank you Niklas

That solved my problem.

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Niklas Larsson
Sent: Friday, August 28, 2015 1:55 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [asterisk-users] Is it possible to perform PJSIP Add Header prior 
to calling Queue and have it part of the INVITE packet?

Den 2015-08-28 kl. 00:07, skrev Dan Cropp:
I have both the PJSIP add and the chan_sip way of adding SIP headers in there.  
The Verbose is showing the variable value is there.
The INVITE to PJSIP/Agent1 does not include either X-My-DNID or X-My-DNID2 
headers.

You have to use an pre-dial handler option in the Dial command:

same => n,Dial(PJSIP/Agent1,,b(set_header^s^1))

[set_header]
exten => s,1,Set(PJSIP_HEADER(add,X-My-DNID2)=${MY_DNID})
 same => n,Return

/niklas
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to