Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
If auth_ephemeral gets deprecated, what would be a recommended approach to replace it? On Thu, 24 Feb 2022 at 21:46, Daniel-Constantin Mierla wrote: > Hello, > > it should be reviewed properly if does not work before removing. The > entire auth_ephemeral is deprecated from specs point of view, as the > ietf draft never made it to rfc, but it is still useful to use at least > for PoC. I don't have access to some old deployments using mode 0 to see > if they were changed meanwhile. > > Cheers, > Daniel > > On 24.02.22 10:39, Henning Westerholt wrote: > > Hello, > > > > yes, if it is not working and also deprecated, if probably should be > removed. You could open an issue for that or create (even better) a pull > request. > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – https://skalatan.de/blog/ > > Kamailio services – https://gilawa.com > > > > -Original Message- > > From: sr-users On Behalf Of > Vlasis Chatzistavrou > > Sent: Sunday, February 20, 2022 8:07 PM > > To: mico...@gmail.com; Kamailio (SER) - Users Mailing List < > sr-users@lists.kamailio.org> > > Subject: Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad > port in uri > > > > Hi Daniel, > > > > Just an update, I tested this with username_format set to 1 and set the > > To: and From: headers to be the phone's username (ie without the > timestamp). This worked without problems. > > > > However, setting the username_format to 0 (the deprecated option) does > not work even with the correct To: and From: headers. Since this option is > already deprecated perhaps it could be removed in future versions to avoid > confusion? > > > > On 25/1/2022 11:38, Vlasis Chatzistavrou wrote: > >> Thank you Daniel, > >> > >> I will give this a try. > >> > >> On 25/1/2022 11:11, Daniel-Constantin Mierla wrote: > >>> Hello, > >>> > >>> as far as I remember, the format with "user:timestamp" is only for > >>> authentication username field, respectively the username attribute in > >>> Proxy-/Authorization header. The subscriber address is still > >>> user@domain, so that has to be used in From/To headers. > >>> > >>> Cheers, > >>> Daniel > >>> > >>> On 02.01.22 20:36, Vlasis Chatzistavrou wrote: > Hello, > > I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the > following in the Kamailio configuration > > loadmodule "auth_ephemeral" > modparam( "auth_ephemeral", "sha_algorithm", 3 ) > modparam( "auth_ephemeral", "username_format", 0 ) > modparam( "auth_ephemeral", "secret", 1234 ) > > as per > > https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html# > auth_eph.p.username_format > > > > and registrations fail. In the logs we see: > > Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 > REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: > check_parse_uris(): looking up From header Jan 2 18:21:10 > enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER > rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: > check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 > /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER > rhaqgafd7boteg24jp5db0} > [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error > at char 5 in state 2) parsed: (17) > / (35) Jan 2 18:21:10 > enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER > rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: > check_parse_uris(): failed to parse From uri > > > Apparently Kamailio is confused by the timestamp following the > username separated by the : character. The REGISTER message is below: > > REGISTER sip:192.168.2.99 SIP/2.0 > Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 > Max-Forwards: 70 > To: "3518929" > From: "3518929" ;tag=ht76o8b2b6 > Call-ID: phkj9mi2n3s3ju7uu3qq2f > CSeq: 274 REGISTER > Contact: > ;reg-id=1;+sip.instance=" n:uuid:ca5e9372-dfa1-459a-b6ba-4398d23bd896>";expires=300 > > Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER > Supported: path, gruu, outbound > User-Agent: Raspberry Phone (SipJS - 0.11.6) > Content-Length: 0 > > and Kamailio parses it as sip:: instead of > sip::. > > Is this a bug that should be reported or is there any setting that I > am missing? > > > __ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@lists.kamailio.org > Important: keep the mailing list in the recipients, do not reply > only to the sender! > Edit mailing list options or unsubscribe: > * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > __ > > Kamailio - Users Mailing
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello, it should be reviewed properly if does not work before removing. The entire auth_ephemeral is deprecated from specs point of view, as the ietf draft never made it to rfc, but it is still useful to use at least for PoC. I don't have access to some old deployments using mode 0 to see if they were changed meanwhile. Cheers, Daniel On 24.02.22 10:39, Henning Westerholt wrote: > Hello, > > yes, if it is not working and also deprecated, if probably should be removed. > You could open an issue for that or create (even better) a pull request. > > Cheers, > > Henning > > -- > Henning Westerholt – https://skalatan.de/blog/ > Kamailio services – https://gilawa.com > > -Original Message- > From: sr-users On Behalf Of Vlasis > Chatzistavrou > Sent: Sunday, February 20, 2022 8:07 PM > To: mico...@gmail.com; Kamailio (SER) - Users Mailing List > > Subject: Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port > in uri > > Hi Daniel, > > Just an update, I tested this with username_format set to 1 and set the > To: and From: headers to be the phone's username (ie without the timestamp). > This worked without problems. > > However, setting the username_format to 0 (the deprecated option) does not > work even with the correct To: and From: headers. Since this option is > already deprecated perhaps it could be removed in future versions to avoid > confusion? > > On 25/1/2022 11:38, Vlasis Chatzistavrou wrote: >> Thank you Daniel, >> >> I will give this a try. >> >> On 25/1/2022 11:11, Daniel-Constantin Mierla wrote: >>> Hello, >>> >>> as far as I remember, the format with "user:timestamp" is only for >>> authentication username field, respectively the username attribute in >>> Proxy-/Authorization header. The subscriber address is still >>> user@domain, so that has to be used in From/To headers. >>> >>> Cheers, >>> Daniel >>> >>> On 02.01.22 20:36, Vlasis Chatzistavrou wrote: Hello, I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the following in the Kamailio configuration loadmodule "auth_ephemeral" modparam( "auth_ephemeral", "sha_algorithm", 3 ) modparam( "auth_ephemeral", "username_format", 0 ) modparam( "auth_ephemeral", "secret", 1234 ) as per https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html# auth_eph.p.username_format and registrations fail. In the logs we see: Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: check_parse_uris(): looking up From header Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 5 in state 2) parsed: (17) / (35) Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri Apparently Kamailio is confused by the timestamp following the username separated by the : character. The REGISTER message is below: REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=ht76o8b2b6 Call-ID: phkj9mi2n3s3ju7uu3qq2f CSeq: 274 REGISTER Contact: ;reg-id=1;+sip.instance=">>> n:uuid:ca5e9372-dfa1-459a-b6ba-4398d23bd896>";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 and Kamailio parses it as sip:: instead of sip::. Is this a bug that should be reported or is there any setting that I am missing? __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > __ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@lists.kamailio.org > Important: keep the mailing list in the recipients, do not reply only to the > sender! > Edit mailing list options or unsubscribe: > * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > __ > Kamailio - Users Mailing List - Non Commercial Discussions > *
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello, yes, if it is not working and also deprecated, if probably should be removed. You could open an issue for that or create (even better) a pull request. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com -Original Message- From: sr-users On Behalf Of Vlasis Chatzistavrou Sent: Sunday, February 20, 2022 8:07 PM To: mico...@gmail.com; Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri Hi Daniel, Just an update, I tested this with username_format set to 1 and set the To: and From: headers to be the phone's username (ie without the timestamp). This worked without problems. However, setting the username_format to 0 (the deprecated option) does not work even with the correct To: and From: headers. Since this option is already deprecated perhaps it could be removed in future versions to avoid confusion? On 25/1/2022 11:38, Vlasis Chatzistavrou wrote: > Thank you Daniel, > > I will give this a try. > > On 25/1/2022 11:11, Daniel-Constantin Mierla wrote: >> Hello, >> >> as far as I remember, the format with "user:timestamp" is only for >> authentication username field, respectively the username attribute in >> Proxy-/Authorization header. The subscriber address is still >> user@domain, so that has to be used in From/To headers. >> >> Cheers, >> Daniel >> >> On 02.01.22 20:36, Vlasis Chatzistavrou wrote: >>> Hello, >>> >>> I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the >>> following in the Kamailio configuration >>> >>> loadmodule "auth_ephemeral" >>> modparam( "auth_ephemeral", "sha_algorithm", 3 ) >>> modparam( "auth_ephemeral", "username_format", 0 ) >>> modparam( "auth_ephemeral", "secret", 1234 ) >>> >>> as per >>> >>> https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html# >>> auth_eph.p.username_format >>> >>> >>> >>> and registrations fail. In the logs we see: >>> >>> Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 >>> REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: >>> check_parse_uris(): looking up From header Jan 2 18:21:10 >>> enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER >>> rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: >>> check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 >>> /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER >>> rhaqgafd7boteg24jp5db0} >>> [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error >>> at char 5 in state 2) parsed: (17) >>> / (35) Jan 2 18:21:10 >>> enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER >>> rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: >>> check_parse_uris(): failed to parse From uri >>> >>> >>> Apparently Kamailio is confused by the timestamp following the >>> username separated by the : character. The REGISTER message is below: >>> >>> REGISTER sip:192.168.2.99 SIP/2.0 >>> Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 >>> Max-Forwards: 70 >>> To: "3518929" >>> From: "3518929" ;tag=ht76o8b2b6 >>> Call-ID: phkj9mi2n3s3ju7uu3qq2f >>> CSeq: 274 REGISTER >>> Contact: >>> ;reg-id=1;+sip.instance=">> n:uuid:ca5e9372-dfa1-459a-b6ba-4398d23bd896>";expires=300 >>> >>> Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER >>> Supported: path, gruu, outbound >>> User-Agent: Raspberry Phone (SipJS - 0.11.6) >>> Content-Length: 0 >>> >>> and Kamailio parses it as sip:: instead of >>> sip::. >>> >>> Is this a bug that should be reported or is there any setting that I >>> am missing? >>> >>> >>> __ >>> Kamailio - Users Mailing List - Non Commercial Discussions >>> * sr-users@lists.kamailio.org >>> Important: keep the mailing list in the recipients, do not reply >>> only to the sender! >>> Edit mailing list options or unsubscribe: >>> * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Thank you Daniel, I will give this a try. On 25/1/2022 11:11, Daniel-Constantin Mierla wrote: Hello, as far as I remember, the format with "user:timestamp" is only for authentication username field, respectively the username attribute in Proxy-/Authorization header. The subscriber address is still user@domain, so that has to be used in From/To headers. Cheers, Daniel On 02.01.22 20:36, Vlasis Chatzistavrou wrote: Hello, I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the following in the Kamailio configuration loadmodule "auth_ephemeral" modparam( "auth_ephemeral", "sha_algorithm", 3 ) modparam( "auth_ephemeral", "username_format", 0 ) modparam( "auth_ephemeral", "secret", 1234 ) as per https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format and registrations fail. In the logs we see: Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: check_parse_uris(): looking up From header Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 5 in state 2) parsed: (17) / (35) Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri Apparently Kamailio is confused by the timestamp following the username separated by the : character. The REGISTER message is below: REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=ht76o8b2b6 Call-ID: phkj9mi2n3s3ju7uu3qq2f CSeq: 274 REGISTER Contact: ;reg-id=1;+sip.instance="";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 and Kamailio parses it as sip:: instead of sip::. Is this a bug that should be reported or is there any setting that I am missing? __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello, as far as I remember, the format with "user:timestamp" is only for authentication username field, respectively the username attribute in Proxy-/Authorization header. The subscriber address is still user@domain, so that has to be used in From/To headers. Cheers, Daniel On 02.01.22 20:36, Vlasis Chatzistavrou wrote: > Hello, > > I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the > following in the Kamailio configuration > > loadmodule "auth_ephemeral" > modparam( "auth_ephemeral", "sha_algorithm", 3 ) > modparam( "auth_ephemeral", "username_format", 0 ) > modparam( "auth_ephemeral", "secret", 1234 ) > > as per > > https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format > > > and registrations fail. In the logs we see: > > Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 > REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: > check_parse_uris(): looking up From header > Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 > REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: > check_parse_uris(): parsing From URI > Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 > REGISTER rhaqgafd7boteg24jp5db0} > [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at > char 5 in state 2) parsed: (17) > / (35) > Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 > REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: > check_parse_uris(): failed to parse From uri > > > Apparently Kamailio is confused by the timestamp following the > username separated by the : character. The REGISTER message is below: > > REGISTER sip:192.168.2.99 SIP/2.0 > Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 > Max-Forwards: 70 > To: "3518929" > From: "3518929" ;tag=ht76o8b2b6 > Call-ID: phkj9mi2n3s3ju7uu3qq2f > CSeq: 274 REGISTER > Contact: > ;reg-id=1;+sip.instance="";expires=300 > Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER > Supported: path, gruu, outbound > User-Agent: Raspberry Phone (SipJS - 0.11.6) > Content-Length: 0 > > and Kamailio parses it as sip:: instead of > sip::. > > Is this a bug that should be reported or is there any setting that I > am missing? > > > __ > Kamailio - Users Mailing List - Non Commercial Discussions > * sr-users@lists.kamailio.org > Important: keep the mailing list in the recipients, do not reply only > to the sender! > Edit mailing list options or unsubscribe: > * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Online Feb 21-24, 2022 (America Timezone) * https://www.asipto.com/sw/kamailio-advanced-training-online/ __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello Vlad, this sounds then like a bug/incompatibility in the Kamailio parser together with the module. I have not checked the RFC, but this can be done later. Please open an issue on our tracker about it with the details from this e-mail, and also Kamailio version/cfg details from your earlier e-mail. Cheers, Henning -- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.com -Original Message- From: sr-users On Behalf Of Vlasis Chatzistavrou Sent: Monday, January 24, 2022 3:00 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri Hi Henning, I just tried the default IETF format ("1") but I get the same error from Kamailio: Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: DEBUG: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: DEBUG: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 2 in state 2) parsed: (20) / (35) Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: WARNING: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri In this case 35189 is the user and 1643036115 is the timestamp. REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.155;branch=z9hG4bK4638021 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=puibbfcnui Call-ID: fm2l7am7uggc2gc7jslpfj CSeq: 988 REGISTER Contact: ;reg-id=1;+sip.instance="";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 Kamailio still treats the number after : as the port. On 3/1/2022 18:54, Henning Westerholt wrote: > Hello, > > have you already tried to use the default username format "1", the IETF > format? This might be better for Kamailio. > > If this solves the problem, the mode 0 should probably be removed then. > > Cheers, > > Henning > __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hi Henning, I just tried the default IETF format ("1") but I get the same error from Kamailio: Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: DEBUG: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: DEBUG: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 2 in state 2) parsed: (20) / (35) Jan 24 13:57:59 enswitch43 /sbin/kamailio[432531]: WARNING: {1 988 REGISTER fm2l7am7uggc2gc7jslpfj} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri In this case 35189 is the user and 1643036115 is the timestamp. REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.155;branch=z9hG4bK4638021 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=puibbfcnui Call-ID: fm2l7am7uggc2gc7jslpfj CSeq: 988 REGISTER Contact: ;reg-id=1;+sip.instance="";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 Kamailio still treats the number after : as the port. On 3/1/2022 18:54, Henning Westerholt wrote: Hello, have you already tried to use the default username format "1", the IETF format? This might be better for Kamailio. If this solves the problem, the mode 0 should probably be removed then. Cheers, Henning __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello, have you already tried to use the default username format "1", the IETF format? This might be better for Kamailio. If this solves the problem, the mode 0 should probably be removed then. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com -Original Message- From: sr-users On Behalf Of Vlasis Chatzistavrou Sent: Sunday, January 2, 2022 8:37 PM To: sr-users@lists.kamailio.org Subject: [SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri Hello, I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the following in the Kamailio configuration loadmodule "auth_ephemeral" modparam( "auth_ephemeral", "sha_algorithm", 3 ) modparam( "auth_ephemeral", "username_format", 0 ) modparam( "auth_ephemeral", "secret", 1234 ) as per https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format and registrations fail. In the logs we see: Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: check_parse_uris(): looking up From header Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 5 in state 2) parsed: (17) / (35) Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri Apparently Kamailio is confused by the timestamp following the username separated by the : character. The REGISTER message is below: REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=ht76o8b2b6 Call-ID: phkj9mi2n3s3ju7uu3qq2f CSeq: 274 REGISTER Contact: ;reg-id=1;+sip.instance="";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 and Kamailio parses it as sip:: instead of sip::. Is this a bug that should be reported or is there any setting that I am missing? __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Problem with auth_ephemeral and parse_uri(): bad port in uri
Hello, I have a problem with Kamailio 5.4.6 and auth_ephemeral. I have the following in the Kamailio configuration loadmodule "auth_ephemeral" modparam( "auth_ephemeral", "sha_algorithm", 3 ) modparam( "auth_ephemeral", "username_format", 0 ) modparam( "auth_ephemeral", "secret", 1234 ) as per https://kamailio.org/docs/modules/4.1.x/modules/auth_ephemeral.html#auth_eph.p.username_format and registrations fail. In the logs we see: Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:777]: check_parse_uris(): looking up From header Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:817]: check_parse_uris(): parsing From URI Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: DEBUG: {1 545 REGISTER rhaqgafd7boteg24jp5db0} [core/parser/parse_uri.c:1296]: parse_uri(): bad port in uri (error at char 5 in state 2) parsed: (17) / (35) Jan 2 18:21:10 enswitch43 /sbin/kamailio[37501]: WARNING: {1 545 REGISTER rhaqgafd7boteg24jp5db0} sanity [sanity.c:820]: check_parse_uris(): failed to parse From uri Apparently Kamailio is confused by the timestamp following the username separated by the : character. The REGISTER message is below: REGISTER sip:192.168.2.99 SIP/2.0 Via: SIP/2.0/WSS 192.0.2.202;branch=z9hG4bK5452321 Max-Forwards: 70 To: "3518929" From: "3518929" ;tag=ht76o8b2b6 Call-ID: phkj9mi2n3s3ju7uu3qq2f CSeq: 274 REGISTER Contact: ;reg-id=1;+sip.instance="";expires=300 Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: path, gruu, outbound User-Agent: Raspberry Phone (SipJS - 0.11.6) Content-Length: 0 and Kamailio parses it as sip:: instead of sip::. Is this a bug that should be reported or is there any setting that I am missing? __ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users