[Asterisk-code-review] geolocation: Add sample config file (asterisk[development/16/geolocation])
George Joseph
asteriskteam at digium.com
Tue Feb 15 07:39:18 CST 2022
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18015 )
Change subject: geolocation: Add sample config file
......................................................................
geolocation: Add sample config file
This is the sample config file for res_geolocation.
Change-Id: Ieb809ed5f843c64528f00a3f08493f24cf4f0ee5
---
A configs/samples/geolocation.conf.sample
1 file changed, 320 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/18015/1
diff --git a/configs/samples/geolocation.conf.sample b/configs/samples/geolocation.conf.sample
new file mode 100644
index 0000000..496aa7c
--- /dev/null
+++ b/configs/samples/geolocation.conf.sample
@@ -0,0 +1,320 @@
+;--
+ Geolocation Profile Sample Configuration
+
+ 1. Overview
+ 2. Profile Parameter Descriptions
+ 3. Examples
+ 4. Reference
+--;
+
+;-----------------------------------------------------------------------
+ Overview
+-----------------------------------------------------------------------;
+
+;--
+Geolocation profiles contain ...
+
+ - Location information specified in Geographic Markup Langiage (GML),
+ civicAddress or unstructured formats.
+
+ - URIs that point to externally hosted location information.
+
+ - Instructions for the disposition location information.
+
+Channel drivers and the dialplan functions are responsible for
+associating profiles to endpoints/devices and calls. Normally, two
+profiles would be assigned to an endpoint, one for incoming calls
+(Asterisk is the UAS) and and one for outgoing calls (Asterisk is the
+UAC).
+--;
+
+
+;-----------------------------------------------------------------------
+ Profile Parameter Descriptions
+-----------------------------------------------------------------------;
+
+;-- type -------------------------------------------
+Must be "profile" to identify this configuration section as a location
+profile.
+
+;-- format -----------------------------------------
+Sets the format used to express the location.
+
+Values:
+civicAddress: [RFC4119] [RFC5139] [RFC5491]
+ The location information will be placed in an XML document
+ conforming to the PIDF-LO standard.
+ For chan_pjsip, this will be placed in the body of
+ outgoing INVITE messages in addition to any SDP.
+
+GML: [RFC4119] [RFC5491] [GeoShape]
+ The location information will be placed in an XML document
+ conforming to the PIDF-LO standard.
+ For chan_pjsip, this will be placed in the body of
+ outgoing INVITE messages in addition to any SDP.
+
+URI: [RFC6442]
+ The external URI at which the the location information
+ can be found. For chan_pjsip, this URI will be placed
+ in a "Geolocation" header in outgoing INVITE messages.
+
+There is no default.
+---------------------------------------------------;
+
+;-- pidf_lo_section -------------------------------
+
+If the format is civicAddress or GML, this sets the PIDF element into
+which the location information will be placed.
+
+Values:
+tuple: Places the information in a "tuple" element.
+device: Places the information in a "device" element.
+person: Places the information in a "person" element.
+
+Per [RFC5491], "device" is preferred and therefore the default.
+---------------------------------------------------;
+
+;-- geolocation-routing ---------------------------
+
+Sets whether the "Geolocation-Routing" header is added to outgoing
+requests. Set to "yes" to indicate that servers later in the path
+can use the location information for routing purposes. Set to "no"
+if they should not. If this value isn't specified, no
+"Geolocation-Routing" header will be added.
+
+;-- received_location_disposition ----------------
+
+On an incoming call leg, this sets what the channel driver should do
+with location information received from the remote party.
+
+On an outgoing call leg, this sets what the channel driver should do
+with location information received from the core/dialplan/incoming channel.
+
+Values:
+
+discard: Discard location specification received.
+append: Add the location specification after any configured one.
+prepend: Add the location specification before any configured one.
+replace: Replace the configured specification with the incoming one.
+
+[RFC5491] has specific requirements for multiple locations in a single
+document which you should understand before allowing multiple locations.
+For that reason, "replace" is the default action.
+---------------------------------------------------;
+
+;-- send_location ----------------------------------
+
+On an incoming call leg, this sets whether the channel driver should
+forward location information to the dialplan. The dialplan can
+retrieve then add/modify/delete the information and decide whether to
+forward the information to the outgoing channel.
+
+On an outcoming call leg, this sets whether the channel driver should
+forward location information to the remote party.
+
+Values:
+yes: Forward location info.
+no: Do not forward any location info.
+
+The default is 'no".
+---------------------------------------------------;
+
+;-- location ---------------------------------------
+
+The actual location information to send. The format depends on the
+"format" parameter set above. For readability, multiple "location"
+parameters can be specified and they will be concatenated into one
+specification.
+
+--- For civicAddress format:
+
+The following table lists the IANA registered element names that are
+currently accepted. The left column contains the official IANA
+registered codes and the right column contains completely unofficial
+synonyms accepted by res_geolocation.
+
+See [RFC5139] and [RFC5491]
+
+|---------|--------------------------|
+| Code | Unofficial Synonym |
+|---------|--------------------------|
+| country | country |
+| A1 | state_province |
+| A2 | county_district |
+| A3 | city |
+| A4 | district |
+| A5 | neighborhood |
+| A6 | street_group |
+| ADDCODE | additional_code |
+| BLD | building |
+| FLR | floor |
+| HNO | house_number |
+| HNS | house_number_suffix |
+| LMK | landmark |
+| LOC | additional_location |
+| NAM | location_name |
+| PC | postal_code |
+| PCN | postal_community |
+| PLC | place_type |
+| POBOX | po_box |
+| POD | trailing_street_suffix |
+| POM | road_post_modifier |
+| PRD | leading_road_direction |
+| PRM | road_pre_modifier |
+| RD | road |
+| RDBR | road_branch |
+| RDSEC | road_section |
+| RDSUBBR | road_sub_branch |
+| ROOM | room |
+| SEAT | seat |
+| STS | street_suffix |
+| UNIT | unit |
+|---------|--------------------------|
+
+Example with mix of Codes and Synonyms:
+
+format = civicAddress
+location = country=US
+location = A1="New York"
+location = A3="New York", city_division=Manhattan, house_number=1633,
+location = PRD=W, street=46th, street_suffix = Street
+location = postal_code=10222,floor=20,room=20A2
+
+
+--- For GML format:
+
+The following table contains the GML 3.1 acceptable shape types
+and their attributes.
+
+See: [RFC5491] [GeoShape]
+
+|------------|--------------------------------------|
+| Shape type | Attributes |
+|------------|--------------------------------------|
+| Point | pos |
+| Polygon | pos, pos, pos, ... |
+| Circle | pos, radius |
+| Ellipse | pos, semiMajorAxis, semiMinorAxis |
+| | orientation, orientation_uom |
+| ArcBand | pos, innerRadius, outerRadius, |
+| | startAngle, startAngle_uom, |
+| | openingAngle, openingAngle_uom |
+| Sphere | pos (must include altitude), radius |
+| Ellipsoid | pos (must include altitude), |
+| | semiMajorAxis, semiMinorAxis, |
+| | verticalAxis, orientation, |
+| | orientation_uom |
+| Prism | pos, pos, pos, ..., height |
+| | All positions must include altitude |
+| | and all must be the same altitude. |
+|------------|--------------------------------------|
+
+All distances (altitude, radius, axis, etc) must be in
+meters.
+
+All angles must be in degrees or radians as specified
+in the *_uom attribute.
+
+Examples:
+
+format = GML
+; A 2D point
+location = type=Point, pos="39.12345 -105.98765"
+
+; A 3D point. Altitude must be in meters.
+location = type=Point, pos="39.12345 -105.98765 1875.0"
+
+; A polygon (actually a triangle)
+location = type=Polygon
+location = pos="39.12345 -105.98766"
+location = pos="39.4500 -105.98766"
+location = pos="39.67890 -105.01346"
+location = pos="39.12345 -105.98766"
+
+; A circle
+location = type=Circle, pos="39.12345 -105.98766", radius=100
+
+; An ellipse
+location = type=Ellipse, pos="39.12345 -105.98766"
+location = semiMajorAxis = 600, semiMinorAxis=45
+location = orientation = 95, orientation_uom = radians
+
+; A prism using the polygon above as an example
+location = type=Polygon
+location = pos="39.12345 -105.98766 1866"
+location = pos="39.4500 -105.98766 1866"
+location = pos="39.67890 -105.01346 1866"
+location = pos="39.12345 -105.98766 1866"
+location = height = 10
+
+
+--- For URI format
+Example:
+format = URI
+location = URI=https://some.company.com/somelocation.html
+
+
+---------------------------------------------------;
+
+
+
+;---------------------------------------------------
+ Examples
+---------------------------------------------------;
+
+; You can use templates in this file!
+
+[test_incoming_phone_template](!)
+type = profile
+format = civicAddress
+location = country=US
+location = A1="New York"
+location = A3="New York", city_division=Manhattan, house_number=1633,
+location = PRD=W, street=46th, street_suffix = Street
+location = postal_code=10222
+; Don't take any location info from the phone itself.
+received_location_disposition = discard
+; Forward configured info to the core
+send_location = yes
+geolocation-routing = no
+
+[bobs_phone_test_incoming](test_incoming_phone_template)
+location = floor=20,room=20A2
+
+[alices_phone_test_incoming](test_incoming_phone_template)
+location = floor=20,room=20A6
+
+[test_outgoing_phone_template](!)
+type = profile
+; Do NOT send location information to the phone
+send_location = no
+
+[bobs_phone_test_outgoing](test_outgoing_phone_template)
+
+[alices_phone_test_outgoing](test_outgoing_phone_template)
+
+
+;-------------------------------
+----------- REFERENCE ----------
+-------------------------------;
+;--
+
+[RFC4119] A Presence-based GEOPRIV Location Object Format
+ https://www.rfc-editor.org/rfc/rfc4119.html
+
+[RFC5139] Revised Civic Location Format for Presence Information Data
+ Format Location Object (PIDF-LO)
+ https://www.rfc-editor.org/rfc/rfc5139
+
+[RFC5491] GEOPRIV Presence Information Data Format Location Object (PIDF-LO)
+ Usage Clarification, Considerations, and Recommendations
+ https://www.rfc-editor.org/rfc/rfc5491.html
+
+[RFC6442] Location Conveyance for the Session Initiation Protocol
+ https://www.rfc-editor.org/rfc/rfc6442.html
+
+[GeoShape] GML 3.1.1 PIDF-LO Shape Application Schema for use by the
+ Internet Engineering Task Force (IETF)
+ https://portal.ogc.org/files/?artifact_id=21630
+--;
+
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18015
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: development/16/geolocation
Gerrit-Change-Id: Ieb809ed5f843c64528f00a3f08493f24cf4f0ee5
Gerrit-Change-Number: 18015
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220215/6293a81f/attachment-0001.html>
More information about the asterisk-code-review
mailing list