Hi,
my asterisk 14.6 doesn’t sent any latency information or the rtt
value in the RTCP stat to my homer server:
{"ssrc":298457265,"type":200,"report_count":1,"sender_information":{"ntp_timestamp_sec":"1510757157","ntp_timestamp_usec":"527611","rtp_timestamp":44536,"packets":279,"octets":44640},"report_blocks":[{"source_ssrc":1175133903,"fraction_lost":0,"packets_lost":0,"highest_seq_no":59510,"ia_jitter":5,"lsr":"0","dlsr":0}]}
I can see the rtt
during a call with
CLI> pjsip show channelstats
...........Receive......... .........Transmit..........
BridgeId ChannelId ........ UpTime.. Codec. Count Lost Pct Jitter Count Lost Pct Jitter RTT....
===========================================================================================================
7d5a7e23 kamailio-gw-000000 00:00:20 ulaw 488 0 0 0.000 488 0 0 0.000 0.100
7d5a7e23 kamailio-web-00000 00:00:20 opus 488 0 0 0.000 489 0 0 0.004 0.122
Objects found: 2
so I’m trying to add a custom P-RTP-Stat
in the Bye or the Bye reply 200 ok for on the caller’s (incoming) channel in the dialplan but without success:
[macro-stdexten]
...
exten => s,n,Set(CHANNEL(hangup_handler_push)=hdlrxstat,s,1)
...
[hdlrxstat]
exten => s,1,NoOp(-- hangup: add rtcp stat header--)
exten => s,n,NoOp(P-RTP-Stat: PS=${CHANNEL(rtcp,txcount)},PR=${CHANNEL(rtcp,txcount)},PL=${MATH(${CHANNEL(rtcp,remote_normdevrxploss)}*100,int)},JI=${MATH(${CHANNEL(rtcp,remote_normdevjitter)}*1,int)},LA=${MATH(${CHANNEL(rtcp,normdevrtt)}*100,int)},DU=${CDR(billsec)})
exten => s,n,Set(PJSIP_HEADER(add,P-RTP-Stat)=PS=${CHANNEL(rtcp,txcount)},PR=${CHANNEL(rtcp,txcount)},PL=${MATH(${CHANNEL(rtcp,remote_normdevrxploss)}*100,int)},JI=${MATH(${CHANNEL(rtcp*1,remote_normdevjitter)},int)},LA=${MATH(${CHANNEL(rtcp,normdevrtt)}*100,int)},DU=${CDR(billsec)})
exten => s,n,Return()
I just can’t work out what is wrong with this !
Thanks in advance for any help
/Ouss