A web-based simulator for testing USSD applications and services. This tool allows developers to interact with USSD services without needing a physical device or telecom connection.
- Simulates USSD sessions in a phone-like interface
- Supports custom session IDs and phone numbers
- Works with any USSD service code
- Real-time interaction with USSD endpoints
- Simple and intuitive user interface
- Detailed console logging for debugging
This simulator only works for cases where the telcos redirect the menu generation to an external service. It may not work with USSD services that use different implementation models.
- Web server (Apache, Nginx, or any static file server)
- Access to the USSD backend service
-
Clone this repository:
git clone git@github.com:kakavi/ussd-simulator.git -
Navigate to the project directory:
cd ussd-simulator -
Open
index.htmlin a text editor and update thebaseUrlvariable (line 98) to point to your USSD service:let baseUrl = 'http://your-ussd-service-url';
-
Deploy to your web server or open the file directly in a browser.
- Open the simulator in your web browser
- Enter your phone number
- Enter the USSD service code you want to test (default is
*165*5*7#) - Click "Start USSD Session"
- Interact with the USSD service by entering responses in the input field
- View the USSD responses in the display area
The simulator makes POST requests to your USSD service with the following parameters:
sessionId: A unique identifier for the USSD sessionphoneNumber: The phone number initiating the requestserviceCode: The USSD code being dialedtext: The user's input (empty for initial requests)
Example endpoint:
POST /api/v1/ussd/menu?sessionId={sessionId}&phoneNumber={phoneNumber}&serviceCode={serviceCode}&text={text}
You can modify the following settings in the index.html file:
baseUrl(line 98): The base URL of your USSD service- Default service code (line 116): Change the default USSD code
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- All contributors who participate in this project
