-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I want to collect RTCP reports from snom devices via FS's event system. Unfortunately it doesn't support it. Maybe because it is still a draft: http://tools.ietf.org/html/draft-ietf-sipping-rtcp-summary-05 I wonder whether this feature is planed in near future. Nevertheless I hacked sofia.c and sofia-presence.c to get it working just for testing. Here is the "git diff": - ---DIFF------------------------------------------------------------------------ diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 2e13b54..3622506 100644 - --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1530,6 +1530,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("include-session-description")), TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("presence.winfo")), TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("message-summary")), + TAG_IF(profile->pres_type, NUTAG_ALLOW_EVENTS("vq-rtcpxr")), NUTAG_ALLOW_EVENTS("refer"), SIPTAG_SUPPORTED_STR(supported), SIPTAG_USER_AGENT_STR(profile->user_agent), TAG_END( switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set params for %s\n", profile->name); diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 143666c..c998280 100644 - --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2679,7 +2679,17 @@ void sofia_presence_handle_sip_i_publish(nua_t *nua, sofia_profile_t *profile, n pd_dup = strdup(payload->pl_data); - - if ((xml = switch_xml_parse_str(pd_dup, strlen(pd_dup)))) { + //EWETEL RTCP hack + //event_type = sip_header_as_string(profile->home, (void *) sip->sip_event); + if (strcmp(sip_header_as_string(profile->home, (void *) sip->sip_event), "vq-rtcpxr")==0) { + if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) { + switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "event_type", "vq-rtcpxr"); + switch_event_add_body(event, "%s", pd_dup); + switch_event_fire(&event); + } + } + //DONE + else if ((xml = switch_xml_parse_str(pd_dup, strlen(pd_dup)))) { char *open_closed = "", *note_txt = ""; if (sip->sip_user_agent) { - ---DIFF END----------------------------------------------------------- It simply allows SIP PUBLISH events of type "vq-rtcpxr" and adds the sip payload to the internal event body. The corresponding event is this: Content-Length: 1178 Content-Type: text/event-plain Event-Name: PRESENCE_IN Core-UUID: f852daae-6da9-4979-8dc8-fa11651a7891 FreeSWITCH-Hostname: test FreeSWITCH-IPv4: 1.2.3.4 FreeSWITCH-IPv6: %3A%3A1 Event-Date-Local: 2010-12-21%2015%3A19%3A09 Event-Date-GMT: Tue,%2021%20Dec%202010%2014%3A19%3A09%20GMT Event-Date-Timestamp: 1292941149981062 Event-Calling-File: sofia_presence.c Event-Calling-Function: sofia_presence_handle_sip_i_publish Event-Calling-Line-Number: 2685 event_type: vq-rtcpxr Content-Length: 703 VQSessionReport LocalMetrics: Timestamps:START=2010-12-21T14:19:08Z STOP=2010-12-21T14:19:10Z SessionDesc:PT=9 PD=G.722 PPS=50 SSUP=off CallID:3c2f99c5dc8f-k1jiuwkd70m9 x-UserAgent:snom370/8.4.22 FromID:"Helmut Kuper" <sip:8000@sipdomain.de> ToID:<sip:***6@sipdomain.de;user=phone> LocalAddr:IP=85.16.245.234 PORT=10568 SSRC=0xF919B973 RemoteAddr:IP=85.16.246.16 PORT=19770 SSRC=0x DialogID:3c2f99c5dc8f-k1jiuwkd70m9;to-tag=7HU6y795c8r8B;from-tag=rbxbm5jjme x-SIPmetrics:SVA=RG SRD=890 SFC=0 x-SIPterm:SDC=OK SDR=OR JitterBuffer:JBA=0 JBR=0 JBN=0 JBM=0 JBX=65535 PacketLoss:NLR=0.0 JDR=0.0 BurstGapLoss:BLD=0.0 BD=0 GLD=0.0 GD=2440 GMIN=16 Delay:RTD=0 ESD=0 IAJ=0 QualityEst:MOSLQ=4.2 MOSCQ=4.1 regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0QuwgACgkQ4tZeNddg3dx6/gCgij7KZDD0qHLFkujDjzH/hYu+ 7UEAn2SM1eFQsPA6ICNxtexEprdWyGCk =kbkn -----END PGP SIGNATURE-----
On 12/21/2010 03:34 PM, Helmut Kuper wrote:
Hi,
I want to collect RTCP reports from snom devices via FS's event system. Unfortunately it doesn't support it. Maybe because it is still a draft:
http://tools.ietf.org/html/draft-ietf-sipping-rtcp-summary-05
I wonder whether this feature is planed in near future.
Nevertheless I hacked sofia.c and sofia-presence.c to get it working just for testing. Here is the "git diff":
Can you please open a ticket on jira.freeswitch.org and attach your patch (diff against latest git) for review: Create new issue -> select project FreeSWITCH -> select mod_sofia Then provide information and your patch. Thanks and regards, Patrick
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Patrick, ok done. Regards helmut Am 21.12.2010 18:49, schrieb Patrick Lists:
Can you please open a ticket on jira.freeswitch.org and attach your patch (diff against latest git) for review:
Create new issue -> select project FreeSWITCH -> select mod_sofia Then provide information and your patch.
Thanks and regards, Patrick
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0Rq78ACgkQ4tZeNddg3dxSgQCeNu++2P7JdO8rpzUhwktR8YPV UmEAnji9I33lMGlvLwiHbY2wtVAN4Lpg =j7TB -----END PGP SIGNATURE-----
On 12/22/2010 08:41 AM, Helmut Kuper wrote:
Hi Patrick,
ok done.
Regards helmut
Hi Helmut, Thanks. I just noticed that there is another patch in Jira that also relates to RTCP reports: http://jira.freeswitch.org/browse/FS-949 If it makes sense perhaps you and Guillaume can work together to merge your patches and come up with one? Also it's probably a good idea to ask the core developers what their intentions are regarding RTCP and see if both your patches fit their ideas. Regards, Patrick
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Patrick,
Thanks. I just noticed that there is another patch in Jira that also relates to RTCP reports: http://jira.freeswitch.org/browse/FS-949 If it makes sense perhaps you and Guillaume can work together to merge your patches and come up with one?
I just emailed Guillaume. His patch seems to add some more informations from periodically received RTCP reports to RECV_RTCP_MESSAGE while mine is collecting the Vendor specific RTCP report after a call has terminated. But basically I guess we both just want a detailed QOS report to keep track of the network/voice quality.
Also it's probably a good idea to ask the core developers what their intentions are regarding RTCP and see if both your patches fit their ideas.
That was exactly my intention in my first email yesterday. "I wonder whether this feature is planed in near future." The biggest pain in my project is currently that I have nearly no tools to debug RTP data for calls from the past. Mainly I have have rare cases where the first 0.5 second of "Hello" is missed and also rare cases where one RTP datastream is completely missed. Sure, this could be caused by Network or SIP-Devices instead by FS, but back in reality I am the one who has to deliver the first facts for starting debugging outside of FS. best regards helmut -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0R0EEACgkQ4tZeNddg3dxR1ACfQmMl/4T7vY+yGzOlAcxCFRXC VMAAnjYQC76/sgF9L3PbSQCN6nWxk7Il =/+hT -----END PGP SIGNATURE-----
participants (2)
-
Helmut Kuper
-
Patrick Lists