Hi all
Using version 5.4.x here.
I save the registrations with use_domain 0 but I do use the domain module to do some checks.
If I execute "kamctl ul" show I can see the registrations but if I execute "kamctl ul show username" I get
"ERROR: domain unknown: use usernames with domain or set default domain in SIP_DOMAIN"
I understand I should use domain in case I was using it in the usrloc module but I'm not.
How can I tell kamctl not to ask for domain?
cheers,
Jonm
Hello,
the error message from kamctl, not from kamailio. You need to set SIP_DOMAIN inside kamctlrc file or do: kamctl ul show username@domain, where domain can be localhost or anything else. The kamctl is built that way, is not really aware that the kamailio is multi-domain enabled or not. Actually, kamailio still needs sip addresses with user@domain, just ignores the domain for queries.
You can make kamctl to be more flexible here, it is a shell script, if you provide a patch, can be merged. On the other hand, it might be better to just go for kamcli, it is planned that at some point is going to replace kamctl.
Cheers, Daniel
On 09.03.21 00:05, Jon Bonilla (Manwe) wrote:
Hi all
Using version 5.4.x here.
I save the registrations with use_domain 0 but I do use the domain module to do some checks.
If I execute "kamctl ul" show I can see the registrations but if I execute "kamctl ul show username" I get
"ERROR: domain unknown: use usernames with domain or set default domain in SIP_DOMAIN"
I understand I should use domain in case I was using it in the usrloc module but I'm not.
How can I tell kamctl not to ask for domain?
cheers,
Jonm
-- PekePBX, the multitenant PBX solution https://pekepbx.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
El Tue, 9 Mar 2021 09:32:00 +0100 Daniel-Constantin Mierla miconda@gmail.com escribió:
Hello,
the error message from kamctl, not from kamailio. You need to set SIP_DOMAIN inside kamctlrc file or do: kamctl ul show username@domain, where domain can be localhost or anything else. The kamctl is built that way, is not really aware that the kamailio is multi-domain enabled or not. Actually, kamailio still needs sip addresses with user@domain, just ignores the domain for queries.
If I use user@anydomain I always get
{ "jsonrpc": "2.0", "error": { "code": 500, "message": "Domain not found" }, "id": 3826 }
You can make kamctl to be more flexible here, it is a shell script, if you provide a patch, can be merged. On the other hand, it might be better to just go for kamcli, it is planned that at some point is going to replace kamctl.
Will check. Will also try kamcli
The domain in the jsonrpc response refers to the location table -- somehow internally the name of the table storing the contacts is also referred as domain. I just pushed a patch to add table to the response text.
Do you use save("location") and lookup("location") or another table name? The kamctl uses "location", if you use something else, you need to adjust kamctl.
Cheers, Daniel
On 09.03.21 11:52, Jon Bonilla (Manwe) wrote:
El Tue, 9 Mar 2021 09:32:00 +0100 Daniel-Constantin Mierla miconda@gmail.com escribió:
Hello,
the error message from kamctl, not from kamailio. You need to set SIP_DOMAIN inside kamctlrc file or do: kamctl ul show username@domain, where domain can be localhost or anything else. The kamctl is built that way, is not really aware that the kamailio is multi-domain enabled or not. Actually, kamailio still needs sip addresses with user@domain, just ignores the domain for queries.
If I use user@anydomain I always get
{ "jsonrpc": "2.0", "error": { "code": 500, "message": "Domain not found" }, "id": 3826 }
You can make kamctl to be more flexible here, it is a shell script, if you provide a patch, can be merged. On the other hand, it might be better to just go for kamcli, it is planned that at some point is going to replace kamctl.
Will check. Will also try kamcli
-- PekePBX, the multitenant PBX solution https://pekepbx.com
El Tue, 9 Mar 2021 12:32:19 +0100 Daniel-Constantin Mierla miconda@gmail.com escribió:
The domain in the jsonrpc response refers to the location table -- somehow internally the name of the table storing the contacts is also referred as domain. I just pushed a patch to add table to the response text.
Do you use save("location") and lookup("location") or another table name? The kamctl uses "location", if you use something else, you need to adjust kamctl.
Yes, my table name has kam_ prefix. I'm checking if I can export that and have it read in kamctl somehow.
why is that the general ul show works without issues and the specific one needs to know the table name?