Google Drive error: invalid_client

invalid_client

If you are facing the following error while authorizing a 3rd Party application with Google Drive a simple step might fix this problem. Add Product Name under Consent Screen to fix the error: invalid_client … [Read more...]

Initializing NIST JAIN SIP Stack

This tutorial uses NIST SIP JAIN Reference Implementation. Download the NIST source code from here. … [Read more...]

Digest authorization in SIP with MD5 Challenge

During a SIP request if the server responds with 401 Proxy Authentication Required or 401 Unauthorized then it means the client has to replay the same request again with MD5 challenge. The client should use nonce value from the response header WWW-Authenticate. The client should use nonce to generate the MD5 challenge and make the original request again with the Authorization header. Steps to create the MD5 Challenge 1. Create first MD5 hash using username + ":" + realm + ":" + … [Read more...]

SIP Register Request using JAIN SIP

image_thumb

This tutorial uses NIST SIP JAIN Reference Implementation. Download the NIST source code from here. Note: To understand the Authorization process for handling 401 response code from server please go through this tutorial. REGISTER request is used to update the current location of a user on the REGISTRAR server. The application sends a REGISTER message informing the server its current location which in turn is stored in location server. When a caller calls a user the proxy server uses this … [Read more...]

Introduction to SIP

SIP stands for Session Initiation Protocol a signaling protocol defined by IETF used for controlling communication sessions. SIP is used to create, manage and terminate sessions in an IP based network. SIP is widely used in VOIP (Voice over IP) .   The two main entities in a SIP session are User Agent Client User Agent Server There are several types of server   Proxy Server Redirect Server Registrar Location Server   SIP is similar to HTTP protocol. To understand the differences … [Read more...]

Capturing Android SIP Logs using TCPDump

sip

Please make sure your device is rooted before following these steps. 1. Start adb in root mode by entering the following command             adb root 2. Download the tcpdump binary from either http://www.tcpdump.org or here 3. Push tcpdump to the device.             adb push tcpdump-arm /data/local/ 4. Make sure correct permission is set for tcpdump.             adb shell chmod 777 /data/local/tcpdump-arm 5. Start capturing the network packets. Replace any with your interface name. … [Read more...]

Setting Firefox location bar search engine

firefox

Recently I installed a freeware which came with ask.com plugin for firefox. This plugin after installing became default for lot of features in the browser which was really irritating me so had to remove the plugin. Even then any search I do by entering the keyword directly in the address bar (location bar) went through ask.com. If you are also facing similar problem here are the steps to set your favorite search engine. 1. Type in about:config in the location bar and press Enter 2. You … [Read more...]

Declaring java package and method signature in JRuby

jruby3

We can add the package declaration for the java classes generated by JRubyc by using java_package. Just add the following line before the JRuby class declaration java_package 'package name' And also make sure you have included the statement require 'java'. Now once you convert the code using jrubyc you will find that the package structure is automatically created. Similarly you can declare signatures for java methods using java_signature 'put method signature here' Now … [Read more...]

Converting JRuby to Java

jrubyc1

Now that we know how to write a basic JRuby code lets see how to convert the JRuby code in to Java code. JRuby comes with JRubyc a cross compiler that does the magic! Convert to Java code Convert JRuby Java class files Okay great! now you have Java source class for your JRuby class but what if you want to declare package and method signature for the generated java class? … [Read more...]

Introduction to JRuby

jruby1

JRuby JRuby is an implementation of Ruby which runs on top of Java Virtual Machine. JRuby code can be embedded in Java code and your JRuby code can interact with Java Objects and has access to every Java API. Why to use JRuby? Ruby being a scripting language is dynamic and much faster than Java. There are lot of things that can be easily accomplished in Ruby for example I found that parsing & scraping HTML is much easier and faster in Ruby using HPricot. As a Java programmer and you can … [Read more...]