Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-12

VoIP / SIP communication initiated from LCL apps

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Has anybody managed to integrate a LCL application with VoIP / SIP, where the application initiates the call? Something like what MAPI does under Windows for emails.

I already have a simple communication feature/component in our applications that allows the application to dial a phone number, by talking directly to the COM port. It simply takes the phone number from an Account/Contact screen and dials the phone number using whatever COM port the user setup. The user then simply needs to pick-up the handset when they hear somebody answer the other end.

I'd like to do something similar with SIP or VoIP from within our application. Anybody know if this is possible. Oh, and it must obviously work under both Linux and Windows. :-)

I know Skype has a public API, but I haven't looked into it yet. I thought I would ask here first.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Helmut Hartl
to Graeme Geldenhuys
Show quoted text 6 lines
Hi, Has anybody managed to integrate a LCL application with VoIP / SIP, where the application initiates the call? Something like what MAPI does under Windows for emails.

My company has developed a SIP Stack and a RTP Stack, wich we use in various applications
we sell to telco providers. It was initially developed under delphi but now runs under fpc too.
The fpc stack is used in serverside (frebsd/linux) daemon apps. (callrouting/voice box /conference bridge)

Show quoted text 12 lines
I already have a simple communication feature/component in our applications that allows the application to dial a phone number, by talking directly to the COM port. It simply takes the phone number from an Account/Contact screen and dials the phone number using whatever COM port the user setup. The user then simply needs to pick-up the handset when they hear somebody answer the other end. I'd like to do something similar with SIP or VoIP from within our application. Anybody know if this is possible. Oh, and it must obviously work under both Linux and Windows. :-)

This seems you want to do 3rd party call control of a SIP device. This is usually done in a way that
the "to be controlled devic"e gets a (fake) call with no audio streams (SIP INVITE possibly with an
auto-answer header), and then after it has answered the call it gets an REFER to the to-dial number.

I know Skype has a public API, but I haven't looked into it yet. I thought I would ask here first.

Skype has no direct relation to SIP ? (Beneath both are VoIP protocols)

To answer your question better it is necessary to know more about your deployment environment
and the actual use case. What SIP Proxy / devices do you intend to use ? (e.g. SNOM / Granstream phones, Freeswitch, Astersisk, OpenSER, SER, proprietary solutions )
Do you want to use this solution for your company (1 deployment) or do you want to deploy it to other
customers ? Will they need to have to change their PBX ? Our solution is usually used with a "Hosted PBX" environment where the customer manages his part of the
PBX via a web gui. The customer then only has an ethernet uplink and and amount of lines/devices.(=bandwith)

helmut

Reply by email

Graeme Geldenhuys
to Helmut Hartl

2009/12/8 Helmut Hartl :

> This seems you want to do 3rd party call control of a SIP device.

Yes, I simply want to initiate a call from inside our application. The rest is then handled by the actual SIP device or VoIP application.

> I know Skype has a public API, but I haven't looked into it yet. I > thought I would ask here first. > Skype has no direct relation to SIP ?

True, it uses some proprietary protocol for VoIP. But I did take a brief look at the API. They do allow 3rd party software to control the Skype client (eg: adding a contact, changing the online status, initiating a call, etc.)

Skype seems to be quite popular (I'm not really into such chatting apps much) and it seems to do what we need. Simply initiate a call. We don't really need anything fancy like call-routing, PBX etc. We simply want to add a "value-add feature" to our product. We are a franchise business, so maybe we can add a link to the Help menu that says "Call Head-Office via VoIP for support", or call a client if they have a Skype or SIP account etc.

So it's just a "nice to have" feature really. We can control there installations, so would could mention Skype as an option to them. But before we do anything, I obviously need to research the topic a bit more.

We already do something similar with SMS services, where they can SMS clients directly from our software regarding outstanding money or any specials etc. We use a online SMS service located in South Africa. Just another little "value-add" feature.

and the actual use case. What SIP Proxy / devices do you intend to ?use ? (e.g. SNOM / Granstream phones, Freeswitch, Astersisk, OpenSER, SER, proprietary solutions )

This sounds more complicated to what we intended. As I said, I need to research the subject a bit more before we decide to implement anything.

Thank you very much for you reply. You mentioned some interesting things, that will give me something to research.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys
Graeme Geldenhuys wrote 17 lines
2009/12/8 Helmut Hartl : >> > This seems you want to do 3rd party call control of a SIP device. Yes, I simply want to initiate a call from inside our application. The rest is then handled by the actual SIP device or VoIP application. >> I know Skype has a public API, but I haven't looked into it yet. I >> thought I would ask here first. >> > Skype has no direct relation to SIP ? True, it uses some proprietary protocol for VoIP. But I did take a brief look at the API. They do allow 3rd party software to control the Skype client (eg: adding a contact, changing the online status, initiating a call, etc.)

Graeme, I do this thing all of the time with Asterisk. Unlike many other solutions, Asterisk allow you to do it regardless of the protocol/hardware information you require.

I wrote some API for it for lnet (didn't released it though, but willing to release it as lgpl), and told Ales about it.

Show quoted text 9 lines
Skype seems to be quite popular (I'm not really into such chatting apps much) and it seems to do what we need. Simply initiate a call. We don't really need anything fancy like call-routing, PBX etc. We simply want to add a "value-add feature" to our product. We are a franchise business, so maybe we can add a link to the Help menu that says "Call Head-Office via VoIP for support", or call a client if they have a Skype or SIP account etc.

Or use a "click to call" solution for that, and by a push of a batten in a form you can connect the client's number with your office (I have a client that I made it for him 3 years ago, and it's part of the services it's company provides).

Show quoted text 38 lines
So it's just a "nice to have" feature really. We can control there installations, so would could mention Skype as an option to them. But before we do anything, I obviously need to research the topic a bit more. We already do something similar with SMS services, where they can SMS clients directly from our software regarding outstanding money or any specials etc. We use a online SMS service located in South Africa. Just another little "value-add" feature. > and the actual use case. What SIP Proxy / devices do you intend > to use ? (e.g. SNOM / Granstream phones, Freeswitch, Astersisk, > OpenSER, SER, proprietary solutions ) This sounds more complicated to what we intended. As I said, I need to research the subject a bit more before we decide to implement anything. Thank you very much for you reply. You mentioned some interesting things, that will give me something to research. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091209/b64c9c50/attachment.html>

Reply by email

Graeme Geldenhuys
to ik

2009/12/9 ik :

I wrote some API for it for lnet (didn't released it though, but willing to release it as lgpl), and told Ales about it.

Please let me know if you do decide te release any such code. I would be interested at taking a look.

I'm looking at the asterisk.org website now.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys

http://ik.homelinux.org/

Graeme Geldenhuys wrote 9 lines
2009/12/9 ik : > > I wrote some API for it for lnet (didn't released it though, but willing to > release it as lgpl), and told Ales about it. Please let me know if you do decide te release any such code. I would be interested at taking a look.

I'll (I need time for it though, I have few old code of mine that I want to release as foss).

I'm looking at the asterisk.org website now.

Try also voip-info.org it's a wiki for Asterisk with a lot of information about it.

Show quoted text 17 lines
-- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091209/98a60561/attachment.html>

Reply by email

Graeme Geldenhuys
to ik

2009/12/9 ik :

I'll (I need time for it though, I have few old code of mine that I want to release as foss).

No rush, the new "value-add features" in our product will only be added in the next minor release. That's 6?12 months away.

Try also voip-info.org it's a wiki for Asterisk with a lot of information about it.

Thanks for the URL.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

ajv
to ik: http://ik.homelinux.org/ On Wed, Dec 9, 2009 at 11:03 AM, Graeme Geldenhuys I'll (I need…

Hello,

How can I test if a "Procedure Of Object" is assigned?

example: (mode delphi under Linux)
Var PO : Procedure Of Object;
PO := Nil;   // OK
If Assigned (PO) Then Writeln ('This should not be printed');     // It
is printed !!
In Delphi  : Function Assigned (Const P) : Boolean
In Lazarus : Function Assigned (P : Pointer) : Boolean;

Is this a bug?
Should I write a overloaded function?

Thanks

Reply by email

Mattias Gärtner
to ajv

Zitat von ajv :

Show quoted text 9 lines
Hello, How can I test if a "Procedure Of Object" is assigned? example: (mode delphi under Linux) Var PO : Procedure Of Object; PO := Nil; // OK If Assigned (PO) Then Writeln ('This should not be printed'); // It is printed !!

It is not printed here.

Please provide a complete example.

Is this a bug?

Probably in your code.

Mattias

Reply by email

ajv
to Mattias Gärtner

Dear Mattias G?rtner,

Thanks your your answer.
I made the test project myself (which I should have done first), and indeed everything seems OK.
Conclusion, it must be in the code of my application. I go into it.

Best regards, Anthony Vogelaar

==================================================

Show quoted text 31 lines
Zitat von ajv : > Hello, > > How can I test if a "Procedure Of Object" is assigned? > > example: (mode delphi under Linux) > Var PO : Procedure Of Object; > PO := Nil; // OK > If Assigned (PO) Then Writeln ('This should not be printed'); // > It is printed !! It is not printed here. Please provide a complete example. > Is this a bug? Probably in your code. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Andreas Berger
to Graeme Geldenhuys: 2009/12/8 Helmut Hartl : Yes, I simply want to initiate a call from inside our…
Show quoted text 14 lines
>> I know Skype has a public API, but I haven't looked into it yet. I >> thought I would ask here first. >> >> > Skype has no direct relation to SIP ? > True, it uses some proprietary protocol for VoIP. But I did take a brief look at the API. They do allow 3rd party software to control the Skype client (eg: adding a contact, changing the online status, initiating a call, etc.) Skype seems to be quite popular (I'm not really into such chatting apps much)

Here in Brazil Skype is growing rapidly. The reason is that Voip providers are charging rates similar to regular phone rate which are VERY HIGH in Brazil. Skype is much cheaper. Interesting enough, Voip servers located in Europe provide calls to Brazil with rates similar (at times even cheaper) to Skype. The problem is that the quality is usually very poor since a voip packet must go from Brazil -> US -> Europe(Server) -> US -> Brazil. The lag is usually not acceptable.

Ok, now to the question. I am writing an app that uses Skype. Skype has seperate (and not compatable) API's for Windows, Linux and Mac. The API's are complex and not very well documented (Or for me at the moment too connfusing). I chose to go with an ActiveX wrapper called Sype4ComLib due to time constraints. Unfortunately that limited me to Delphi7 and windows. Once it's working I may (or may not) try to write my own interface to use both the windows and linux api's and then port to FPC.

Reply by email