Error: pjsip gives `mod_sofia` insetad of the actual phone number - c

I am working on project in which I use Sipek Voip for connecting to Freeswitch. Here is the situation:
I have a Sangoma A400 hard. I compiled Freeswitch for Windows and now it works perfectly.
I have also created a Softphone using Sipek Voip SDK and it works well with Freeswitch.
The problem is that, when I have an incoming call, instead of showing the callers number, I get mod_sofia.
I looked at Sipek and all it gets from pjsip is a string containing <sip:mod_sofia#192.168.2.10:5060>.
So I went to pjsip and tried to pass the actual phone number to Sipek. I found out there is a function called pjsua_call_on_incoming which handles an incoming call.
It takes an argument of type pjsip_rx_data. It has a string field (rdata->msg_info.msg_buf) which contains the whole message. I tried to replace <sip:mod_sofia#192.168.2.10:5060> with the actual number, but it has no effect.
Does anyone have any idea how to fix this?

You can check this link for tracking the issue. Unfortunately there are hardly any people who can help you out with Open source projects "for free" even on a forum. I just speak from my personal experience. I am facing the same problem, and cannot figure it out till now, though I have solved many issues that I used to face with SIPEK, all on my own.

I've not understood the root of your problem is in FreeSWITCH or in sipek/pjsip.
This entry on FreeSWITCH wiki could help you debug the sip stack in FreeSWITCH:
http://wiki.freeswitch.org/wiki/Mod_sofia#Debugging_Sofia-SIP
in a way similar to a wireshark capture.
I'm sorry I don't know how to help you trace down the parsing/rendering of msg_info.msg_buf in pjsip.

Add sip_contact_user=xxxx in your dialstring.

Related

Getting raw multitouch data with libinput

I'd like to get the raw multitouch data from my touchpad in order to.
I've tried using libevdev but my success was limited and I couldn't do what I wanted. I found out about libinput which might be more abstracted, and found out how to use it to automatically get the gestures (for example using libinput-debug-events) but I find them limited and would like to get the raw input (with each finger's movement).
Is there any way to do this with libinput, or not?
I couldn't find any helpful documentation: I found this one but couldn't find any example or route to follow. Actually, I think that I could make myself a way through my problems if I understood how to use these functions, but it's far from clear, and I'm getting in a lot of trouble installing libinput itself (for example, commands like libinput debug-gui aren't recognized by my system).
Any help is appreciated.
Don't know if this helps or not, but on my distro (Ubuntu) I installed libinput-tools.
sudo libinput debug-gui
Also gives me an error:
debug-gui is not a libinput command or not installed.
However,
sudo libinput debug-events
will print out events in the terminal just fine.

Wierd Dbus Issue - dbus_connection_send fail

I am a beginner to DBus and wrote one sample application using dbus but i am facing a weird problem. My app is running fine on guest os as Ubuntu (On virtual box with windows host ) but the same app is not working on standalone Ubuntu system (also tried on meego, no luck thr as well).
Then, i verified the obvious doubts on dbus, glib libraries versions. Its same on both the environments, and the issue is consistent. I mean the app always runs without any prob on virtual box and always crashes on the standalone ubuntu.
Here is the brief desc about the issue.
App is supposed to send 150 signals on dbus and another app is
receiving these signals. (No issues here in send & receive).
I have an array of DbusMessage[150] (also tried with the list of 150 DBusMessage)...appending the arguments on to the dbus msg and sending on to bus..one at a time...no looping...
The sequence of dbus APIs are all correct and verified by referencing multiple sample source code.
All of above works fine, but on the standalone ubuntu system, i can always see segmentation fault, on dbus_connection_send() call.
I reverified everypossible places where in "seg faults" can happen and it all looks fine to me. This is how i am appending my arg to dbus message.
dbus_message_append_args(pDbusMsg, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &pData, sizeof(pData),
DBUS_TYPE_INVALID) != TRUE)
then connection send..and then calling dbus_connection_flush(). Also as my app has to send the same message again (but not immediately), i am re registering the same signal by calling dbus_message_new_signal()..i have verified all the pointers / memory / dbusmessage..everything looks fine and works fine on virtualized ubuntu os.
Just to add, i tried sending with dbus_connection_send_preallocated() and it works fine for few messages(10-15~), but not consistent enough.
Have you ever had this kind of issue, please let me know any clue to solve this prob....Any help would be appreciated or any examples/tutorials as well taking into consideration I'm just starting out with dbus :P
Thanks
I dont know if you have heard about dbus related debugging tools. For beginning you can try calling the exposed functions using some dbus-debugging-tool. If it doesnt throw segmentation fault when you call using the tool, then probably you should look for issues in your code. Otherwise you should check things related to environment.
One such tool is - DFeet
Another such debugger(commandline based) is provided by Qt people as well.

URL is being Truncated

We have a link in a silverlight application:
http://xx.xxx.xxx.xxx:xxxx/ord?station:|slot:/Drivers/xxxxxxxxxx/xxxxxxxxxx
When our client tries running the applicaiton it is supposed to access the link directly, however, it appears to be truncating the url to:
http://xx.xxx.xxx.xxx:xxxx/
We are unable to reproduce the issue on our systems, but the person says he gets the same result on his work computer and his home computer. Any Ideas?
Sounds like a possible EBKAC problem (Error Between Keyboard And Chair) :)
You need to see exactly what this user is doing (cut & paste from multi-line links in emails can cause this sort of problem).

SHOUTcast in Windows Phone 7

I know people have asked this before, but i see no answer nor people even commenting about it.
So, i'm trying to make SHOUTcast streaming in WP7, anyone have done it? I know i have to use MediaStreamSource with my MediaElement, but how exactly can i skip that header from SHOUTcast and just get the stream and use it in a MediaStreamSource? Is there any app that has done it? Someone actually has some example working code?
There is a really good SHOUTcast Player called streamything (http://www.streamything.com/page/en/default.html) . Unfortunately it is not open source nor freeware but i shows that it is definitely a way to do that.
You need to setup a mechanism to get the stream of data to be passed to the application continuously. Here is a possible implementation. In order to be able to receive the stream directly (so that the application won't be treated as a web browser), you have to call the URL with a semicolon at the end. For example: http://00.00.00.00:8000/;

Remote Desktop Project in C

I want to make project for my final year in college.
So someone suggested me to make Remote Desktop in C.
Now I know basic socket functions for windows in C i.e. I know how to make
echo server in C.
But I don't know what to do next. I searched on internet but couldn't find
something informative.
Could someone suggest me how to approach from this point..any tutorial...or any source ?
I think this is do-able. For a college project, you don't need to have something as complex and as full-featured as VNC. Even demonstrating simple keyboard and mouse control and screen feedback would be enough, in my opinion, and that's well within reach.
If you're doing everything from scratch and using Win32, you can get the remote screen using the regular "printscreen" example all around the internet.
http://www.codeproject.com/KB/cpp/Screen_Capture__Win32_.aspx has it, for one. You can then compress the image with a third-party library, or just send it raw; this wouldn't be very efficient but it would still be a viable demonstration.
Apart from capturing the screen data remotely and showing it in the local window, you'll need to listen for local window messages for mouse and keyboard events, send them to the remote host, and then play them back. http://msdn.microsoft.com/en-us/library/ms646310%28VS.85%29.aspx will probably do that for you.
Check tightvnc TightVNC is a free remote control software package. The source code is also available.
For sending the image of the screen I would probably use rtp. The JRTPLIB is really handy for that.
And yes, as KevinDTimm says, an echo server is the very easiest part.
KevinDTimm may well be right, writing an RDP client would a fairly significant undertaking. To give you some idea, the current spec, available at the top of this page, is 419 pages long and includes references to several additional documents for specific aspects of RDP like Audio Redirection and Clipboards.

Resources