Incorrect value when setting number like values in Htable using Kamcmd

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect value when setting number like values in Htable using Kamcmd

Tony - Telecomy

Hello,

 

I'm having an issue setting phone numbers values in htable using kamcmd when the phone number is above the integer range 2147483647.

Initially I planned to set the values as strings but this is not working as expected as well.

 

 

Please find below some examples:

root@tst:~/tst/test# kamcmd htable.seti tst_sim integer_limit "2147483647"

root@tst:~/tst/test# kamcmd htable.seti tst_sim integer_exceeded_limit "2147483648"

root@tst:~/tst/test# kamcmd htable.sets tst_sim integer_as_string_valid "2147483647"

root@tst:~/tst/test# kamcmd htable.sets tst_sim integer_as_string_invalid "2147483648"

root@tst:~/tst/test# kamcmd htable.dump tst_sim | grep -A 1 integer

                        name: integer_as_string_valid

                        value: 2147483647

--

                        name: integer_limit

                        value: 2147483647

--

                        name: integer_as_string_invalid

                        value: 18446744071562067968

--

                        name: integer_exceeded_limit

                        value: -2147483648

 

my ctl params are as follow:

modparam("ctl", "binrpc", "unix:/var/run/kamailio/kamailio_ctl")

modparam("ctl", "binrpc_max_body_size", 1024)

modparam("ctl", "binrpc_struct_max_body_size", 1024)

 

Thanks,

Tony


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect value when setting number like values in Htable using Kamcmd

Sebastian Damm-2
Hi,

On Tue, Sep 5, 2017 at 8:37 AM, Tony - Telecomy <[hidden email]> wrote:
> I'm having an issue setting phone numbers values in htable using kamcmd when
> the phone number is above the integer range 2147483647.
>
> Initially I planned to set the values as strings but this is not working as
> expected as well.

I think, Daniel answered that a few days ago in another thread, and it
is written somewhere in the Kamailio wiki, if you want to set strings
with number-like values, prefixing them with "s:" helps kamcmd
understand you really want to set a string.

HTH
Sebastian

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect value when setting number like values in Htable using Kamcmd

Daniel-Constantin Mierla-6


On 05.09.17 09:53, Sebastian Damm wrote:

> Hi,
>
> On Tue, Sep 5, 2017 at 8:37 AM, Tony - Telecomy <[hidden email]> wrote:
>> I'm having an issue setting phone numbers values in htable using kamcmd when
>> the phone number is above the integer range 2147483647.
>>
>> Initially I planned to set the values as strings but this is not working as
>> expected as well.
> I think, Daniel answered that a few days ago in another thread, and it
> is written somewhere in the Kamailio wiki, if you want to set strings
> with number-like values, prefixing them with "s:" helps kamcmd
> understand you really want to set a string.
... and for reference the link to FAQ:

  -
https://www.kamailio.org/wiki/tutorials/faq/main#kamcmd_sometime_fails_to_execu
Cheers,
Daniel

--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect value when setting number like values in Htable using Kamcmd

Tony - Telecomy
In reply to this post by Tony - Telecomy
Prefixing the numbers with "s:" fixed the issue.

Thank you for your help.

Tony


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users