Could be a CLI thing maybe?
I tried with RPC:
curl localhost/RPC -X POST -d
'{"jsonrpc":"2.0","method":"ul.add","params":{"table":"location", "aor":"test",
"contact":"sip:[email protected]", "expires":"0", "Q":"440",
"path":"sip:sbcip:5060", "flags":"0", "cflags":"0", "methods":"0",
"received":"0"},"id":"1720384499002728”}'
Response:
```json
{
"jsonrpc": "2.0",
"result": {
},
"id": "1720384499002728"
}
```
curl -XPOST -d '{"jsonrpc":"2.0","method":"ul.dump","id":200}' localhost/RPC
```json
...
{
"Info": {
"AoR": "test",
"HashID": 2063405720,
"Contacts": [{
"Contact": {
"Address": "sip:[email protected]",
"Expires": "permanent",
"Q": 0,
"Call-ID": "[email protected]",
"CSeq": 1,
"User-Agent": "kamailio SIP Router - RPC Server",
"Received": "[not set]",
"Path": "sip:sbcip:5060",
"State": "CS_NEW",
"Flags": 0,
"CFlags": 0,
"Socket": "[not set]",
"Methods": 0,
"Ruid": "ulcx-68b75007-370-1",
"Instance": "[not set]",
"Reg-Id": 0,
"Server-Id": 0,
"Tcpconn-Id": -1,
"Keepalive": 0,
"Last-Keepalive": 1758031336,
"KA-Roundtrip": 0,
"Last-Modified": 0
}
}]
}
```
Fred Posner
Tel: +1 (352) 664-3733
Alt: +1 (224) 334-3733
Contact info at https://fredp.xyz
> On Sep 16, 2025, at 9:37 AM, Benoit Panizzon via sr-users
> <[email protected]> wrote:
>
> Hi Gang
>
> Recently we got a request from a customer, if we could just route calls
> to his number to an arbitrary sip URI.
>
> First I was thinking on the lines - yes I could probably
> append_branch() yet another contact from yet another database table.
>
> But then I came across static entries in the userloc database, that
> would be even easier! Just add the additional entry with kamcmd and
> done.
>
> https://www.kamailio.org/docs/modules/5.8.x/modules/usrloc.html#usrloc.r.add
>
> Only issue - I haven't figured out how to add that contact - I would
> also need to add a path to send the invite via our rtpengine SBC.
>
> # kamcmd ul.add location AOR-XY sip:[email protected] 0 \
> 440 sip:sbcip:5060 0 0 0 0 0
>
> I am aware, the path should contain ;lr
>
> But no matter what I try I get:
>
> error: 500 - Not enough parameters or wrong format
>
> Does anyone have an example on how to add a static contact to the
> location database?
>
> I managed to add a contact with kamctl ul add but I don't manage to add
> the required path or q value.
>
> Mit freundlichen Grüssen
>
> -Benoît Panizzon-
> --
> I m p r o W a r e A G - Leiter Commerce Kunden
> ______________________________________________________
>
> Zurlindenstrasse 29 Tel +41 61 826 93 00
> CH-4133 Pratteln Fax +41 61 826 93 01
> Schweiz Web http://www.imp.ch
> ______________________________________________________
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the
> sender!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!