John Kiniston
2016-Sep-26 23:30 UTC
[asterisk-users] Finding the user agent of a channel using PJSIP?
I'm working on my sip to pjsip translation. Right now I do some functionality based on what the user agent is on the calling phone using: ${SIPPEER(${CHANNEL(peername)},useragent)} I'm trying to replace it with PJSIP_CONTACT(${CHANNEL(contact)},user-agent}) but I'm not getting any data returned when I query ${CHANNEL(contact)} Is there a different function I should use to get my needed user agent of the active call? -- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ---Heinlein -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160926/3955c397/attachment.html>
Anthony Joseph Messina
2016-Sep-27 00:18 UTC
[asterisk-users] Finding the user agent of a channel using PJSIP?
On Monday, September 26, 2016 4:30:05 PM CDT John Kiniston wrote:> I'm working on my sip to pjsip translation. > > Right now I do some functionality based on what the user agent is on the > calling phone using: > > ${SIPPEER(${CHANNEL(peername)},useragent)} > > I'm trying to replace it with > > PJSIP_CONTACT(${CHANNEL(contact)},user-agent}) but I'm not getting any data > returned when I query ${CHANNEL(contact)} > > Is there a different function I should use to get my needed user agent of > the active call?How about ${PJSIP_HEADER(read,User-Agent)} -- Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery F9B6 560E 68EA 037D 8C3D D1C9 FF31 3BDB D9D8 99B6 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160926/4423d54d/attachment.pgp>