Sunday, October 13, 2019

How to calculate the actual RTP wall clock timestamp?

The packets arrived at different times, so their timestamps should be slightly different. But you use the difference between the NTP and RTP timestamps in the RTCP packets to determine the offset between RTP timestamps and the NTP time.


In Wireshark, you can see the "Timestamp, MSW" and "Timestamp, LSW" - these are the NTP timestamp at the time the RTCP packet was sent. You can also see the "RTP timestamp". Now, to determine the RTP offset, just shift the RTP timestamp left 16 bytes and then subtract from the NTP timestamp. Every RTP packet that comes later will have the RTP timestamp with the same offset from the NTP timestamp.
Here is the next RTP timestamp that I got in Wireshark after the RTCP packet shown above:


References:
https://github.com/bytedeco/javacpp-presets/issues/374

VoIP test from Ring Central

The QoS page is https://www.ringcentral.com/support/qos.html

When I tried to debug the stream that is sent over, the Wireshark never shown it as RTP. Instead it was pure UDP stream. In this case, the RTP protocol was enabled in the enabled filters in the Wireshark. When enabled all the protocols, it resulted in showing the stream as Skype Audio, so it is some kind of audio but not recognised as audio really.

References:
https://www.ringcentral.com/support/qos.html

What does npm Pack do ?

Running npm pack on the folder where the Express or Node JS files are present, just zips the files and gives a compressed file. Nothing more!.. If unzip, we can notice the files which are originally source codes are still present as is!. Nothing much it does if looking for a mangled source code.


References:
https://docs.npmjs.com/cli/pack.html

SSH how to connect to an environment with port other than standard

Thats pretty simple, just specify the port using -p option

ssh user@192.168.1.1 -p 26

Like this above!.

References:
https://askubuntu.com/questions/264046/how-to-ssh-on-a-port-other-than-22

How to know the OS environment after login using ssh

It is pretty easy

Open the terminal application (bash shell)
For remote server login using the ssh: ssh user@server-name
Type any one of the following command to find os name and version in Linux:

cat /etc/os-release
lsb_release -a
hostnamectl
Type the following command to find Linux kernel version:
uname -r

This gives output like the below

NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful


References:
https://www.cyberciti.biz/faq/how-to-check-os-version-in-linux-command-line/


What is Amazon Linux?

Amazon Linux is a distribution that evolved from Red Hat Enterprise Linux (RHEL) and CentOS. It is available for use within Amazon EC2: it comes with all the tools needed to interact with Amazon APIs, is optimally configured for the Amazon Web Services ecosystem, and Amazon provides ongoing support and updates. You should not use this distribution for your EC2 instances, however, as the convenience of Amazon Linux does not outweigh this significant operational downside: there is no official distribution of Amazon Linux for use outside the Amazon cloud.

Why does this matter? The obvious first answer is that use of Amazon Linux creates additional migration costs when moving to another cloud service. By using it you are locking yourself in just that little bit more, and entirely unnecessarily. There are any number of other stable, well supported distributions you can use in EC2, and installing the tools for working with Amazon APIs is a trivial few lines of shell script for any of them. So why make life difficult for yourself when you don't have to?


References
https://www.exratione.com/2014/08/do-not-use-amazon-linux/

SCP how to transfer files to a specific port and with username and password

Usually scp is used with a pem file. Below gives info about SCP usage with username and password.

 scp -P 8222 //filetoupload.zip   user@myremotelocation:/home/mylogin/

/home/mylogin is the login on the remote machine

-P options give facility to specify the Port number to upload the file.

Myremotelocation is the remote location that is the hostname of the target machine.

References:
https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/