Is there any telephony framework in linux? - linux

I have a USB 3g modem, On windows it comes with software with which, I can use it for calling, sending and receiving SMS. Now, I want to write similar open source application in linux ( I also want to provide DTMF detection functionality ).
In windows, we can achieve this through TAPI, what are the similar technologies/frameworks in linux? Is there any similar opensource application ( I want to use as a reference )?

Yes it is is called ofono - project started by Intel/Nokia for Maemo/Moblin. From wikipedia:
oFono is a free, open source project for mobile telephony (GSM/UMTS)
applications. It uses high-level D-Bus API for use by telephony
applications. It uses 3GPP standard. It is free software released
under the terms of the GNU General Public License v2.
And Asterisk and Freeswitch are PBX software and probably are not what you are looking for.

Freeswitch
I'm not sure about a USB modem, but for VOIP telephony, Freeswitch is excellent. It uses a generic socket API to make it extensible via any number of languages. It can handle inbound and outbound calls, text-to-speech, voice recognition, etc.

My Vodafone Merlin card was recognized as a ttySx ant it was possible to interact by simple AT-commands like with old analog modems. There were also extra commands for reasing the sim card address book, sms and I believe also for sending sms.

We use sms tools: http://smstools3.kekekasvi.com/
The SMS Server Tools 3 is a SMS Gateway software which can send and receive short messages through GSM modems and mobile phones.
You can send short messages by simply storing text files into a special spool directory. The program monitors this directory and sends new files automatically. It also stores received short messages into another directory as text files. Binary messages (including Unicode text) are also supported, for example ring tone messages. It's also possible to send a WAP Push message to the WAP / MMS capable mobile phone.
The program can be run as a SMS daemon which can be started automatically when the operating system starts. High availability can be ensured by using multiple GSM devices (currently up to 64, this limit is easily changeable).
The program can run other external programs or scripts after events like reception of a new message, successful sending and also when the program detects a problem. These programs can inspect the related text files and perform automatic actions, for example storing information into a database (for example MySQL or Microsoft SQL Server), sending an automatic reply, forwarding messages via eMail (SMS to eMail gateway), ... and whatever you like."

Asterisk would be the usual suspect for what you want - http://www.asterisk.org/

Related

How to get the AT Terminal command log (Linux) from Mobile Partner Modem Software?

I am trying to figure the AT command set issued by the Hauwei's Mobile Partner Software for making voice and video call. Mobile Partner is the bundled software for almost all Hauwei 3G Modems and comes with ability to make and receive voice calls. I need to know the AT commands it issues for my E1732 modem for voice, VIDEO calls and other things.I need the log. I have the Mobile Partner for Linux(Ubuntu) and Windows.It is working in both platforms. So any help in either of the platforms is appreciated.
My aim is to make a Linux based IVR system so I need them.
Thanks for your help
You will want to look at usbsnoop as all these devices are actually emulating serial communication across usb.
Also, have a look at USB modeswitch
homepage
debian repo
Modeswitch packs a lot of vendor specific 'magic' knowledge, that has been obtained by reverse engineering. Of course it was geered towards switching the USB device to 'modem' mode in the first place, but I suspect their developer list will have ample resources on tracing usb traffic.
Also, UMTSMon is Open Source code that allowed me to use several brands of 'unsupported' (undocumented) USB UMTS dongles in the past. UMTSMon will send specific sequences of AT commands if you want. I assume again, that the developer list will help you gather more information.
Disclaimer: I only used the mentioned packages, and have not been involved in their development

Reading SMS from inbox in j2me

I am using j2me technology. My application is for sending and receiving sms. Sender can not send sms on specific port and sms always goes to inbox. Is it possible to read sms from inbox in j2me?
No you cannot read SMS from inbox in J2ME. However you can do so using AT commands as I described in this answer.
You can not read SMS from Inbox directly. For reading SMS from Inbox you need APIBridge.jar. Using this .Jar file you can read the SMS from inbox too.
For Sending SMS on a particular port, try this Sending/Receiving SMS from MIDlets
The API Bridge package includes a server component and set of plug-ins that are installed on a Nokia Symbian device. This device component is complemented by a JavaScript™ library, set of ActionScript classes, and a JAR file containing classes and resources that enable the use of the features of the shipped plug-ins.
The other features of APIBridge.Jar is as follows,
Uploading files.
Capturing video, image, and audio.
Reading files.
Resizing images.
Creating image thumbnails.
Using the logging service.
Using the location service.
Using the media management service.
Sending DTMF tones in an active call.
Please note that APIBridge.jar works for Symbian OS Based Phone Only. Not for S40 Device
Yes it can be done with AT-command. I have done it before. J2ME can't read your native SMS can came with the phone unless you write a background processes in Symbian C++ that extracts the SMS from your inbox and handles it to your Java ME application.
In the AT command implementation, you use the following algorithm
Set the phone on text mode by doing this - "AT+CMGF=1" + RETURN, then also send AT+CMGS="RECIPIENT NUMBER " + CTRL+Z. Then, before you can send the AT command to the GSM modem, in your J2ME program, you need to use CommConnection framework i.e. serial port protocol.
You can receive/send SMS messages using WMA https://web.archive.org/web/20070205092831/http://java.sun.com/products/wma/
A sample application can be found here

what is the purpose of using USSD Commands in our J2ME Application? Is this possible?

I heard there is USSD Commands in Mobile.But i dont know what it is? i was googling two more sites.i did not understand it.Please anybody having knowledge about USSD Commands, share with me.
How it is useful when we using USSD Commands with our j2me midp 2.0 application development?
Please suggest me some useful URL's to get this properly.
Also, i would like to here about AT Commands too?
Thanks & Regards,
P.SARAVANAN
USSD is Unstructured Supplementary Service Data.
GSM standardizes on the syntax (i.e. message transport) of USSD but not on the semantics (i.e. what one can do with USSD is network-operator-specific).
USSD applies a request/response pattern. A user sends a USSD request which is processed by the network and eventually answered with an USSD reponse. In a nutshell, USSD allows an end user sending numerical commands. These commands are transported by protcol functionality within the SS7 signalling stack from the mobile device to the mobile network MSC (mobile switching center, the nework node controlling the mobile network). The network operator configures the MSC to handle specific USSD requests, typically to forward them to various other network elements. Among them are:
HLR (home location register, the user database) to switch on/off telephony services.
IN (intelligent network, the realtime billing platform, among others) voucher management system for prepaid top-up.
USSD gateway to branch out USSD messages to external systems.
These network elements then generate USSD responses which are transported back to the user.
Using USSD from J2ME is offered via:
Devices supporting JSR 120 (Wireless Messaging API). Consult manufacturers development documentation or device databases to check which devices are covered.
AT command (AT+CUSD) via serial interface emulation.
The user composes some message—usually rather cryptic—on the phone keyboard.
The phone sends it to the phone company network, where it is received by a computer dedicated to USSD.
The answer from this computer is sent back to the phone.
The answer could be seen on the phone screen, but it is usually with a very basic presentation.
The messages sent over USSD are not defined by any standardization body, so each network operator can implement whatever it finds suitable for its customers.

Where I can find the USSD commands specification?

I need to implement a simple application to send short notify messages on gsm phone display via a GSM modem.
I know that I can use the gsm USSD protocol to send messages instead of sms in order to speed up the delivery.
Where I can find a detailed reference on the available USSD messages?
Where I can find examples or sample applications?
All mobile operators supports the USSD protocol?
Lorenzo
You need an USSD server/gateway in your mobile network operators environment, connected to the operators SS7 network. USSD messages can be sent either from mobile phone to USSD server or from USSD server to mobile phone. It is not possible to send an USSD message directly from one phone to another, you would need to relay the message via the USSD server.
USSD messages are not standardized, they are specific to the mobile network and the USSD-capable applications. However, there are some de-facto standard USSD messages understood by many HLRs for querying and configuring things like call forwarding.
USSD is transported via SS7 using the MAP protocol. The business logic implemented on top of MAP is bound to the actual protocol stack implementation. On the server side that could be hardware (interface cards) plus operating system drivers or software-only, e.g. a SIGTRAN-Stack, depending on the physical layer to be supported (E1, SDH over fiber, ATM or Ethernet). A sample application depends on the protocol stack it runs on. Look for sample applications from the vendor of your interface hardware or protocol stack. On the client side the USSD support is device-dependent, e.g. via J2ME JSR 120 "Wireless Messaging API".
USSD is not guaranteed to be delivered, especially not in roaming scenarios. That solely depends on your mobile network operator. If you do not have an agreement with the operator, he might firewall away your USSD messages, especially if he detects high volumes circumventing his pay-messaging services.

What would be the simplest system to send sms from linux server?

What would be the simplest system to send sms from linux server? It`s a Debian system. There would be not much SMSes. What hardware and software to use? Maybe use some SMS sending service?
Yeah, I think the simplest way would be getting a serial GSM modem, or a GSM phone with a serial connection, and a SIM card. Some USB ones can work, but is better getting a serial one and staying on the safe side.
Serial modems don't need any drivers, you just need to connect via the serial port (/dev/tty...) and dump there the commmands...
Also, if you want it easier, you can install the SMS Tools available on Linux. They are packaged with the easy name 'smstools' in Ubuntu, Debian, and other Distros.
Last version is number 3, and you can get some info on this site:
http://smstools3.kekekasvi.com/
If you like to to do it yourself and utilize your old mobile phone, try this recipe :-)
There is a real advantage in this approach over using some email SMS service: computer network problems don't affect local hardware. It's especially important if you use SMSes for monitoring your server.
Each cell phone company offers email addresses to send sms messages to phones. For example verizon uses something like 55512345678#vtext.com to send messages. All you need to do is find a list of each provider's email domain and then find out the service your user subscribes. After that just send the sms like a regular email. This is how most software does it.
Since you are probably looking for a lithuanian service (judging from your name), look into www.gsms.lt.
Maybe this Question helps you. Otherwise take a look at Kannel.
There is another option perl independent exec. Download and Run directly.
No Moderm required. Global sms supported and free try.
you can refer http://www.sms4mail.com/smsmail/smscmd.htm
Use a modem connected to a serial port. And use gnokii.
the simplest way is to use a GPRS modem or a pool of modems. More advance - buy gateway service in cell network operator.

Resources