I have been trying this new feature of collecting stats in the redis database using sample scripts "secure_relay_secret_with_db_redis.sh" and "secure_udp_client_with_secret.sh". Using the "monitor" command in redis-cli, I can see the turn server publishing "status" messages, e.g.
I could also use psubscribe command to receive "turn/user/*/allocation/*/traffic", e.g.
Reading messages... (press Ctrl-C to quit)
1) "psubscribe"
2) "turn/user/*/allocation/*/traffic"
3) (integer) 1
1) "pmessage"
2) "turn/user/*/allocation/*/traffic"
3) "turn/user/1380673614:jchan/allocation/0x39bac8ef/traffic"
4) "rcvp=1025, rcvb=224660, sentp=1023, sentb=281136"
1) "pmessage"
2) "turn/user/*/allocation/*/traffic"
3) "turn/user/1380673614:jchan/allocation/0x38c4e72f/traffic"
4) "rcvp=1025, rcvb=224672, sentp=1023, sentb=281124"
However, I could receive the above traffic information only once. Since then, I have restarted the scripts but no more traffic information is available.
Redis "monitor" command is used to look at the database activities. It seems that the turn server has published status messages but no traffic messages. e.g.
1380684952.920426 "publish" "__XXX__" "__YYY__"
1380684956.884392 "keys" "turn/secret/*"
1380684956.884476 "get" "turn/secret/test-rest-api"
1380684956.933683 "set" "turn/user/1380685556:jchan/allocation/0x34667335/status" "new lifetime=1800"
1380684956.933711 "publish" "turn/user/1380685556:jchan/allocation/0x34667335/status" "new lifetime=1800"
1380684956.933932 "set" "turn/user/1380685556:jchan/allocation/0x34667335/status" "refreshed lifetime=600"
1380684956.933952 "publish" "turn/user/1380685556:jchan/allocation/0x34667335/status" "refreshed lifetime=600"
1380684957.034311 "keys" "turn/secret/*"
1380684957.034383 "get" "turn/secret/test-rest-api"
1380684957.034610 "set" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "new lifetime=1800"
1380684957.034633 "publish" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "new lifetime=1800"
1380684957.034841 "set" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "refreshed lifetime=600"
1380684957.034865 "publish" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "refreshed lifetime=600"
1380684957.035105 "keys" "turn/secret/*"
1380684957.035171 "get" "turn/secret/test-rest-api"
1380684957.035477 "set" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "new lifetime=1800"
1380684957.035499 "publish" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "new lifetime=1800"
1380684957.035748 "set" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "refreshed lifetime=600"
1380684957.035771 "publish" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "refreshed lifetime=600"
1380684957.036364 "set" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "refreshed lifetime=600"
1380684957.036387 "publish" "turn/user/1380685556:jchan/allocation/0x2d0a5ed5/status" "refreshed lifetime=600"
1380684957.238240 "set" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "refreshed lifetime=600"
1380684957.238300 "publish" "turn/user/1380685556:jchan/allocation/0x2d6ad2c5/status" "refreshed lifetime=600"
1380684957.922167 "keys" "turn/secret/*"
1380684957.922280 "publish" "__XXX__" "__YYY__"
1380684962.923384 "keys" "turn/secret/*"
1380684962.923535 "publish" "__XXX__" "__YYY__"
I have restarted the redis database and turn server, but problem remains. I am using a packaged turn server (rfc5766-turn-server_2.6.2.1-1_amd64.deb) and redis-server 2.4.15-1 on an ubuntu 12.10 platform.
Not sure how to proceed further with this problem. Any suggestions are much appreciated.
Cheers,
Jonathan