#
#  Convert broadsoft 255 attributes in the form <attr number>=value
#  to internal broadsoft attributes with numbers > 256.
#  There is currently no way to automatically re-encode those
#  attributes, but it can be done with unlang for specific ones.
#
broadsoft-decode {
	foreach &BroadSoft-Attr-255 {
		if ("%{Foreach-Variable-0}" =~ /^([0-9]+)=(.*)$/) {
#				&request.Broadsoft-Attr-255 -= "%{Foreach-Variable-0}"
				"&request.BroadSoft-Attr-%{1}" += "%{2}"
		}
	}
}
