Hi Daniel
Thanks for your fast replies!
I'm sorry, I'm not able to test the latest branch today, because it's a
productive system and I am away next two weeks.
But I will do as soon as I'm back or I am going to upgrade directly to
5.4 when it is released.
Regards
Stefan
Am 02.07.20 um 09:59 schrieb Daniel-Constantin Mierla:
Hello,
can you try with latest git branch 5.3 -- I pushed some commits there
trying to address both issues. I don't have any postgres around to test,
but ul add without dots should work now.
Cheers,
Daniel
On 01.07.20 17:06, Stefan wrote:
> Hi Daniel
>
> Verbose reply is (I changed the domain):
>
> -e FIFO command was:
> {"jsonrpc": "2.0", "method": "ul.add",
"params": ["location",
> "1234(a)my.domain.com".com", "sip:1234@10.10.10.10:5060", 0, 1.0, 0, 0,
0,
> 4294967295], "reply_name": "kamailio_receiver_3949",
"id": 3949}
>
> Stefan
>
> Am 01.07.20 um 16:53 schrieb Daniel-Constantin Mierla:
>> Hmm, error getting the command parameter, run:
>>
>> VERBOSE=1 kamctl ul add 1234 sip:1234@10.10.10.10:5060
>>
>> and you should see the jsonrpc command printed like:
>>
>> FIFO command was:
>> {"jsonrpc": "2.0", ...
>>
>> Send it here to check it.
>>
>> Cheers,
>> Daniel
>>
>> On 01.07.20 16:42, Stefan wrote:
>>> Hello Daniel
>>>
>>> The kamailio.log shows me the following:
>>> Jul 1 14:38:31 kamailio-srv02 /sbin/kamailio[3895]: ERROR: usrloc
>>> [ul_rpc.c:625]: ul_rpc_add(): not enough parameters - read so far: -5
>>>
>>> Regards
>>> Stefan
>>>
>>> Am 01.07.20 um 15:03 schrieb Daniel-Constantin Mierla:
>>>> Hello,
>>>>
>>>> so for the first case the error is actually in the postgres, the
>>>> methods
>>>> in the query is without sign. But looking at kamctl, it should be
>>>> 0xffffffff (or -1). Needs some check in the db_postgres code.
>>>>
>>>> For the second case, the command without ending dots that is not
>>>> working: can you look in the syslog file for error messages that
>>>> contain:
>>>>
>>>> ... not enough parameters - read so far ...
>>>>
>>>> And paste them here to see how many parameters were sent over via rpc.
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 01.07.20 13:21, Stefan wrote:
>>>>> Hi Daniel
>>>>>
>>>>> I got still the same error:
>>>>>
>>>>> kamctl ul add 1234 sip:1234@10.10.10.10:5060 . .
>>>>> {
>>>>> "jsonrpc": "2.0",
>>>>> "result": {
>>>>> },
>>>>> "id": 1679
>>>>> }
>>>>>
>>>>>
>>>>> Jul 1 11:14:20 kamailio-srv02 /sbin/kamailio[3892]: ERROR:
>>>>> db_postgres [km_dbase.c:266]: db_postgres_submit_query():
>>>>> 0x7fbe5398c148 PQsendQuery Error: ERROR: integer out of range#012
>>>>> Query: insert into location
>>>>>
(username,contact,expires,q,callid,cseq,flags,cflags,user_agent,methods,last_modified,ruid,reg_id,server_id,connection_id,keepalive,partition
>>>>>
>>>>>
>>>>> ) values
('1234','sip:1234@10.10.10.10:5060','1970-01-01
>>>>> 00:00:00',1.000000
>>>>> ,'dfjrewr12386fd6-343(a)kamailio.rpc',1,0,0,'kamailio
>>>>> SIP Router - RPC Server',2147483648,'1970-01-01
>>>>> 00:00:00','ulcx-5ef99724-f37-2',0,0,0,0,24)
>>>>>
>>>>> Btw: Why is the following not working?
>>>>>
>>>>> kamctl ul add 1234 sip:1234@10.10.10.10:5060
>>>>> {
>>>>> "jsonrpc": "2.0",
>>>>> "error": {
>>>>> "code": 500,
>>>>> "message": "Not enough parameters or wrong
format"
>>>>> },
>>>>> "id": 1788
>>>>> }
>>>>>
>>>>> Usage says:
>>>>> ul add <username> <uri> ............... introduce a
permanent usrloc
>>>>> entry
>>>>>
>>>>> Cheers,
>>>>> Stefan
>>>>>
>>>>> Am 01.07.20 um 12:01 schrieb Daniel-Constantin Mierla:
>>>>>> Hello,
>>>>>>
>>>>>> try with . (dot) instead of NULL, otherwise you give the string
>>>>>> "NULL"
>>>>>> as value. Like:
>>>>>>
>>>>>> kamctl ul add 1234 sip:1234@10.10.10.10:5060 . .
>>>>>>
>>>>>> Cheers,
>>>>>> Daniel
>>>>>>
>>>>>> On 01.07.20 11:42, Stefan wrote:
>>>>>>> Hi Maillist
>>>>>>>
>>>>>>> Kamailio-Version: 5.3.5 built from source with postgres-db.
>>>>>>> I get an Error if I try to add a static location with
kamctl,
>>>>>>> see my
>>>>>>> example:
>>>>>>>
>>>>>>> kamctl ul add 1234 sip:1234@10.10.10.10:5060 NULL NULL
>>>>>>>
>>>>>>> Log output:
>>>>>>> Jul 1 09:28:20 kamailio-srv02 /sbin/kamailio[3892]: ERROR:
>>>>>>> db_postgres [km_dbase.c:266]: db_postgres_submit_query():
>>>>>>> 0x7fbe5398c148 PQsendQuery Error: ERROR: integer out of
range#012
>>>>>>> Query: insert into location
>>>>>>>
(username,contact,expires,q,callid,cseq,flags,cflags,user_agent,path,methods,last_modified,ruid,reg_id,server_id,connection_id,keepalive,partition
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ) values
('1234','sip:1234@10.10.10.10:5060','1970-01-01
>>>>>>> 00:00:00',1.000000
>>>>>>>
,'dfjrewr12386fd6-343(a)kamailio.rpc',1,0,0,'kamailio
>>>>>>> SIP Router - RPC
Server','NULL',2147483648,'1970-01-01
>>>>>>> 00:00:00','ulcx-5ef99724-f37-1',0,0,0,0,22)
>>>>>>>
>>>>>>> truncated output of kamctl ul show:
>>>>>>>
>>>>>>> "AoRs": [{
>>>>>>> "Info": {
>>>>>>> "AoR": "1234",
>>>>>>> "HashID": 924651761,
>>>>>>> "Contacts": [{
>>>>>>> "Contact": {
>>>>>>> "Address":
"sip:1234@10.10.10.10:5060",
>>>>>>> "Expires":
"permanent",
>>>>>>> "Q": 1,
>>>>>>> "Call-ID":
>>>>>>> "dfjrewr12386fd6-343(a)kamailio.rpc".rpc",
>>>>>>> "CSeq": 1,
>>>>>>> "User-Agent":
"kamailio SIP Router - RPC
>>>>>>> Server",
>>>>>>> "Received": "[not
set]",
>>>>>>> "Path":
"NULL",
>>>>>>> "State":
"CS_NEW",
>>>>>>> "Flags": 0,
>>>>>>> "CFlags": 0,
>>>>>>> "Socket": "[not
set]",
>>>>>>> "Methods": -2147483648,
>>>>>>> "Ruid":
"ulcx-5ef99724-f37-1",
>>>>>>> "Instance": "[not
set]",
>>>>>>> "Reg-Id": 0,
>>>>>>> "Server-Id": 0,
>>>>>>> "Tcpconn-Id": 0,
>>>>>>> "Keepalive": 0,
>>>>>>> "Last-Keepalive": 0,
>>>>>>> "Last-Modified": 0
>>>>>>> }
>>>>>>> }]
>>>>>>> }
>>>>>>> }, {
>>>>>>>
>>>>>>>
>>>>>>> So the log tells me: integer out of range. I think it's
this one:
>>>>>>> "Methods": -2147483648,
>>>>>>> This let's me thinking that this is a bug.
>>>>>>>
>>>>>>> Someone else?
>>>>>>>
>>>>>>> Regards
>>>>>>> Stefan
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Kamailio (SER) - Users Mailing List
>>>>>>> sr-users(a)lists.kamailio.org
>>>>>>>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users