[SR-Users] kamcmd htable access problem, probably with int->string conversion

Moritz Graf moritz.graf at g-fit.de
Mon Jul 21 13:26:35 CEST 2014


Hi There,

i implemented a mapping via htable. For debugging purpose I use kamcmd
to see if the values are correctly filled. Doing so I discovered that
there is a problem getting the values of the keys, where the name is a
integer value. So it's the following behaviour:
#####################################################################
root at kamailio-stage:~# kamcmd htable.dump maptodest
{
	entry: 55
	size: 1
	slot: {
		item: {
			name: 1
			value: 0000000000000000001
		}
	}
}
{
	entry: 504
	size: 1
	slot: {
		item: {
			name: blub
			value: 0000000000000000001
		}
	}
}
{
	entry: 686
	size: 1
	slot: {
		item: {
			name: 001
			value: 0000000000000000001
		}
	}
}

root at kamailio-stage:~# kamcmd htable.get maptodest blub
{
	item: {
		name: blub
		value: 0000000000000000001
	}
}
root at kamailio-stage:~# kamcmd htable.get maptodest 001
error: 500 - Not enough parameters (htable name and key name)
#####################################################################

Is there a reasonable explanation why it works with blub, but not with 001?
Why is he complaining about the number of parameters?
Does anyone know a workarround?


Thanks for any advise!!


greeetz Moritz

-- 

Moritz Graf, M.Sc.
Betrieb NGN-Plattform

G-FIT GmbH & Co. KG
Greflingerstr. 26, 93055 Regensburg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140721/dc66d52d/attachment.pgp>


More information about the sr-users mailing list