Realtime PJSIP RTT
Hello all,
We would like to pull the RTT of registered endpoints from MySQL for use in a webportal. However it doesn’t appear asterisk tables this by default like chan_sip did.
I’ve found some information [1] that a modification of sorcery.conf can get it writing to a table. But I’m struggling to figure out what that configuration is. It seems the object is called “contact_status”, and I’ve tried [2] in sorcery.conf, But I’m not seeing any output or seeing anything else to follow with GoogleFu.
[1], A mailinglist crawler, i know:
[2], sourcery.conf
[res_pjsip]
******stuff***********
contact_status=realtime,ps_contact_status (Which I’ve also defined in extconfig)
*Nick Olsen*
Network Engineer Office: 321-408-5000 x103
Mobile: 321-794-0763
3 thoughts on - Realtime PJSIP RTT
Contact status is not a sorcery object and is kept strictly in memory. There’s no ability to store the information in a database, you’d need to query Asterisk.
Thanks Joshua, I assume by query asterisk you mean I’ll need to query it via AMI? Is that information available via AMI?
*Nick Olsen*
Network Engineer Office: 321-408-5000 x103
Mobile: 321-794-0763
There is the PJSIPShowContacts AMI action[1] which returns ContactList events[2] that contain the RTT. The ContactStatus event[3] is also raised when things change if the connection is persistent.
[1]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_PJSIPShowContacts
[2]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ContactList
[3]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerEvent_ContactStatus