Can't call some local exchange numbers

Hi there, I’m a bit of a noob with Asterisk and FreePBX, so although I have a working system, there remain a few little niggles!

The problem is that for certain numbers (local to my telephone exchange) I cannot dial them properly. If I use the full dialling prefix, there is no issue.

For example calling 9292929, works, using the outbound routes to strip the initial 9, and a trunk dialling rule to add (01254) to all 5 and 6 character local numbers

However, calling 9282083 fails, with asterisk telling me the number can’t be completed as dialled.

I can’t see anything different with the numbers from the perspective of the dial rules, nor can I see the call to the failed number making it as far as my SIP/ISDN Trunk (Patton SmartNode). Asterisk is obviously unhappy with it, but why?

I can’t see any clashes with the feature codes, though I guess there might be more than is displayed in the GUI?

Looking at the Asterisk Log Files, this is what I see, though it didn’t give me any clues…
[Jun 20 21:47:19] VERBOSE[3777] logger.c: == Using SIP RTP TOS bits 184
[Jun 20 21:47:19] VERBOSE[3777] logger.c: == Using SIP RTP CoS mark 5
[Jun 20 21:47:19] VERBOSE[3777] logger.c: == Using SIP VRTP TOS bits 136
[Jun 20 21:47:19] VERBOSE[3777] logger.c: == Using SIP VRTP CoS mark 6
[Jun 20 21:47:19] DEBUG[3659] pbx.c: FONALITY: This thread has already held the conlock, skip locking
[Jun 20 21:47:19] VERBOSE[2569] logger.c: – Executing [9282083@from-internal:1] ResetCDR(“SIP/400-0000037c”, “”) in new stack
[Jun 20 21:47:19] VERBOSE[2569] logger.c: – Executing [9282083@from-internal:2] NoCDR(“SIP/400-0000037c”, “”) in new stack
[Jun 20 21:47:19] VERBOSE[2569] logger.c: – Executing [9282083@from-internal:3] Wait(“SIP/400-0000037c”, “1”) in new stack
[Jun 20 21:47:20] VERBOSE[2569] logger.c: – Executing [9282083@from-internal:4] Playback(“SIP/400-0000037c”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
[Jun 20 21:47:20] VERBOSE[2569] logger.c: – <SIP/400-0000037c> Playing ‘silence/1.gsm’ (language ‘en’)
[Jun 20 21:47:21] VERBOSE[2569] logger.c: – <SIP/400-0000037c> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – <SIP/400-0000037c> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)
[Jun 20 21:47:24] VERBOSE[2569] logger.c: == Spawn extension (from-internal, 9282083, 4) exited non-zero on ‘SIP/400-0000037c’
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Executing [h@from-internal:1] Macro(“SIP/400-0000037c”, “hangupcall”) in new stack
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/400-0000037c”, “1?skiprg”) in new stack
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Goto (macro-hangupcall,s,4)
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Executing [s@macro-hangupcall:4] GotoIf(“SIP/400-0000037c”, “1?skipblkvm”) in new stack
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Goto (macro-hangupcall,s,7)
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Executing [s@macro-hangupcall:7] GotoIf(“SIP/400-0000037c”, “1?theend”) in new stack
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Goto (macro-hangupcall,s,9)
[Jun 20 21:47:24] VERBOSE[2569] logger.c: – Executing [s@macro-hangupcall:9] Hangup(“SIP/400-0000037c”, “”) in new stack
[Jun 20 21:47:24] VERBOSE[2569] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/400-0000037c’ in macro ‘hangupcall’
[Jun 20 21:47:24] VERBOSE[2569] logger.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/400-0000037c’
[Jun 20 21:47:24] DEBUG[3659] pbx.c: FONALITY: This thread has already held the conlock, skip locking
[Jun 20 21:48:38] VERBOSE[3777] logger.c: == Using SIP RTP TOS bits 184
[Jun 20 21:48:38] VERBOSE[3777] logger.c: == Using SIP RTP CoS mark 5
[Jun 20 21:48:38] VERBOSE[3777] logger.c: == Using SIP VRTP TOS bits 136
[Jun 20 21:48:38] VERBOSE[3777] logger.c: == Using SIP VRTP CoS mark 6
[Jun 20 21:48:39] DEBUG[3659] pbx.c: FONALITY: This thread has already held the conlock, skip locking
[Jun 20 21:48:39] VERBOSE[2572] logger.c: – Executing [907713634824@from-internal:1] Macro(“SIP/400-0000037d”, “usersets-2,”) in new stack

Anyone got any tips/advice that could point me in the right direction?

EDIT
some additional numbers that worked:
957835
9279972
9665548
9919495

…and another that doesn’t 
9693400

…again, changing them all to 9-01254-xxxxxx works fine

My main outbound route dial rules:
9|07[4-9].        (UK Mobile Numbers)
9|0[12358].      (UK Landlines, no premium rates)
9|NZZZZ        (Local numbers, 5 digit)
9|NZZZZZ      (Local numbers, 6 digit)

My trunk dial rules:
01254+NZZZZ      (Prepends 01254 to 5 digit local numbers)
01254+NZZZZZ    (Prepends 01254 to 6 digit local numbers)
.                      (everything else)

Thanks

I may be different than others on the list, but I tend to leave my trunk rules blank and configure the outbound routes.

I would try a more generic approach:
9|1NXXNXXXXXX
9|NXXNXXXXXX

Reduce the X’s to meet your number requirement, above are US 10 digit dialing.

Hope that helps.

You are using trixbox that uses a “hacked” version of Asterisk:

[Jun 20 21:47:19] DEBUG[3659] pbx.c: FONALITY: This thread has already held the conlock, skip locking

Note the part that says FONALITY:, that is some hack that they did to “their” version of Asterisk. What it does we don’t know as they refuse to publish their “hacks”.

You probably also use the “hacked/forged” version of FreePBX. What they have done with it we don’t know.

Your log don’t show they full trace of the call, but even if you posted that, it is (almost) impossible to provide help to user that use the “hacked/forged” version of FreePBX.

I did have things configured that way at first, but changed to using both so I could have Asterisk automatically add the local prefix for some numbers.

Thanks anyway, I think I have a bigger problem (see the next post!)

Thanks for the assist, along with the Trixbox forum being totally broken (can’t reset passwords or contact anyone!!) you’ve just convinced me to rebuild with the proper version of FreePBX…If I can’t get the proper trace of a call, then how on earth am I supposed to be able to diagnose issues?!?

Thanks for your comments, much appreciated :slight_smile:

If you are allowed to run whatever OS you want, you will be much happier with the FreePBX distro and it will be more stable.

( Just my experience )

I just need to figure out how to migrate the content from one to another… anyone know where the Voicemail passwords are stored? - would be nice to migrate without the user’s intervention…

I just need to figure out how to migrate the content from one to another… anyone know where the Voicemail passwords are stored? - would be nice to migrate without the user’s intervention…

Indeed. I was using Trixbox for a while and had numerous issues with it. I switched to FreePBX distro and its worked almost perfectly.

Search this site for references to installing the backup application on trixbox, you should be able to install the standard backup application, backup and then restore. ( keep a seperate drive with original OS running if possible just in case ).

There are several threads on how to do this. Basically you need to build a machine (most people use a VM) with FreePBX version 2.6, the version trixbox Forked. Install the FreePBX backup module on the trixbox then restore the backup to the 2.6 FreePBX machine.

Then update the FreePBX to 2.9 and run another backup. This backup can now be restored to the distro.

AWESOME!! Will give it a go, thanks all.