Dan Cropp
2015-Aug-27 18:40 UTC
[asterisk-users] Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
I have a call coming in. I need to add a SIP Header to the channel. Then, I need to send the call to the Queue so it is sent to the Agent. The SIP header I added, I need to have appear in the INVITE sent to the Agent. It works in chan_sip. I send the call to a macro which does... n,SIPAddHeader(My-Header-Name:${MY-HEADER-VALUE}) n,Queue(${ARG2}) In PJSIP , this doesn't seem to work. Is there any way to add custom PJSIP headers to be sent as part of the INVITE to the Agent? When I look at the code, it seems as though the INVITE doesn't look for any custom headers to be included with the INVITE packet. Is this correct? Have a great day! Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150827/79ed2ada/attachment.html>
Scott Griepentrog
2015-Aug-27 18:56 UTC
[asterisk-users] Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
To add a header to the call leg that goes to the agent, try using a local channel to activate dialplan on the outbound call: Register Local/number at agent in the queue on behalf of the agent (replace number with the agent's extension number) In dialplan [agent], wild card match the number, add the header, and then Dial(PJSIP/{$EXTEN}) to send the call to the agent. On Thu, Aug 27, 2015 at 1:40 PM, Dan Cropp <dan at amtelco.com> wrote:> I have a call coming in. > > I need to add a SIP Header to the channel. > > Then, I need to send the call to the Queue so it is sent to the Agent. > > > > The SIP header I added, I need to have appear in the INVITE sent to the > Agent. > > > > It works in chan_sip. I send the call to a macro which does? > > n,SIPAddHeader(My-Header-Name:${MY-HEADER-VALUE}) > > n,Queue(${ARG2}) > > > > > > In PJSIP , this doesn?t seem to work. Is there any way to add custom > PJSIP headers to be sent as part of the INVITE to the Agent? > > When I look at the code, it seems as though the INVITE doesn?t look for > any custom headers to be included with the INVITE packet. Is this correct? > > > > Have a great day! > > Dan > > -- > _____________________________________________________________________ > -- 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 >-- [image: Digium logo] Scott Griepentrog Digium, Inc ? Software Developer 445 Jan Davis Drive NW ? Huntsville, AL 35806 ? US direct/fax: +1 256 428 6239 ? mobile: +1 256 580 6090 Check us out at: http://digium.com ? http://asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150827/d568e3df/attachment.html>
Dan Cropp
2015-Aug-27 20:08 UTC
[asterisk-users] Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
Thanks Scott. I?m taking over for someone else?s code, so I must admit I?m still learning the Agent and Queue concepts. Local channels are something I have not used either. Would local channels essentially be an internal bridge? How would I ?Register Local/number at agent in the queue on behalf of the agent (replace number with the agent's extension number)? From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Scott Griepentrog Sent: Thursday, August 27, 2015 1:57 PM 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? To add a header to the call leg that goes to the agent, try using a local channel to activate dialplan on the outbound call: Register Local/number at agent in the queue on behalf of the agent (replace number with the agent's extension number) In dialplan [agent], wild card match the number, add the header, and then Dial(PJSIP/{$EXTEN}) to send the call to the agent. On Thu, Aug 27, 2015 at 1:40 PM, Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote: I have a call coming in. I need to add a SIP Header to the channel. Then, I need to send the call to the Queue so it is sent to the Agent. The SIP header I added, I need to have appear in the INVITE sent to the Agent. It works in chan_sip. I send the call to a macro which does? n,SIPAddHeader(My-Header-Name:${MY-HEADER-VALUE}) n,Queue(${ARG2}) In PJSIP , this doesn?t seem to work. Is there any way to add custom PJSIP headers to be sent as part of the INVITE to the Agent? When I look at the code, it seems as though the INVITE doesn?t look for any custom headers to be included with the INVITE packet. Is this correct? Have a great day! Dan -- _____________________________________________________________________ -- 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 -- [Digium logo] Scott Griepentrog Digium, Inc ? Software Developer 445 Jan Davis Drive NW ? Huntsville, AL 35806 ? US direct/fax: +1 256 428 6239 ? mobile: +1 256 580 6090 Check us out at: http://digium.com ? http://asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150827/eb49c6dc/attachment.html>
Seemingly Similar Threads
- Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
- Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
- Is it possible to perform PJSIP Add Header prior to calling Queue and have it part of the INVITE packet?
- PJSIP configuration question
- Any idea what causes "Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match"