I Think There May Be A Bug In 18.14.0 ${GEOLOC_PROFILE(profile_precedence)}, Seems To Always Return Prefer_incoming
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
3 thoughts on - I Think There May Be A Bug In 18.14.0 ${GEOLOC_PROFILE(profile_precedence)}, Seems To Always Return Prefer_incoming
Yeah, that’s weird. I opened an issue for this… https://issues.asterisk.org/jira/browse/ASTERISK-30190
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.
VGhhbmsgeW91IGZvciB0aGUgZXhwbGFuYXRpb24gR2VvcmdlLg0KVGhpcyBtYWtlcyBpdCB2ZXJ5
IGVhc3kgdG8ga25vdyBpZiB0aGUgR2VvIExvY2F0aW9uIGlzIHRoZSBjb25maWd1cmVkIG9yIGFu IGluY29taW5n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