sip interview questions
Top sip frequently asked interview questions
I am trying to run linphone code which I get from git://git.linphone.org/linphone-android.git --recursive .
After downloading it successfully, I tried to compile and run it as per the README file. I used Cygwin for Autotools, Autoconfig, Automake, aclocal, libtoolize and pkgconfig & Android ndk r8d.
then I executed the prepare_sources.sh shell script in cygwin which downloaded some needed resuorces.
After following all the steps, when I tried to run the code I get an UnsatisfiedLinkError exception on runtime and application crashes.
I also get to know from logcat that some libraries are unable to load due to which the above exception took place and crashed the app. Here is the Logcat output :
02-26 10:03:55.739: W/Unable to load optional library lib(1084): avutil
02-26 10:03:55.749: W/Unable to load optional library lib(1084): swscale
02-26 10:03:55.759: W/Unable to load optional library lib(1084): avcore
02-26 10:03:55.769: W/dalvikvm(1084): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/linphone/core/LinphoneCoreFactoryImpl;
02-26 10:03:55.769: D/AndroidRuntime(1084): Shutting down VM
==================================================================================
02-26 10:03:55.769: W/dalvikvm(1084): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
02-26 10:03:55.869: E/AndroidRuntime(1084): FATAL EXCEPTION: main
02-26 10:03:55.869: E/AndroidRuntime(1084): java.lang.ExceptionInInitializerError
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.Class.classForName(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.Class.forName(Class.java:217)
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.Class.forName(Class.java:172)
02-26 10:03:55.869: E/AndroidRuntime(1084): at org.linphone.core.LinphoneCoreFactory.instance(LinphoneCoreFactory.java:43)
02-26 10:03:55.869: E/AndroidRuntime(1084): at org.linphone.LinphoneManager.startLibLinphone(LinphoneManager.java:417)
02-26 10:03:55.869: E/AndroidRuntime(1084): at org.linphone.LinphoneManager.createAndStart(LinphoneManager.java:226)
02-26 10:03:55.869: E/AndroidRuntime(1084): at org.linphone.LinphoneService.onCreate(LinphoneService.java:165)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2529)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.app.ActivityThread.access$1600(ActivityThread.java:141)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.os.Handler.dispatchMessage(Handler.java:99)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.os.Looper.loop(Looper.java:137)
02-26 10:03:55.869: E/AndroidRuntime(1084): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.reflect.Method.invokeNative(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.reflect.Method.invoke(Method.java:511)
02-26 10:03:55.869: E/AndroidRuntime(1084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-26 10:03:55.869: E/AndroidRuntime(1084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-26 10:03:55.869: E/AndroidRuntime(1084): at dalvik.system.NativeStart.main(Native Method)
02-26 10:03:55.869: E/AndroidRuntime(1084): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load neon from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.linphone-1.apk,libraryPath=/data/app-lib/org.linphone-1]: findLibrary returned null
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.Runtime.loadLibrary(Runtime.java:365)
02-26 10:03:55.869: E/AndroidRuntime(1084): at java.lang.System.loadLibrary(System.java:535)
02-26 10:03:55.869: E/AndroidRuntime(1084): at org.linphone.core.LinphoneCoreFactoryImpl.<clinit>(LinphoneCoreFactoryImpl.java:47)
02-26 10:03:55.869: E/AndroidRuntime(1084): ... 18 more
Can anybody help me to get it solved.?
A solution for this, is greatly appreciated.. Thanks in advance.
Source: (StackOverflow)
I need to write VoIP/SIP Soft Phone in C# using WPF interface with Audio support only.
I need to have call transfer, call conference, and recording of conversations in mp3.
I've looked at VoIP SDK from ABTO LLC, but it is slow at application startup (30 seconds to start application, I think it's related to loading activex part of this sdk).
I've also looked at SIP.Net, but it's only for SIP and doesn't contain components for voice data transfer.
I have very limited time only 2 months from zero to fully working app.
What SDK can I use to accomplish this task?
Windows 7 must be supported.
Source: (StackOverflow)
I want to write a javascript application which works with PJSIP in order to create sip calls to IP phone.
The project example is GreenJ
However the sample forces me to work with Qt as a test telephone on the other side.
I don't want Qt to be the telephone on the other side, but my IP Phone to be.
Trying to remove "qt_handler" caused a compilation error in "phone-lib.js" file.
Can anyone help me with that or give a simple hello world JavaScript example to use PJSIP?
Thanks !
Source: (StackOverflow)
I am working on a softphone project using mjsip sip stack. Mjsip only supports g711 or PCMA/PCMU codec. I have added G729 to my project. When I build the project it shows no error. But when the phones get connected it the call gets established there is no voice transmitting, actually my app doesn't generate any rtp packets. And in the log there shows a error like
java.lang.NullPointerException
RtpStreamReceiver - run -> Terminated.
at local.media.RtpStreamReceiver.run(RtpStreamReceiver.java:171)
I have failed to find the bug.
Here is my RtpStreamReceiver.java class.
package local.media;
import local.net.RtpPacket;
import local.net.RtpSocket;
import java.io.*;
import java.net.DatagramSocket;
import org.flamma.codec.SIPCodec;
/** RtpStreamReceiver is a generic stream receiver.
* It receives packets from RTP and writes them into an OutputStream.
*/
public class RtpStreamReceiver extends Thread {
public static int RTP_HEADER_SIZE = 12;
private long start = System.currentTimeMillis();
public static final int SO_TIMEOUT = 200; // Maximum blocking time, spent waiting for reading new bytes [milliseconds]
private SIPCodec sipCodec = null; // Sip codec to be used on audio session
private RtpSocket rtp_socket = null;
private boolean socketIsLocal = false; // Whether the socket has been created here
private boolean running = false;
private int timeStamp = 0;
private int frameCounter = 0;
private OutputStream output_stream;
public RtpStreamReceiver( SIPCodec sipCodec, OutputStream output_stream, int local_port )
{
try {
DatagramSocket socket = new DatagramSocket( local_port );
socketIsLocal = true;
init( sipCodec, output_stream, socket );
start = System.currentTimeMillis();
}
catch ( Exception e ) {
e.printStackTrace();
}
}
public RtpStreamReceiver( SIPCodec sipCodec, OutputStream output_stream, DatagramSocket socket )
{
init( sipCodec, output_stream, socket );
}
/** Inits the RtpStreamReceiver */
private void init( SIPCodec sipCodec, OutputStream output_stream, DatagramSocket socket )
{
this.sipCodec = sipCodec;
this.output_stream = output_stream;
if ( socket != null ) {
rtp_socket = new RtpSocket( socket );
}
}
/** Whether is running */
public boolean isRunning()
{
return running;
}
/** Stops running */
public void halt()
{
running = false;
}
/** Runs it in a new Thread. */
public void run()
{
if ( rtp_socket == null )
{
println( "run", "RTP socket is null." );
return;
}
byte[] codedBuffer = new byte[ sipCodec.getIncomingEncodedFrameSize() ];
byte[] internalBuffer = new byte[sipCodec.getIncomingEncodedFrameSize() + RTP_HEADER_SIZE ];
RtpPacket rtpPacket = new RtpPacket( internalBuffer, 0 );
running = true;
try {
rtp_socket.getDatagramSocket().setSoTimeout( SO_TIMEOUT );
float[] decodingBuffer = new float[ sipCodec.getIncomingDecodedFrameSize() ];
int packetCount = 0;
println( "run",
"internalBuffer.length = " + internalBuffer.length
+ ", codedBuffer.length = " + codedBuffer.length
+ ", decodingBuffer.length = " + decodingBuffer.length + "." );
while ( running ) {
try {
rtp_socket.receive( rtpPacket );
frameCounter++;
if ( running ) {
byte[] packetBuffer = rtpPacket.getPacket();
int offset = rtpPacket.getHeaderLength();
int length = rtpPacket.getPayloadLength();
int payloadType = rtpPacket.getPayloadType();
if(payloadType < 20)
{
System.arraycopy(packetBuffer, offset, codedBuffer, 0, sipCodec.getIncomingEncodedFrameSize());
timeStamp = (int)(System.currentTimeMillis() - start);
output_stream.write(codedBuffer,offset,length);
}
}
}
catch ( java.io.InterruptedIOException e ) {
}
}
}
catch ( Exception e ) {
running = false;
e.printStackTrace();
}
// Close RtpSocket and local DatagramSocket.
DatagramSocket socket = rtp_socket.getDatagramSocket();
rtp_socket.close();
if ( socketIsLocal && socket != null ) {
socket.close();
}
// Free all.
rtp_socket = null;
println( "run", "Terminated." );
}
/** Debug output */
private static void println( String method, String message ) {
System.out.println( "RtpStreamReceiver - " + method + " -> " + message );
}
And the line 171 is: output_stream.write(codedBuffer,offset,length);
If you are interested here is the full project source.
Source: (StackOverflow)
I need to write python application connect to trixbox that run as SIP server. But I not found any library that implement in python. I found SIP SKD at http://www.vaxvoip.com/ but it not support python. Can anyone suggest me an alternative to VaxVoip?
Thank you.
Source: (StackOverflow)
I want to develop a program for a video calls in android. I thought of using the built in sip that introduced in android 2.3.3. But how can I initiate the video calls? I see that it is not supported.
Source: (StackOverflow)
I'm working on developing a SIP application in Java and wondering what is the most used SIP library currently.
MJSIP?
Source: (StackOverflow)
Recently I am working on an application in which I have to implement application to application voice call and instant messaging like Viber and Line.
I did some R&D and got two methods to implement voice call.
SIP
a. android.net.sip
b. SIP API Classes and Interface
VoIP
But I am confused how to use it. How to Setup SIP server for my app on my own server and on what basis I will call my friends like I have 4 friends in my app contacts.I have to call second one, then what parameter should I pass to call him/her using SIP.
Source: (StackOverflow)
I have been looking for some framework for an android device that enables the reInvite method over the SIP protocol. My utter goal is to be able to switch codecs while in call. I have tried to do so with some existing libraries but i have come to a dead-end.
I have tried to use SipDroid which has a set_codec() method but I haven't managed to find any decent documentation about that. I have also tried with the native android.net.sip library but I didn't seem to find out how to change them there either... Does anyone have any advice on such a library that supports reInvite in the way I have described, or any tips on using the libraries I have mentioned? Thank you in advance...
ps : I have tried using mobicents and asterisk as servers..
Source: (StackOverflow)
I am attempting to setup SIP communication with an internal server (using the PJSIP library), however, this server requires a custom header field with a specified header value for the REGISTRATION
call. For example's sake we'll call this required header MyHeader
.
From what I have found, the pjsua_acc_add()
function will add an account and register it to the server using a config struct.
The parameter reg_hdr_list
of the config struct has the description:
The optional custom SIP headers to be put in the registration request.
Which sounds like exactly what I need, however doesn't seem to have any effect on the call itself.
Here's what I have so far:
pjsua_acc_config cfg;
pjsua_acc_config_default(&cfg);
//...Some other config stuff related to the server...
pjsip_hdr test;
test.name = pj_str("MyHeader");
test.sname = pj_str("MyHdr");
test.type = PJSIP_H_OTHER;
test.prev = cfg.reg_hdr_list.prev;
test.next = cfg.reg_hdr_list.next;
cfg.reg_hdr_list = test;
pj_status_t status;
status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);
From the server side, there are no extra header fields or anything. And the struct that is used to define the header (pjsua_hdr
) has no value
or equivalent field, so even if it did create the header, how does it set the value?
Here is the refrence for the header list definition and the reference for the header struct.
Edit: I found the solution thanks to a co-worker:
struct pjsip_generic_string_hdr CustomHeader;
pj_str_t name = pj_str("MyHeader");
pj_str_t value = pj_str("HeaderValue");
pjsip_generic_string_hdr_init2(&CustomHeader, &name, &value);
pj_list_push_back(&cfg.reg_hdr_list, &CustomHeader);
This seems to work as expected.
Source: (StackOverflow)
I am looking for integrate Linphone library in my ios project. And I dont find tutorial to help me. This project offers very little documentation, but seems to work well.
For information, here is the project page which provides its open source code :
Linphone open source code
I already compiled sources by following all steps and this work very well, But the next step is to integrate a part of code in my personal iPhone project for use SIP layer, with the management of audio and video.
In the case of my use, it will not be the user but the application that will automatically call if needed (my project is for home automation system).
The Linphone application seems very complex to integrate into other projets, because there is a lot of library to include and lot of configurations ...
I have not found any examples on the internet and I confess I do not know where to start without help, without a way to do the integration.
So if you have any source (tutorial) that can help me or if you have ever experienced to integrate this library, this held me a very great help.
Thank you for your time ;p
Source: (StackOverflow)
I am looking for a good SIP library either written in C# or that provides a C# wrapper. Does not necessarily need to be free. Has anyone used anything good?
To clarify, I am talking about the VoIP protocol SIP.
I am really looking for more than a google search on this one. I would like to someone to come back and say "We use __, and it works great."
To clarify further, I am looking for a library that would help me to implement a SIP proxy server without having to manually construct the SIP packets. I'm not looking for asterisk, freeswitch or any other pbx software.
I am looking to create a service in C#, that will wait for SIP packets and respond to them and I would like a library that would handle most of the details.
Source: (StackOverflow)
I need to create SIP phone on android witch will work with asterix and will give users possibilite to change codecs (i need to implemeant G729 and some other codecs). I'm new in this field ( voice and codec), and every bit of information will be appreciated. In my study throughout the internet i found this SIP stacks:
- PJSIP
- MJSIP
- JAIN SIP
What do you recomend to use for a commercial program? Or you can recomend some other?! It must support G729 codec.
Thanks in advance
Jovan
Source: (StackOverflow)
I am searching for a tool that tests SIP calls. A platform that makes a call from SIP device A to SIP device B and reports results...
Any idea? A simulation platform would be ideal.
thnx,
cateof
Source: (StackOverflow)