|
<html>
|
|
<head>
|
|
<title>Axia SDP generator</title>
|
|
<script type="text/javascript">
|
|
function mksdp(srcnode, chan)
|
|
{
|
|
var b2, b3, mcastip, sdp;
|
|
b2 = Math.floor(chan / 256);
|
|
b3 = chan - b2 * 256;
|
|
mcastip = "239.192." + b2 + "." + b3;
|
|
|
|
sdp = "v=0\n";
|
|
sdp += "o=Node 1 1 IN IP4 " + srcnode + "\n";
|
|
sdp += "s=TestSine" + "\n";
|
|
sdp += "t=0 0" + "\n";
|
|
sdp += "a=type:multicast" + "\n";
|
|
sdp += "c=IN IP4 " + mcastip + "\n";
|
|
sdp += "m=audio 5004 RTP/AVP 96" + "\n";
|
|
sdp += "a=rtpmap:96 L24/48000/2" + "\n";
|
|
return sdp;
|
|
}
|
|
|
|
function updsdp()
|
|
{
|
|
var tnode, tchan, sdp, tsdp;
|
|
sdp = "";
|
|
tnode = document.getElementById("tsrcnode");
|
|
tchan = document.getElementById("tchan");
|
|
tsdp = document.getElementById("txtsdp");
|
|
|
|
if(tnode && tnode.value && tchan && tchan.value) {
|
|
sdp = mksdp(tnode.value, parseInt(tchan.value));
|
|
}
|
|
|
|
tsdp.innerHTML = "<p>" + sdp.replace(/\n/gi, "<br>") + "</p>";
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="updsdp()">
|
|
<p><b>Axia Livewire SDP Generator version 1.0</b></p>
|
|
<form>
|
|
<table>
|
|
<tr>
|
|
<td>Source node IP address:</td><td><input id="tsrcnode" type="text" value="172.16.235.155" onkeyup="updsdp()" onchange="updsdp()" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Livewire channel number:</td><td><input id="tchan" type="text" value="1" onkeyup="updsdp()" onchange="updsdp()" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<div id="txtsdp"></div>
|
|
</body>
|
|
</html>
|