[asterisk-users] [External] I think there may be a bug in 18.14.0 ${GEOLOC_PROFILE(profile_precedence)}, seems to always return prefer_incoming

Dan Cropp dan at amtelco.com
Mon Aug 29 08:16:47 CDT 2022


Thank you for the explanation George.
This makes it very easy to know if the Geo Location is the configured or an incoming value.

Dan


From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of George Joseph
Sent: Thursday, August 25, 2022 7:21 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Subject: Re: [External] [asterisk-users] I think there may be a bug in 18.14.0 ${GEOLOC_PROFILE(profile_precedence)}, seems to always return prefer_incoming



On Wed, Aug 24, 2022 at 7:51 AM George Joseph <gjoseph at sangoma.com<mailto:gjoseph at sangoma.com>> wrote:
Yeah, that's weird.  I opened an issue for this...
https://issues.asterisk.org/jira/browse/ASTERISK-30190

OK, It's actually not weird :)
Let's say the configured profile is set to discard_config or prefer_incoming and there actually is an incoming profile.  In this situation, by the time you reach the dialplan, we've already discarded the configured profile in favor of the incoming one so profile_precedence is going to be what's on the incoming one which will always be prefer_incoming.  Is that going to be an issue?

BTW, there still is a bug where effective_location will be blank in this same situation and there are patches up on Gerrit that fix that and a few other bugs.

On Tue, Aug 23, 2022 at 2:47 PM Dan Cropp <dan at amtelco.com<mailto:dan at amtelco.com>> wrote:
Running into a problem when retrieving the profile_precedence in the extensions.conf

Creating a very basic geolocation.conf to allow passing through geolocation values for outbound.

[discard_config]
type = profile
profile_precedence = discard_config

[discard_incoming]
type = profile
profile_precedence = discard_incoming

[prefer_config]
type = profile
profile_precedence = prefer_config

[prefer_incoming]
type = profile
profile_precedence = prefer_incoming


I have tried setting the pjsip.conf geoloc_incoming_call_profile to all four of these profiles for inbound call testing.  The discard_incoming correctly blocks the geo location information.  Other 3 pass the geo location values through

[192.168.33.31]
type = endpoint
context = IS
transport = transport1
aors = 192.168.33.31
accountcode = 20
dtmf_mode = inband
device_state_busy_at = 1600
moh_passthrough = no
identify_by = username,ip,header
disallow = all
allow = ulaw
acl = acl1
geoloc_incoming_call_profile = prefer_config
geoloc_outgoing_call_profile = prefer_config

When I have the following line in the extensions.conf, it’s retrieving the GEOLOC_PROFILE(profile_precedence) to the variable, but it’s being set to prefer_incoming even when it should be discard_config or prefer_config.

same => n,Set(MY__GEO_PROFILE_PRECEDENCE=${GEOLOC_PROFILE(profile_precedence)})

Dan
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220829/a4ac2d5c/attachment.html>


More information about the asterisk-users mailing list