bedefaced / sipdotnet Goto Github PK
View Code? Open in Web Editor NEW.NET wrapper for liblinphone library
License: GNU Lesser General Public License v3.0
.NET wrapper for liblinphone library
License: GNU Lesser General Public License v3.0
When I try to use this method I am sent to look for the linphone wrapper, there is no other way not to be able to do the transfer0?
Hi,
I'm trying to get this working (Win 8.1 x64), ive dropped the windows dll's from your mega link in to the bin folder, however when running the code i'm hitting this exception.
"A call to PInvoke function 'sipdotnet!sipdotnet.Linphone::linphone_core_new' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."
on this line: linphoneCore = linphone_core_new(vtablePtr, null, null, IntPtr.Zero);
Any ideas why?
James.
Summary:
I have built a simple WPF app using sipdotner, and calls both inbound and outbound are working. However, audio is not present for outbound calls.
Details:
Linphone works fine on the same PC, but an app built on sipdotnet has no audio for outbound calls.
It appears that the SDP packet has the internal IP of the machine from which the call is placed.
Screen cap of sngrep is here: https://cloud.branham.us/apps/gallery/s/Id1kajHUg5iMvRz
It's almost certainly a NAT issue, of course, but so far I've been unable to properly send the external IP in the SDP packet. I've tried several different ways to set a STUN server address and enable its usage but nothing so far has worked. Since I know the hostname/IP of the machine to which I'm connecting, I'd like to try setting an explicit value for the address just to confirm that this is the issue, but I haven't been able to do that, either.
The source code is at https://cloud.branham.us/s/RTpEdob706R0uWi. The area in the code where I'm setting up STUN is near the bottom of the CreatePhone method. I pasted a copy of the method at the top of the source file to make it easier to find.
Any help you can offer would be greatly appreciated!
Richard
How do I add linphone.dll to my C # project in Visual Studio?
When I run my sipdotnet test project, this is appearing to me;
{"Unable to load DLL 'linphone.dll': No se puede encontrar el módulo especificado. (Exception from HRESULT: 0x8007007E)"}
Hi!
I think I found a way to replicate the issue partially described in #22
If you start a Call, and then kill the process while it is still in Call, the next instance of the liblinphone app will be muted.
Using Process.Kill() during a Call, I can replicate this issue almost every time.
After some while, audio will be back working.
Thank you
when I run this project in xp , wrong unable to load linphone.dll . I have down the .net framework to
3.5 . do you konw how to solved this problem? thx.
Hi!
I just need some help with reading Custom Headers.
I tried to implement by myself this methods like this:
[DllImport(LIBNAME, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr linphone_call_params_get_custom_header(IntPtr callparams, string header_name);
[DllImport(LIBNAME, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr linphone_call_get_remote_params(IntPtr call);
But in OnCallStateChanged
, if I try to
var param = linphone_call_get_remote_params(existCall.LinphoneCallPtr);
byte[] bytes = Encoding.Default.GetBytes("HEADER_NAME_HERE");
var myString = Encoding.UTF8.GetString(bytes);
IntPtr test = linphone_call_params_get_custom_header(param, myString);
var str = Marshal.PtrToStringAnsi(test);
I always get null result.
@bedefaced Do you have any suggestions?
Thank you
Hi, I have a problem with the published version of the application, it is a windows forms application C #, when I try to make a call it gives me the error that "DLL file 'linphone.dll can not be loaded. please your support one more time, thank you very much for the help.
Hi,
i think i need a bit of help...
i wrote a small program to use as intercom on raspbian. (actually wrote in VS2013 then moved exe to raspbian.)
On execution, (mono exefilename) i get this error:
Unhandled Exception:
System.DllNotFoundException: linphone.dll
The dll is there, together with the Exe file i'm calling.
Also, i tried to compile on raspbian, with xbuild, but i get the same error....i don't know where to smack my head! I'm targeting .net framework 4. The same projects (without the gpio below enabled, works fine on windows.)
Also, i'm using a dll to make use of the Gpio of the raspberry and that is working fine....the dll is in the same folder.
Help please!!
Thanks
Giulio
Account account = new Account("1001","mypassword", "192.168.100.1");
phone = new Phone(account);
phone.PhoneConnectedEvent += delegate ()
{
phone.MakeCall("1002");
}
this scripts are work. but when the call picked up from other party. the sound is not transfered.
is it related your experimental feature "PlaybackDevices, CaptureDevices"? and can you give us an example how to use it?
bedefaced, so as not to be creating a lot of issues, I will explain with an image what I need to be able to do, and who knows, you may be helping me. As you already seem to be an expert in the theme, what I need to do is something basic, a form in C #, which contains the following functions: Call, End Call, and I will save the call in an mp3 file. If it's not too much trouble, and you can support me with a simple example project, thank you very much. Thank you for all the attention so far.
It would be great to have a method to forward the current incoming call on another phone extension or on a mobile :)
thanks
i am trying to implement chat message functionality using linphone library. but there is no chat message functionality. I have no idea, how to implement .
please help me on this .
i am facing app crashes every few hours of using the class. The Windows event logs indicate that the app crashed due to:
Faulting module name: ucrtbase.dll, version: 10.0.16299.248, time stamp: 0xdcc3eab0
The app crashes even if there are no calls or no activity at all. So i am suspecting maybe there is a memory leak in the loop LinphoneMainLoop() calling linphone_core_iterate as some suggested it in some old articles:
https://lists.nongnu.org/archive/html/linphone-developers/2014-07/msg00050.html
I am not sure how to resolve it. Any suggestions please.
case LinphoneCallState.LinphoneCallIncomingReceived:
case LinphoneCallState.LinphoneCallIncomingEarlyMedia:
newstate = Call.CallState.Loading;
newtype = Call.CallType.Incoming;
addressStringPtr = linphone_call_get_remote_address_as_string(call);
if (addressStringPtr != IntPtr.Zero) from = Marshal.PtrToStringAnsi(addressStringPtr);
to = identity;
Problem here is that "to" variable contains just identity like "sip:user1@...", but does not takes any information about destination phone number from incoming call.
Any ideas what linphone function can we use for it?
I am trying to register an Account object for IP to IP call as follows:
Account account = new Account("sip", "", "127.0.0.1", 5060); // no password
Phone phone = new Phone(account);
phone.IncomingCallEvent += delegate (Call call) {
Console.WriteLine("Incoming call.");
};
phone.ErrorEvent += delegate (Call call, Phone.Error error) {
Console.WriteLine("Error: " + error.ToString());
};
phone.Connect(); // connecting
I get RegisterFailed. Does this wrapper (and linphone) support direct IP to IP without proxy? If so, can anyone please help me find the error in the code snippet above? (any idea on the SIP account parameters?)
Thanks,
Hisham
Lack of parameters to provide STUN/TURN server.
is it posible to use a different microphone or boxes on the pc to output the sound or video?
or to get the raw video/audio streams?
Need the possibility to have Linphone operation/sip log from inside Linphone
To see what is wrong in case if sip call or voice does not go.
Al utilizar la libreria me aparecen los siguiente errrores alguien sabe por que?
[DEBUG] Connection failed for fd [2592]: cause [No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión.
]
[DEBUG] channel 151C1578: state ERROR
[DEBUG] Cannot connect to [TCP://192.168.15.8:5060]
[DEBUG] transaction [0DEF4088] channel state changed to [ERROR]
[DEBUG] Refresher[0DED4A30]: scheduling next timer in 500 ms for purpose [retry]
[DEBUG] Register refresher [503] reason [io error] for proxy [sip:192.168.15.8:5060]
[DEBUG] Proxy config [07B3D760] for identity [sip:[email protected]] moving from state [LinphoneRegistrationProgress] to [LinphoneRegistrationFailed] on core [07AEE1D8]
[DEBUG] Linphone core [07AEE1D8] notified [registration_state_changed]
[DEBUG] OnRegistrationChanged: LinphoneRegistrationFailed
[DEBUG] Changing [client] [REGISTER] transaction [0DEF4088], from state [INIT] to [TERMINATED]
[DEBUG] Client internal REGISTER transaction [0DEF4088] terminated
Waiting for task completion: System.Object b__84_1()
[DEBUG] Channel [151C1578] destroyed
Hello, i asume that for ending a call which i recive i can retrieve the call object with the event incomingCallEvent, but i dont see the way to retrieve the call object when i start the call.
There's no way to play audio files without software like VAC or transmit it to mic?
when i tried to receive a call audio is not working for both incoming and outgoing call. And how to request a video call to from this application.
please help me on this.
Hi!
After starting main linphone loop( class Linphone
> method LinphoneMainLoop
) with test code suggested in README i always get an exception
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
when thread tries to invoke linphone_core_iterate(linphoneCore)
; for the first time.
If i ignore this exception and continue execution other linphone_core_iterate calls work without exception. May be there is a problem with thread sync in wrapper? Anyone had same issue?
Any thoughts appreciated, thanks!
Hello
The links to the binaries of liblinphone are both broke broken. In the current release of libLinphone is no dll called "liblinphone-6.dll" which dll can we use instead?. mega.co.nz -link is also broken.
I have no GCC experience to compile the binaries for myself.
Thanks.
As I add call tone, I want to click call to let the user hear what is calling.
I receive the following message:
A call to PInvoke function 'sipdotnet!sipdotnet.Linphone::linphone_core_new' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Hi! So I'm trying to call Phone.Connect(), and the error 'unable to find Liblinphone.DLL' occurs. If I remove this line it doesn't happen, but also this line is essential to connect my created phones. I've tried the solutions previously suggested (checking how it is compiled, redownloading the SDK and libraries, etc.), but have not had any success. Any help would be appreciated!
I tried to use MakeCallAndRecord method, but there is no recorded file.
Can you please help me, Thank
HI! Thank you for your solution.
We try to integrate your solution in our project, but didn't found next things:
If you could chat with me in skype, it would be great.
I catched next problem while using library. First one or set of first calls are coming to library correct and have correct "From" number in instance of "Call" class.
However set of next calls have From address exactly like the last the one call (in fact they are different).
It looks like some unnecessary caching at first look.
For example:
Like you can see, last three calls have same From number, but in SIP they all are different. Only call #1, #2 and #3 have correct numbers. Calls #4 and #5 are incorrect.
Getting a System.BadImageFormatException at runtime.
I'm trying to get this runnig the 3rd time now, but getting the same error all the time.
VS is also showing warnings, methods being deprecated:
I've used the linphone DLLs from the repo.
If there's anything I can provide, let me know.
Thanks in advance !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.