[SR-Users] Can't add permanent location

David Villasmil david.villasmil.work at gmail.com
Wed Oct 31 18:24:18 CET 2018


Hey thanks!!

not working, but i'm finally getting some useful erros:

Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: jsonrpcs
[jsonrpcs_fifo.c:449]: jsonrpc_fifo_server(): preparing to execute fifo
jsonrpc [{"jsonrpc": "2.0", "method": "ul.add", "params": ["location", "
361119997 at sip2.domain.com", "sip:361119997 at 4.3.2.1", 3600, 1, "sip:
4.3.2.1:5060", 0, 0, 13279, ".", "."], "reply_name":
"kamailio_receiver_2583", "id": 2583}]
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: usrloc
[ul_rpc.c:573]: ul_rpc_add(): ret: 9 table:location
aor:361119997 at sip2.hayo.sn contact:sip:361119997 at 4.3.2.1 expires:3600
dtemp:1.000000 path:sip:4.3.2.1:5060 flags:0 bflags:0 methods:13279
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: usrloc
[ul_rpc.c:580]: ul_rpc_add(): q:1
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: <core> [sruid.c:183]:
sruid_next(): new sruid is [ulcx-5bd9ddde-525-a] (10 / 19)
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: ERROR: <core> [db.c:452]:
db_use_table(): invalid parameter value
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: ERROR: usrloc
[udomain.c:631]: db_load_urecord(): failed to use table location
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: ERROR: <core> [db.c:452]:
db_use_table(): invalid parameter value
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: ERROR: usrloc
[ucontact.c:678]: db_insert_ucontact(): sql use_table failed
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: ERROR: usrloc
[urecord.c:582]: insert_ucontact(): failed to insert in database
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: jsonrpcs
[jsonrpcs_mod.c:395]: jsonrpc_send(): sending response with body: (nil) -
500 Can't insert contact
Oct 31 13:22:52 sip2 /usr/sbin/kamailio[1326]: DEBUG: jsonrpcs
[jsonrpcs_fifo.c:461]: jsonrpc_fifo_server(): command executed - result:
[kamailio_receiver_2583] [500] [0x143dd50]
[{#012#011"jsonrpc":#011"2.0",#012#011"error":#0



Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337

ᐧ

On Wed, Oct 31, 2018 at 6:14 PM Joel Serrano <joel at textplus.com> wrote:

> Hi David,
>
> Sorry for the delay.. You are missing parameters:
>
> root at sbc02:~# kamctl rpc ul.add location 361119997 at m.domain.com
> sip:361119997 at 4.3.2.1 3600 1 sip:4.3.2.1:5060
> {
>   "jsonrpc":  "2.0",
>   "error":  {
>     "code": 500,
>     "message":  "Not enough parameters or wrong format"
>   },
>   "id": 31201
> }
> root at sbc02:~#
>
> root at sbc02:~# kamctl rpc ul.add location 361119997 at m.domain.com
> sip:361119997 at 4.3.2.1 3600 1 sip:4.3.2.1:5060 0 0 13279 . .
> {
>   "jsonrpc":  "2.0",
>   "result": {
>   },
>   "id": 31249
> }
> root at sbc02:~#
>
> root at sbc02:~# kamctl rpc ul.dump
> {
>   "jsonrpc":  "2.0",
>   "result": {
>     "Domains":  [{
>         "Domain": {
>           "Domain": "location",
>           "Size": 1024,
>           "AoRs": [{
>               "Info": {
>                 "AoR":  "361119997",
>                 "HashID": 1820329880,
>                 "Contacts": [{
>                     "Contact":  {
>                       "Address":  "sip:361119997 at 4.3.2.1",
>                       "Expires":  3592,
>                       "Q":  1,
>                       "Call-ID":  "dfjrewr12386fd6-343 at kamailio.rpc",
>                       "CSeq": 1,
>                       "User-Agent": "kamailio SIP Router - RPC Server",
>                       "Received": "[not set]",
>                       "Path": "sip:4.3.2.1:5060",
>                       "State":  "CS_SYNC",
>                       "Flags":  0,
>                       "CFlags": 0,
>                       "Socket": "[not set]",
>                       "Methods":  13279,
>                       "Ruid": "ulcx-5bd875a3-712-1",
>                       "Instance": "[not set]",
>                       "Reg-Id": 0,
>                       "Server-Id":  0,
>                       "Tcpconn-Id": 0,
>                       "Keepalive":  0,
>                       "Last-Keepalive": 0,
>                       "Last-Modified":  0
>                     }
>                   }]
>               }
>             }
>   ],
>           "Stats":  {
>             "Records":  1,
>             "Max-Slots":  1
>           }
>         }
>       }]
>   },
>   "id": 31347
> }
> root at sbc02:~#
>
>
> More info:
> https://kamailio.org/docs/modules/5.1.x/modules/usrloc.html#usrloc.r.add
>
>
>
>
>
>
> On Wed, Oct 31, 2018 at 10:05 AM David Villasmil <
> david.villasmil.work at gmail.com> wrote:
>
>> Ok, I checked my config and i had
>>
>> save("location","0x01")
>>
>> which disables saving the location in db, now when i register i see the
>> location in the table...
>> But i still can't add a location:
>>
>> Some help would be appreciated!
>>
>> David
>>
>>
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.work at gmail.com
>> phone: +34669448337
>>
>>>>
>> On Wed, Oct 31, 2018 at 3:22 PM David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> Hello all,
>>>
>>> I'm trying to add a permanent location.
>>>
>>> i’m using db_mode 1, use_domain = 1, i tried that command
>>>
>>> kamctl rpc ul.add location 361119997 at m.domain.com sip:361119997 at 4.3.2.1
>>> 3600 0 sip:4.3.2.1:5060
>>>
>>>
>>> Response is:
>>>
>>> {
>>> "jsonrpc": "2.0",
>>> "error": {
>>> "code": -32000,
>>> "message": "Execution Error"
>>> },
>>> "id": 25950
>>> }
>>>
>>>
>>> Anyone knows what this might be?
>>>
>>> David
>>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181031/396a3020/attachment.html>


More information about the sr-users mailing list