<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Hi All,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I am trying to add PIDF-LO XML to INVITE, however i have had little success so far.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
My end goal is to create an invite like mentioned in </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<a href="https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-sipre/4010daf5-445e-4d8d-bb0c-b0c84ef280e8" id="LPlnk">https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-sipre/4010daf5-445e-4d8d-bb0c-b0c84ef280e8</a><br>
</div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
I have the following config:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="background-color: rgb(43, 43, 43); color: rgb(169, 183, 198); font-family: "JetBrains Mono", monospace; font-size: 9.8pt;">request_route{<br>    xlog(<span style="color: rgb(106, 135, 89);">"L_DBG"</span>,<span style="color: rgb(106, 135, 89);">"REQUEST RECEIVED \n ($mb) \n"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>    if (is_method(<span style="color: rgb(106, 135, 89);">"INVITE"</span>)) {<br>           xinfo(<span style="color: rgb(106, 135, 89);">"$ua\n"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>           regex_substring(<span style="color: rgb(106, 135, 89);">"$ua"</span>, <span style="color: rgb(106, 135, 89);">"([a-f0-9]{12})"</span>,0, 1, <span style="color: rgb(106, 135, 89);">"$var(asd)"</span>)<span style="color: rgb(128, 128, 128);">;<br></span><span style="color: rgb(128, 128, 128);"><br></span>           if($var(asd)!=<span style="color: rgb(106, 135, 89);">""</span>) {<br>               http_client_query(<span style="color: rgb(106, 135, 89);">"http://127.0.0.1/location/$var(asd)"</span>,<span style="color: rgb(106, 135, 89);">"$var(result)"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>               xdbg(<span style="color: rgb(106, 135, 89);">"$rc ,[$var(result)]\n"</span>)<span style="color: rgb(128, 128, 128);">;<br></span><span style="color: rgb(128, 128, 128);"><br></span>           if(!has_body(<span style="color: rgb(106, 135, 89);">"application/pidf+xml"</span>)) {<br>               set_body_multipart(<span style="color: rgb(106, 135, 89);">"$rb"</span>, <span style="color: rgb(106, 135, 89);">"application/sdp"</span>, <span style="color: rgb(106, 135, 89);">"delimiter"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>                msg_apply_changes()<span style="color: rgb(128, 128, 128);">;<br></span>                append_body_part($(var(result){s.unquote}), <span style="color: rgb(106, 135, 89);">"application/pidf+xml"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>                msg_apply_changes()<span style="color: rgb(128, 128, 128);">;<br></span>                }<br>                }else {<br>                    xerr(<span style="color: rgb(106, 135, 89);">"NO MAC ADDRESS FOUND\n"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>                    }<br>                }<br>            route(<span style="color: rgb(106, 135, 89);">"forward"</span>)<span style="color: rgb(128, 128, 128);">;<br></span>}</pre>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
which achieves the following but doesn't have the xml in the correct format. I have explored most of the modules but couldnt find a handy function for this.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">INVITE sip:service@10.0.1.133:5060 SIP/2.0</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Via: SIP/2.0/TCP 169.254.172.2;branch=z9hG4bK3de6.d3b4cddbcbdba59a3e190c41b06ada15.0;i=1</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span style="font-variant-ligatures: no-common-ligatures;">From: sipp <sip:sipp@<span style="color: rgb(47, 255, 18); font-variant-ligatures: no-common-ligatures; background-color: rgba(0, 0, 0, 0.9); display: inline !important;">1.1.1.1</span>:45907>;tag=21113SIPpTag001</span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">To: service <sip:service@10.0.1.133:5060></span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Call-ID: 1-21113@1.1.1.1</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">CSeq: 1 INVITE</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span style="font-variant-ligatures: no-common-ligatures;">Contact: sip:sipp@<span style="color: rgb(47, 255, 18); font-variant-ligatures: no-common-ligatures; background-color: rgba(0, 0, 0, 0.9); display: inline !important;">1.1.1.1</span>:45907</span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Max-Forwards: 70</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Subject: Performance Test</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Content-Length:
<span class="Apple-converted-space">  </span>937</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Content-Type: multipart/mixed;boundary="delimiter"</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Mime-Version: 1.0</span></p>
<p class="p2" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9); min-height: 20px;">
<span class="s1" style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">--delimiter</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Content-Type: application/sdp</span></p>
<p class="p2" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9); min-height: 20px;">
<span class="s1" style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">v=0</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">o=user1 53655765 2353687637 IN IP4 172.31.87.143</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">s=-</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">c=IN IP4 <span style="color: rgb(47, 255, 18); font-variant-ligatures: no-common-ligatures; background-color: rgba(0, 0, 0, 0.9); display: inline !important;">
1.1.1.1</span></span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">t=0 0</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">m=audio 6000 RTP/AVP 0</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">a=rtpmap:0 PCMU/8000</span></p>
<p class="p2" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9); min-height: 20px;">
<span class="s1" style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">--delimiter</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">Content-Type: application/pidf+xml</span></p>
<p class="p2" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9); min-height: 20px;">
<span class="s1" style="font-variant-ligatures:no-common-ligatures"></span><br>
</p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures"><?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<presence xmlns:xsd=\"http:/ /www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/ XMLSchema-instance\" entity=\"sip:U</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">SER9@SBSBVR00Test0m.ABC.com\" xmlns=\"urn:ietf:params:xml:ns:pidf\">\n<tuple id=\"tuple0\">\n<status>\n<geopriv xmlns=\"urn:ietf:params:xml:ns:pidf:geopriv10\">\n<civicAddre</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">ss xmlns=\"urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr\">\n['<STS>Ave</STS>\\n', '<A1>WA</A1>\\n', '<A3>Redmond</A3>\\n', '<RD>163rd</RD>\\n', '<PC>98052</PC>\\n', '<POD</span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">>NE</POD>\\n', '<NAM>Contoso Corporation </NAM>\\n', '<HNO>3910</HNO>\\n', '<country>US</country>\\n']\n</civicAddress>\n</geopriv>\n</status>\n</tuple>\n</presence></span></p>
<p class="p1" style="margin: 0px; font: 18px "Andale Mono"; color: rgb(47, 255, 18); background-color: rgba(0, 0, 0, 0.9);">
<span class="s1" style="font-variant-ligatures:no-common-ligatures">--delimiter--</span></p>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Adarsh Chauhan</div>
</body>
</html>