Testing
Try every path in the phone preview, fix what Check flow finds, and test on a real phone before launch.
The phone preview
The fastest way to test is the phone preview inside the builder. It costs nothing and needs no shortcode.
Open your app in the builder
From Apps, click the app.Press Test
The ▷ button in the top bar. A phone opens on the left showing your first screen.Choose the number to dial from
Dial from, above the phone, is the caller's number for the test. Type any Ghana number, such as0241234567. Your app receives it as{{MobileNumber}}, and the preview remembers it. Change it and dial again to test as a different caller.Reply like a caller
Type in the Reply box and press Send (or Enter). Cancel ends the session.Start again
Press Dial again at the top of the preview to restart from the first screen.
What the preview checks
The preview runs your app in your browser and applies the same rules as the live service:
| It checks | Example |
|---|---|
| Menu choices | Replying 7 to a 3-option menu shows "Invalid option selected." |
| Answer types | A Numeric question refuses abc with "Please enter a valid number." |
| Length, minimum and maximum | A 1–10 question refuses 25 with "Enter 10 or less." |
| Patterns | An answer that doesn't match Answer must match shows "That answer isn't in the expected format." |
| Going back | Replying 0 returns to the previous screen, unless the question turns Pressing 0 goes back off. |
| Saved answers | Text like {{cups}} is filled in with the caller's answer. |
| Smart Router | Picks a branch from the saved answers and moves on, showing nothing, as on a real phone. |
| Sub-flow | Runs the other app, passes values in and out, and comes back. |
Where the preview differs from a real phone
| Step | In the preview |
|---|---|
| Collect Payment | Nothing is sent to your provider and nobody is charged. The amount and the number are shown under the phone. With PAID connected, press Paid or Failed to follow that route. |
| Sub-flow | Runs the other app’s last saved version. A real phone gets its published version. |
{{SessionId}} and {{Network}} | Empty. They are filled in on a real session. |
| A failed or slow call | Takes the FAIL route, and the reason is shown under the phone. With no FAIL route the test stops there, where a real session would carry on without the values. The “Check again” screen for slow calls only appears on a real session. |
https://. An ngrok address to your own machine works: the preview sends the header ngrok needs to skip its warning page.Check flow
Press Check flow (the tick icon) before deploying. It finds screens that aren't connected and branches that never reach an end, and names the screen so you can fix it. Deploy runs the same check.
| Message | What to do |
|---|---|
| Node "…" has no outgoing connections | Drag from that screen’s dot to the screen that should come next, or make it an End Session. |
| Flow branch ending at "…" must be terminated with an END node | That path stops without ending the session. Add an End Session screen at the end of it. |
| Router branch … has an empty condition | Open the Smart Router and fill in the condition, or delete that branch. |
| Router "…" has nothing connected to ELSE | Drag the router’s ELSE dot to the screen for callers who match no branch. |
| "MobileNumber" is the caller’s own number… | A step saves under a name Asterisks keeps for itself. Rename it, for example to recipientNumber. |
| "…" has no failure route | A warning, not an error. Connect the Send Data step’s FAIL dot to a “try again later” screen. |
Before-launch checklist
- Every menu option opens a screen.
- Every path ends on an End Session, Flash Alert or Collect Payment screen.
- No screen is over 182 characters (the counter under What the phone shows reads, for example, 55 / 182).
- Questions use the right Answer type, with a minimum and maximum where it matters.
- You tried wrong answers in the preview, not just the happy path.
- Your session balance has credit. Sessions stop with "Insufficient credits" at zero.
Testing on real phones
Once the preview looks right, test with a real phone before telling customers.
Deploy the app
Follow step 5 of the Quickstart.Point your aggregator at Asterisks
Paste the callback address into your aggregator's settings (see its guide under Connect an aggregator).Dial from your phone
Dial the shortcode and go through every path on a real handset, ideally on more than one network.
Sandboxes
Africa's Talking has a free sandbox with an online phone simulator, so you can test against Asterisks without a live shortcode. See the Africa's Talking guide.
Watching live sessions
The Live sessions page in the dashboard lists sessions as they happen. Keep it open while you test on a real phone to see your test calls arrive.