Question About The Geo Location Support Being Added
Looking at the Asterisk wiki https://wiki.asterisk.org/wiki/display/AST/Asterisk+Geolocation+Implementation
I see the dial plan support the GeolocProfileCreate and there is support for GEOLOC_PROFILE settings to be set on the dial plan.
We currently use AMI Originate support. We may have dozens/hundreds of calls in the system and external to Asterisk, someone executes a behavior where we perform the Originate, if the party answers, we ConfBridge the necessary calls together. It can be multiple calls and we never know when the total calls bridged together will need to be increased. Because of the random increase in calls, we can’t use the Dial to bridge the parties together.
The GEO Location information for the original caller can vary significantly because they could be WebRTC. We are planning to require the setup of the Geo Location for each call to be provided to us (either via the incoming call or it may be provided from third party software). Either way, we will know what the GEO Location to use for the Originate. Trying to wrap my head around the best way to achieve this.
Using AMI Originate, is it possible to set the GEOLOC_PROFILE settings via the Variable header?
My thought would be to configure an outgoing Geo Location profile for the PJSIP endpoint, but it would have the minimum settings. When sending the AMI Originate, provide all the adjustments to the GEOLOC_PROFILE settings via the Variable.
Is this possible or might there be a better way to achieve this?
Alternatively, I could generate an internal local channel, configure the GeoLocProfile on it, configure all GEOLOC_PROFILE adjustments on it, then have it perform the Dial. If the other end answers or not, treat it exactly as we currently do using the Originate.
Dan
2 thoughts on - Question About The Geo Location Support Being Added
Just FYI, I’m in the process of clarifying and adding more info. Should be done Friday.
A real scenario to test!!! Thanks!
I’ve not tested this but you don’t need to do it at all…
Actually it would have a template specifying replacement channel variables.
When sending the AMI Originate, provide all the adjustments to the It’s possible but probably not needed. Let’s say you’re using Civic Address and a direct originate to the remote party via Dial. In the originate, you can specify regular, inherited channel variables with the official Civic Address parameters preceded by ‘_’. Let’s use HNO (house number) as an example. You’d set _HNO=1633 in the originate and since it has the ‘_’ prefix it’s going to be inherited by the outgoing channel. In the outgoing channel’s profile/location, you’d set ‘location_info =
HNO=${_HNO}. Of course there’d be more than just the HNO parameter set but it’s the same technique. The outgoing channel has a very generic location template populated with values received from the incoming channel.
Now, this isn’t going to work if you’re originating both calls and adding them to a bridge yourself but in this case, you have both channels at the same time so you can just add the incoming channel’s location info directly to the outgoing channel’s variables as you originate the outgoing call. Youdon’;t need to create a new GEOLOC_PROFILE for the outgoing channel.
All of this assumes that I actually understood your situation correctly. 🙂
How are you getting the caller’s info in the first place?
Sounds more complicated than it needs to be.
VGhhbmsgeW91IEdlb3JnZS4NCg0KQWxzbywgdGhhbmsgeW91IGFuZCBldmVyeW9uZSBlbHNlIGlu dm9sdmVkIGZvciB0aGUgd29yayBhZGRpbmcgR2VvIExvY2F0aW9uIGluIEFzdGVyaXNrLg0KTG9v a2luZyBmb3J3YXJkIHRvIHRoZSB1cGRhdGUuDQoNCkluIG91ciBjYXNlLCBhbGwgdGhlIGFnZW50
IG1lc3NhZ2luZyBhbmQgc2V2ZXJhbCBvdGhlciBmZWF0dXJlcyBhcmUgaGFuZGxlZCBieSBhIHNl cGFyYXRlIHNlcnZlci4NClRoaXMgZXh0ZXJuYWwgc2VydmVyIHdvdWxkIGJlIHJlc3BvbnNpYmxl IGZvciBkZWNpZGluZyB3aGljaCBHRU8gTG9jYXRpb24gSW5mbyB0byB1c2UgZm9yIHRoZSBPcmln aW5hdGUuDQoNCiAgKiAgIEFnZW50IGhhcyB0aGVpciBvd24gZW1lcmdlbmN5LCBzbyB1c2UgQWdl bnTigJlzIEdFTyBMb2NhdGlvbiAocmVxdWlyZSBBZ2VudCB0byB2ZXJpZnkgZXZlcnkgdGltZSB0
aGV5IGxvZ2luIHNpbmNlIG1hbnkgd29yayByZW1vdGVseSBhbmQgd2lsbCB3b3JrIGZyb20gaG9t ZSBvciByZWxhdGl2ZXMgaG9tZXMpLg0KICAqICAgQWdlbnQgbW9uaXRvcmluZyB2aWRlbyBmcm9t IHNldmVyYWwgZmFjaWxpdGllcyBhcm91bmQgdGhlIGNvdW50cnkgbm90aWNlcyBhIGZpcmUgaW4g Q2FsaWZvcm5pYSBmYWNpbGl0eSBzbyB0aGUgR0VPIExvY2F0aW9uIHdvdWxkIGJlIHRoZSBDYWxp Zm9ybmlhIGZhY2lsaXR5Lg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