GXV3275

Status
Not open for further replies.

in2digital

New Member
Mar 13, 2021
10
0
1
31
Hi,

In v4.5.22 it looks like the Grandstream GXV3275 .mac xml file for provisioning does not have the dynamic syntax to display defined FusionPBX > Devices > Keys.

If I add any keys in FusionPBX > Devices it doesn't appear in the provisioning xml file, and I cannot see any syntax in the xml file relating to key types, $line.device_key_line, $line.device_key_label, $line.device_key_value

The GXV3275 requires the following format:
#######################################################################################
# EXT MPK 1
#######################################################################################

# Key Mode.# 0 - Speed Dial, 1 - BLF, 3 - eventlist BLF, 4 - Speed Dial via active account, 5 - DialDTMF, 8 - Call Transfer, 9 - CallPark, 10 - Call Intercom, 13 - Multicast Paging, 15 - Quick Conference
# Number: 0, 1, 3, 4, 5, 8, 9, 10, 13, 15
P23000= 0

# Account. 0 - Account 1, 1 - Account 2, 2 - Account 3, 3 - Account 4, 4 - Account 5, 5 - Account 6
# Number: 0 - 5
P23001= 0

# Name
# String
P23002=

# UserID
# String
P23003=

Can anyone help me and recommend the code to output each listed key in the above format?
 

in2digital

New Member
Mar 13, 2021
10
0
1
31
Fixed by adding the below to the mac xml template.
{assign var=key_types value=["speed dial"=>0, "blf"=>1, "eventlist blf"=>3,"speed dial active"=>4,"dial dtmf"=>5,"transfer"=>8,"call park"=>9,"intercom"=>10,"multicast paging"=>13,"call log"=>15]}
{$start_id=23000}
{for $exp=1 to 160}
{$pid=$exp*5-5}
<!-- EXT MPK {$exp} -->
{if isset($keys.expansion.$exp.device_key_category) && isset($keys.expansion.$exp.device_key_type) && $keys.expansion.$exp.device_key_type|in_array:$key_types}
<P{$start_id+$pid}>{$key_types[$keys.expansion.$exp.device_key_type]}</P{$start_id+$pid}>
<P{$start_id+$pid+1}>{$keys.expansion.$exp.device_key_line}</P{$start_id+$pid+1}>
<P{$start_id+$pid+2}>{$keys.expansion.$exp.device_key_label}</P{$start_id+$pid+2}>
<P{$start_id+$pid+3}>{$keys.expansion.$exp.device_key_value}</P{$start_id+$pid+3}>
{else}
<P{$start_id+$pid}>0</P{$start_id+$pid}>
<P{$start_id+$pid+1}>0</P{$start_id+$pid+1}>
<P{$start_id+$pid+2}></P{$start_id+$pid+2}>
<P{$start_id+$pid+3}></P{$start_id+$pid+3}>
{/if}

{/for}
 
Status
Not open for further replies.