[asterisk-users] How to read or write Geolocation (RFC6442) data in SIP/PJSIP messages ?

Olivier oza.4h07 at gmail.com
Thu Dec 7 10:35:55 CST 2017


Hello,

I'm having a look at section 13.1 from SIP Connect v2 doc (see [1]).
It refers to RFC6442 which gives the following example (sorry for its
length):

INVITE sips:bob at biloxi.example.com SIP/2.0
   Via: SIPS/2.0/TLS pc33.atlanta.example.com;branch=z9hG4bK74bf9
   Max-Forwards: 70
   To: Bob <sips:bob at biloxi.example.com>
   From: Alice <sips:alice at atlanta.example.com>;tag=9fxced76sl
   Call-ID: 3848276298220188511 at atlanta.example.com
   Geolocation: <cid:target123 at atlanta.example.com>
   Geolocation-Routing: no
   Accept: application/sdp, application/pidf+xml
   CSeq: 31862 INVITE
   Contact: <sips:alice at atlanta.example.com>
   Content-Type: multipart/mixed; boundary=boundary1
   Content-Length: ...

   --boundary1

   Content-Type: application/sdp

   ...Session Description Protocol (SDP) goes here

   --boundary1

   Content-Type: application/pidf+xml
   Content-ID: <target123 at atlanta.example.com>
   <?xml version="1.0" encoding="UTF-8"?>
       <presence
          xmlns="urn:ietf:params:xml:ns:pidf"
          xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
          xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy"
          xmlns:cl="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr"
          xmlns:gml="http://www.opengis.net/gml"
          xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
          entity="pres:alice at atlanta.example.com">
        <dm:device id="target123-1">
          <gp:geopriv>
            <gp:location-info>
              <gml:location>
                <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
                  <gml:pos>32.86726 -97.16054</gml:pos>
                </gml:Point>
             </gml:location>
            </gp:location-info>
            <gp:usage-rules>
              <gbp:retransmission-allowed>false
              </gbp:retransmission-allowed>
              <gbp:retention-expiry>2010-11-14T20:00:00Z
              </gbp:retention-expiry>
            </gp:usage-rules>
            <gp:method>802.11</gp:method>
          </gp:geopriv>
          <dm:deviceID>mac:1234567890ab</dm:deviceID>
          <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
        </dm:device>
      </presence>
   --boundary1--


1. Adding or reading the lines bellow seems easy. How can you add a whole
application/pidf+xml section as above either using SIP or PJSIP ?
   Geolocation: <cid:target123 at atlanta.example.com>
   Geolocation-Routing: no

2. Reciprocally, how can you read such application/pidf+xml section an
incoming call ?

3. What do you know of this RFC 6442 adoption within SIP industry ?

Best regards

[1]
https://www.sipforum.org/download/sipconnect-technical-recommendation-version-2-0/?wpdmdl=2818
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20171207/435711f2/attachment.html>


More information about the asterisk-users mailing list