Dialing internal extension with short number? [SOLVED]

Hi,
For example i have these extensions:
1101100, 1101101, 1101XXX, 1201100, 1201101, 1201XXX,etc

How to setup the dialplan to achieve these:

  • to dial extension in same group, just dial it’s last 3 digit.
    for example to call 1101101 from 1101100 , just dial 101.
  • to dial extension in other group, just dial it’s full number.
  • and for other pattern will dial PSTN number.

Thanks.

It’s a bit convoluted but if you create a “loop around” trunk in FreePBX using the local channel you could achieve this. You would create an outbound route for the short numbers and add the digits in the outbound route. Then you would send the call back to the system via the loop around trunk.

A loop around trunk is created using the custom trunk type and channel type of local and Local/@OUTNUM$@from-internal in the Custom Dial String Field.

Hi thanks for you reply.

I have created local loop as you mentioned above and also outbound route.
I prepend the number at trunk with 1106
In outbound route i put match pattern XXX/110630X

I tried to call 1106301 by just dialing 301.
I’m not sure about this ‘Local/@OUTNUM$@from-internal’ so i just write as is.
But i got these from log:

– Executing [s@sub-flp-4:4] Set(“SIP/1106302-0000000b”, “DIAL_NUMBER=1106301”) in new stack
– Executing [s@sub-flp-4:5] Return(“SIP/1106302-0000000b”, “”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/1106302-0000000b”, “OUTNUM=1106301”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/1106302-0000000b”, “custom=AMP”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/1106302-0000000b”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/1106302-0000000b”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/1106302-0000000b”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/1106302-0000000b”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1106302-0000000b”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/1106302-0000000b”, “1?customtrunk”) in new stack
– Goto (macro-dialout-trunk,s,23)
– Executing [s@macro-dialout-trunk:23] Set(“SIP/1106302-0000000b”, “pre_num=AMP:Local/@OUTNUM”) in new stack
– Executing [s@macro-dialout-trunk:24] Set(“SIP/1106302-0000000b”, “the_num=@from-internal”) in new stack
– Executing [s@macro-dialout-trunk:25] Set(“SIP/1106302-0000000b”, “post_num=”) in new stack
– Executing [s@macro-dialout-trunk:26] GotoIf(“SIP/1106302-0000000b”, “0?outnum:skipoutnum”) in new stack
– Goto (macro-dialout-trunk,s,28)
– Executing [s@macro-dialout-trunk:28] Dial(“SIP/1106302-0000000b”, “Local/@OUTNUM@from-internal,300,”) in new stack
[Jul 25 17:32:47] NOTICE[19222]: chan_local.c:710 local_call: No such extension/context @OUTNUM@from-internal while calling Local channel

The forum software added those extra characters Sorry for the confusion. If you had hovered your mouse over the field you would have seen the tool tip with the correct syntax. Using the tool tips is essential to being succesful with FreePBX:

1 Like

Hi SkykingOH

Thanks for your help.
It works now.

Regards,
Reza