Hi David,

Sorry for the delay.. You are missing parameters:

root@sbc02:~# kamctl rpc ul.add location 361119997@m.domain.com sip:361119997@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@sbc02:~#

root@sbc02:~# kamctl rpc ul.add location 361119997@m.domain.com sip:361119997@4.3.2.1 3600 1 sip:4.3.2.1:5060 0 0 13279 . .
{
  "jsonrpc":  "2.0",
  "result": {
  },
  "id": 31249
}
root@sbc02:~#

root@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@4.3.2.1",
                      "Expires":  3592,
                      "Q":  1,
                      "Call-ID":  "dfjrewr12386fd6-343@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@sbc02:~#


More info:






On Wed, Oct 31, 2018 at 10:05 AM David Villasmil <david.villasmil.work@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
phone: +34669448337


On Wed, Oct 31, 2018 at 3:22 PM David Villasmil <david.villasmil.work@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@m.domain.com sip:361119997@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@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users