[SR-Users] lookup(aliases) issues with 5.2

Henning Westerholt hw at skalatan.de
Fri Nov 1 18:32:13 CET 2019


Hello Igor,

functional extensions like this will be usually not be backported to older stable releases.

But you should be able to easily apply the patch to your local copy, if you build from tar anyway.

This is the patch, you can apply with the command "patch":

https://github.com/kamailio/kamailio/commit/038158c99da96933c26b11a919ed1cbe29af9fab.patch

Cheers,

Henning

Am 28.10.19 um 19:13 schrieb igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>:
Hello Daniel,

Thank you!
Is it pushed in one of the latest release? Because we don't have a connection to git on our server. We build from tar.

Regards,

Igor.

De : Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Envoyé : jeudi 10 octobre 2019 14:40
À : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>; 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] lookup(aliases) issues with 5.2


Hello,

I just pushed a commit adding a core parameter to allow specifying additional character in the host part of URIs:

 - https://github.com/kamailio/kamailio/commit/038158c99da96933c26b11a919ed1cbe29af9fab

It is in the master branch. Can you test it and report if works as expected?

Cheers,
Daniel
On 04.10.19 10:08, igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> wrote:
Hello Daniel,

I confirm that we did that indeed. Just added the support of "_" instead of rollback on the whole code.

Thank you!

Regards,

Igor.

De : Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Envoyé : mercredi 11 septembre 2019 09:51
À : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>; 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] lookup(aliases) issues with 5.2


Hello,

I will think what would be good ways to optimizie.

If you want to change the code, probably doesn't make sense to revert the entire patch locally, just allow '_' -- you should change:

if(!isalnum(*p) && (*p != '.') && (*p != '-')) {

to

if(!isalnum(*p) && (*p != '.') && (*p != '-') && (*p != '_')) {

in src/core/parser/parse_uri.c -- see function parse_uri() and case URI_HOST_P.

Cheers,
Daniel


On 29.08.19 10:21, igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> wrote:
Hello Daniel, Henning,

I'd be interested, but if I'm the only one... Otherwise I can indeed remove this patch as Henning suggests, but it embarrasses me to have a different source code.
Tell me if it's possible to make it customizable. Otherwise I will consider either removing the patch or finding another workaround.

Regards,

Igor.

De : Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Envoyé : mercredi 28 août 2019 20:26
À : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>; 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] lookup(aliases) issues with 5.2


Hello,

I haven't authored that patch and also never needed an underscore in host part of the URI, but also it didn't affect me before that change. I guess Juha wanted o be compliant with the RFC.

If people need to allow an extended set of chars in the host part, I am fine to add some parameter to control that.

Cheers,
Daniel
On 28.08.19 15:34, igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> wrote:
Hello,

Hmm, ok. Saw it.
Is it possible to reconsider a less strict control?

Regards,

Igor.

De : Daniel-Constantin Mierla <miconda at gmail.com><mailto:miconda at gmail.com>
Envoyé : mercredi 28 août 2019 10:25
À : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>; 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] lookup(aliases) issues with 5.2


Hello,

reading again I see that the error with the host uri is printed from the C code. I thought of another issue that was reported related to IPv6 addresses in the URI that kamctl rejected.

The problem is that the underscore is not allowed in hostname: the relevant standard is RFC 1123, section 2.1 "Host Names and Numbers" which limits host names to letters-digits-hyphen.

I checked the commits log and it seems this more strict verification was added by next commit:

commit 4994960324d5353222b3de08515bed07802ab7bc
Author: Juha Heinanen <jh at tutpro.com><mailto:jh at tutpro.com>
Date:   Wed Jan 10 08:39:48 2018 +0200

    core/parser: more strict parsing of sip uri host

Regarding the $ALL_METHODS not being defined, iirc, you should set it to . (or maybe -1 in this case).

Cheers,
Daniel
On 28.08.19 10:12, igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> wrote:
Hello Daniel,

We moved to the latest 5.2.4 but hostname with underscore are still not handle properly.
Is it a real design choice or a mistake somewhere in the code that handle domain name?

Regards,

Igor.

De : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> <igor.potjevlesch at gmail.com><mailto:igor.potjevlesch at gmail.com>
Envoyé : mardi 27 août 2019 11:53
À : miconda at gmail.com<mailto:miconda at gmail.com>; 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : RE: [SR-Users] lookup(aliases) issues with 5.2

Hello Daniel,

Thank you for getting back to me.
We will update with 5.2.4 and I'll let you know if it's solved.

Regards,

Igor.

De : Daniel-Constantin Mierla <miconda at gmail.com<mailto:miconda at gmail.com>>
Envoyé : mardi 27 août 2019 09:39
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>; igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com>
Objet : Re: [SR-Users] lookup(aliases) issues with 5.2


Hello,
On 27.08.19 09:27, igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> wrote:
Hello!

Any help on that matter? Sounds like the domain parsing have been updated. Is it possible to back on the previous mode?

did you mean backporting to older branches? If yes, it was done to branch 5.2, have you tried with latest version in that branch?

Cheers,
Daniel

Regards,

Igor.

De : igor.potjevlesch at gmail.com<mailto:igor.potjevlesch at gmail.com> <igor.potjevlesch at gmail.com><mailto:igor.potjevlesch at gmail.com>
Envoyé : vendredi 23 août 2019 18:53
À : 'Kamailio (SER) - Users Mailing List' <sr-users at lists.kamailio.org><mailto:sr-users at lists.kamailio.org>
Objet : lookup(aliases) issues with 5.2

Hello!

I have notice some issues with lookup(aliases) since I upgraded to 5.2 from 5.1:
First with kamctl: If this default command is executed:

ctl_cmd_run ul.add "$USRLOC_TABLE" "$OSERUSER@$OSERDOMAIN" "$2" \
"$UL_EXPIRES" "$DEFAULT_Q" "$UL_PATH" "$UL_FLAGS" "$BR_FLAGS" "$ALL_METHODS"

as $ALL_METHODS is not defined, there is a huge value in methods and then lookup(aliases) fails with -2.

I have to update kamctl script and put -1 ("-1") instead of the variable. So, now, methods is a NULL value in DB and my alias is not ignored. But I use to make my alias like this: sip:number at blabla_1.local
Which is no longer works: ERROR: registrar [common.c:62]: extract_aor(): failed to parse AoR [sip:number at blabla_1.local]

Any idea of the difference since 5.2 with this behaviour? Without the underscore, the AoR seems to be valid but I need to support underscore as before.

Regards,

Igor.


_______________________________________________

Kamailio (SER) - Users Mailing List

sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- https://asipto.com/u/kat



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Kamailio Merchandising - https://skalatan.de/merchandising/
Kamailio services - https://skalatan.de/services
Henning Westerholt - https://skalatan.de/blog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191101/5243b6c3/attachment.html>


More information about the sr-users mailing list