Hi. I have WowzaStreamingEngine-4.2.0. I have application using securetoken2 with option “Include client IP address in hash generation”. I’m observing problem with ip address contains 2 digits (ex. 94.254.xxx.xxx). Then I get error
HTTPStreamerAdapterCupertinoStreamer.onPlaylist[live/mp4:myStream/playlist.m3u8?wowzatokenendtime=1490709720&wowzatokenstarttime=1490698920&wowzatokenhash=K93Wlv8C8RikCJAnq8ItjNMOpWqa_rxqftmcxubVHws=]: Session not accepted[1071131671]
On address wher every parts has 3 digits (xxx.xxx.xxx.xxx) the problem is no exist.
This is my code:
$ip = $_SERVER['HTTP_CLIENT_IP']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['REMOTE_ADDR']);
$wowzastart = strtotime(date('d-m-Y H:i'));
$wowzaend = strtotime(date('d-m-Y H:i')) + 10800;
$secret = '****';
$wowzatokenprefix = 'wowzatoken';
$hashstr = hash('sha256', 'live/mp4:myStream?'.$ip.'&'.$secret.'&'.$wowzatokenprefix.'endtime='.$wowzaend.'&'.$wowzatokenprefix.'starttime='.$wowzastart.'', true);
$usableHash= strtr(base64_encode($hashstr), '+/', '-_');
$url = "http://wowzaserver.com:1935/live/mp4:myStream/playlist.m3u8?".$wowzatokenprefix."endtime=".$wowzaend."&".$wowzatokenprefix."starttime=".$wowzastart."&".$wowzatokenprefix."hash=".$usableHash."";
It seems to be a problem with wowza.
Anyone can help me? What should I do?