65.9K
CodeProject is changing. Read more.
Home

The Bridge

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.85/5 (8 votes)

Jun 18, 2006

2 min read

viewsIcon

41713

downloadIcon

1298

This Bridge links the IAX2 client to the GSM mobile network Via a mobile phone and works as a VoIP gateway

Sample Image - The_Bridge.jpg

Introduction

This Bridge links the IAX2 client to the GSM mobile network Via a mobile phone and works as a VoIP gateway. It can be used as asterisk trunk gateway to the GSM network.

This program has a very simple user interface and can be customized to any Modem, Mobile phone from the user interface.

It uses the asterisk IAX2 protocol and based on the IaxClient Library and with the help of NCT library.

If your phone supports Bluetooth and you selected the Bluetooth Audio as the input and output device,the Bluetooth comport to the mobile, you'll get the call totally wirelessly connected J

 

Background

The basic Idea of the software is to Connect the mobile phone to the software and handle the events from the phone/modem, when the Bridge receive the Invite message from the IAX2 agent, it accepts the call and takes the called number and start dialing out, watching the state of the outbound call, and when the call is answered by the called person, the Bridge answers the IAX call, Just to make sure that the call timer is synchronized to the call progress for a good billing.

        Another thing about the bridge, it can be customized to different types of  modems/mobile phones. Currently it supports Sony Ericsson T68i and tested well, you can add your own types, all what you have to do is to get the AT commands list from the vendor and start supplying it in the bridge, all by it's function.

        To Add a new type, Select custom from the menu, and change the "<no value>" string in every AT command in the list. Then save, it will be saved in an .INI file in the same folder with the bridge.

 

Using the code

        The code consist of 6 main modules/Classes .

1-    The main window creates the objects of the IAX2 agent and the modem Class.

2-    The NCT library, it has the main functions needed to control the IaxClient.dll library.

3-    The clsModem class contains the controller for the modem.

4-    clcModemCommands handles the AT Command set (Save/Load/Get).

5-    ucModemInterface is the user control handles the modem class and simplifies the interfacing.

6-    CFG handles the (Save/Load) operations from/to the INI configuration file.

History

First beta released 18-Jun-2006