[CENTOS] How to take screen shot on Centos 6.x

ISSUE: Screen shot is a necessary part of developers life. So you must know how to take screen shot in any OS. When taking screen shot by "Prnt Scrn" button centos give error like -

There was an error running "gnome-screenshot":
Failed to execute child process "gnome-screenshot" (No such file or directory).

Fix: This issue arise due to gnome util's  unavailability. So just install it by yum as a root -

yum install gnome-utils


and enjoy screening.

[SOCKET] On udp recvfrom peer address return 0.0.0.0:0

ISSUE: When using udp socket it is necessary to know the remote peer address from where the data is received. In future this can be used for sending and tracking messages. If you are ICE or STUN ,TURN developer then its a must.

char recv_data[1024];
int sin_size;
struct sockaddr_in remote_addr;
int bytes_recv = recvfrom(mySock, recv_data,1024,0,(struct sockaddr *)&remote_addr,(socklen_t*)&sin_size);

printf("got packet from IP:Port :: %s:%d\n",inet_ntoa(remote_addr.sin_addr), ntohs(remote_addr.sin_port));  
   

In receiving data which returns remote port and IP as 0.0.0.0:0


Fix: Its happen because the sin_size is not initialize as it takes garbage bellow from system. So just initialize the sin_size will fix that.


 sin_size = sizeof(remote_addr);


So enjoy socket programming :)

[Asterik] configure: WARNING: *** Please install the SQLite3 development package. on Asterik

ISSUE: Asterik need SQLITE3 , when it doesn't find this then shows the following warnings -

configure: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database.
configure: WARNING: *** Please install the SQLite3 development package.
And the configure fails.


Fix:

yum install sqlite, sqlite-devel


And you are done.

[ASTERIK] configure: error: *** uuid support not found (this typically means the uuid development package is missing)

ISSUE: Build error on Asterik , when you want test webrtc feature :)

checking for uuid_generate_random in -luuid... no
checking for uuid_generate_random in -le2fs-uuid... no
checking for uuid_generate_random... no
configure: error: *** uuid support not found (this typically means the uuid development package is missing)


Fix: This issue arises due to missing of UUID generator specified by rfc4122 .

+Linux

sudo apt-get install uuid-dev 

@Unix
yum -y install libuuid-devel


Asterik comes with lots of helpful script available on - asterisk/contrib/scripts/ folder of your ASTERIK source.

So just use the following command on UNIX console to run the asterik pre-requisite script.

contrib/scripts/install_prereq install

And you are done! configuring.

Now --

Make Asterik.