extensions_additional.conf entries added are incorrect

I’ve just built/installed FreePBX 2.1.1 on top of Asterisk 1.2.7.

I’ve gone into FreePBX and added several extensions for SIP phones. For one of the numbers, “5000”, here’s what ends up in extensions_additional.conf:

[ext-local]
include => ext-local-custom
exten => 5000,1,Macro(exten-vm,5000,5000)
exten => 5000,hint,SIP/5000
exten => ${VM_PREFIX}5000,1,Macro(vm,5000,DIRECTDIAL)

Now if I got to “Asterisk CLI” and do the command “show dialplan” I see:

[ Context ‘ext-local’ created by ‘pbx_config’ ]
’*5000’ => 1. Macro(vm|5000|DIRECTDIAL) [pbx_config]
‘5000’ => hint: SIP/5000 [pbx_config]
1. Macro(exten-vm|5000|5000) [pbx_config]
Include => ‘ext-local-custom’ [pbx_config]

When I call extension 5000 from another phone it goes straight to voicemail. The 5000 extension is in the from-internal context.

The problem seems to be that (a) the “hint” priority for the SIP phone is lower than the priority 1 hangup entry above it for voicemail, and (b) the hint doesn’t appear to be working correctly - it doesnt seem try calling the SIP device.

If I change extensions_additional.conf from:

exten => 5000,1,Macro(exten-vm,5000,5000)
exten => 5000,hint,SIP/5000

To:

exten => 5000,2,Macro(exten-vm,5000,5000)
exten => 5000,1,Dial(SIP/5000)

And then restart Asterisk then calling 5000 works…

Any thoughts/suggestions why the entries FreePBX is adding appear to be wrong?

Please,

I succefully setup freepbx-2.1.1 on fedora core 3

But when I create sip extension, I can’t register a sip phone!

Can you help me?

They are not wrong. They are completely separate extens, each doing a different thing for the extension:

[code:1]exten => 5000,1,Macro(exten-vm,5000,5000)[/code:1]

Means, if someone dials 5000, trigger the exten-vm macro with 5000,5000 as the parameters. This is the only line that actually does any dialling. :slight_smile:

[code:1]exten => 5000,hint,SIP/5000 [/code:1]

Means, if someone HINTs (i.e. watches) exten 5000, they should be seeing events for SIP/5000. Has nothing to do with dialling.

[code:1]exten => ${VM_PREFIX}5000,1,Macro(vm,5000,DIRECTDIAL) [/code:1]

Means, if someone dials *5000, then direct them directly to voicemail for extension 5000.

Therefore, the issue is not with extensions_additional.conf but with something else. I suspect either your SIP device wasn’t registered at the time, or your AstDB was not populated properly.

Ok, I’m still learning here :slight_smile:

[quote=“Djelibeybi”]
Therefore, the issue is not with extensions_additional.conf but with something else. I suspect either your SIP device wasn’t registered at the time, or your AstDB was not populated properly.[/quote]

If I run “database show” on the FreePBX CLI option I see the following entries for ext 5000:

/AMPUSER/5000/cidname : Dermot Bradley
/AMPUSER/5000/device : 5000
/AMPUSER/5000/outboundcid : “Dermot” <5000>
/AMPUSER/5000/recording : out=Adhoc|in=Adhoc
/AMPUSER/5000/voicemail : default
/DEVICE/5000/dial : SIP/5000
/DEVICE/5000/type : fixed
/DEVICE/5000/user : 5000
/SIP/Registry/5000 : 192.168.200.250:5060:3600:5000:sip:[email protected]

So the device appears to be registered fine and also present in the AstDB.

If you’re trying to call yourself, you need to enable Call Waiting (dial *70). Otherwise, you will go straight to voicemail.

It also goes straight to voicemail if I call another extension (I’ve got 2 handsets sitting on my desk to play with)…so it can’t be that.

I’ve turned up Asterisk debugging and see the following but not much else:

Jun 6 09:09:41 DEBUG[26414] pbx.c: Launching ‘Set’
Jun 6 09:09:41 DEBUG[26414] pbx.c: Launching ‘Set’
Jun 6 09:09:41 DEBUG[26414] pbx.c: Launching ‘Set’
Jun 6 09:09:41 DEBUG[26414] db.c: Unable to find key ‘5000’ in family ‘CFU’
Jun 6 09:09:41 DEBUG[26414] func_db.c: DB: CFU/5000 not found in database.
Jun 6 09:09:41 DEBUG[26414] pbx.c: Function result is ‘’

After I end up leaving a voicemail the phone’s MWI does start to flash to indicate the voicemail’s there.

I’m a bit of an Asterisk/FreePBX newbie so any pointers welcome…

After a spot of debugging/tracing of dialplans I figured out the problem was due to me incorrectly (stupidly!) putting the dialparties.agi script in the wrong directory so the dialplan couldnt find it and fell back to voicemail…

Everything is working fine now :slight_smile: