Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Finding the user agent of a channel using PJSIP?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
johnkiniston at gmail.com
Guest





PostPosted: Mon Sep 26, 2016 6:30 pm    Post subject: [asterisk-users] Finding the user agent of a channel using P Reply with quote

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
Back to top
amessina at messinet.com
Guest





PostPosted: Mon Sep 26, 2016 7:18 pm    Post subject: [asterisk-users] Finding the user agent of a channel using P Reply with quote

On Monday, September 26, 2016 4:30:05 PM CDT John Kiniston wrote:
Quote:
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
http://www.asterisk.org/community/astricon-user-conference

New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services