<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
This is how we dealt with 3rd party reg. however this won't cover your requirement for having it in the body.
<br>
<br>
route[THIRD_PARTY_REG]<br>
{<br>
        xlog("L_INFO", "3rd party REG: $rm -> $td ($mb) \n"); <br>
<br>
        $uac_req(method) = "REGISTER";<br>
        $uac_req(ruri) = "<sip:" + REG_AS + ">" ;<br>
        $uac_req(furi) = "<sip:" + HOSTNAME + ">" ;<br>
        $uac_req(turi) = $tu;<br>
        $uac_req(ouri) = "<sip:" + REG_AS + ">" ;<br>
<br>
        $var(cparams) = "<sip:" + HOSTNAME + ":" + PORT + ">";<br>
<br>
        if (@contact.params["+u.asmc.gcm"] != $null) {<br>
                $var(cparams) = $var(cparams) + ";+u.asmc.gcm=" + @contact.params["+u.asmc.gcm"];<br>
        }<br>
        if (@contact.params["+u.asmc.apn"] != $null) {<br>
                $var(cparams) = $var(cparams) + ";+u.asmc.apn=" + @contact.params["+u.asmc.apn"];<br>
        }<br>
        ## also add +sip.instance<br>
        if (@contact.params["+sip.instance"] != $null) {<br>
                $var(dan) = @contact.params["+sip.instance"] ; <br>
                $var(cparams) = $var(cparams) + ";+sip.instance=\"" + $var(dan) + "\"" ;
<br>
        }<br>
<br>
        $uac_req(hdrs) = "Contact: " + $var(cparams) + ";expires=600\r\n";<br>
        uac_req_send();<br>
        return;<br>
}<br>
<br>
<br>
<div class="moz-cite-prefix">On 01/07/2015 09:25 AM, Jyaim Jyaim wrote:<br>
</div>
<blockquote cite="mid:CABXuBSgG+Z_aHLJmEahZoqHt9Z59-cqKDFWbCFsmaRBjs6y1Ew@mail.gmail.com" type="cite">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>Just to share the solution I use to get the initial register into 3rd party register, I attached the diff file on modified code.</div>
<div>Maybe useful one day to someone ;)</div>
<div><br>
</div>
<div>Regards</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2014-12-30 15:03 GMT+01:00 Olle E. Johansson <span dir="ltr">
<<a moz-do-not-send="true" href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br>
<div><span class="">
<div>On 30 Dec 2014, at 13:58, Jyaim Jyaim <<a moz-do-not-send="true" href="mailto:jyaime@gmail.com" target="_blank">jyaime@gmail.com</a>> wrote:</div>
<br>
</span>
<blockquote type="cite">
<div dir="ltr"><span style="font-size:13px">Hello,</span><br style="font-size:13px">
<br style="font-size:13px">
<span class=""><span style="font-size:13px">I'm using Kamailio with a SIP Application Server: when a user </span><span style="font-size:13px;background-color:rgb(255,255,255)">registers</span><span style="font-size:13px"> on the IMS Core, </span><span style="color:rgb(80,0,80);font-size:13px">Kamailio </span><span style="font-size:13px">is
 configured to send a 3rd Party </span><span style="font-size:13px;background-color:rgb(255,255,255)">REGISTER</span><span style="font-size:13px"> request to the </span><span style="font-size:13px">application server.</span>
<div><span style="font-size:13px">This 3rd party REGISTER request starts some logic on the AS.</span><br>
</div>
<div><span style="font-size:13px"><br>
</span></div>
<div><span style="font-size:13px">I'm trying to add </span><span style="font-size:13px">the initial </span><span style="font-size:13px">REGISTER</span><span style="font-size:13px"> request sent by user device </span><span style="font-size:13px">in the 3rd party </span><span style="font-size:13px">register</span><span style="font-size:13px"> request
 body.</span></div>
<div><br style="font-size:13px">
<span style="font-size:13px">Do you think it is possible to configure Kamailio to get that?</span><br style="font-size:13px">
</div>
</span></div>
</blockquote>
Yes. start looking at the UAC module.</div>
<span class="HOEnZb"><font color="#888888">
<div><br>
</div>
</font></span>
<div><span class="HOEnZb"><font color="#888888">/O</font></span><span class=""><br>
<blockquote type="cite">
<div dir="ltr">
<div><br style="font-size:13px">
<span style="font-size:13px">Thank you!</span><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2014-12-30 11:10 GMT+01:00 Olle E. Johansson <span dir="ltr">
<<a moz-do-not-send="true" href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
<span><br>
On 30 Dec 2014, at 10:26, Jyaim Jyaim <<a moz-do-not-send="true" href="mailto:jyaime@gmail.com" target="_blank">jyaime@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I'm wondering if I can configure Kamailio to get in 3rd party REGISTER request's body the initial REGISTER request received from user ?<br>
><br>
</span>Sorry, but I don't understand. Who's getting the initial REGISTER and who wants it?<br>
Please explain a bit more.<br>
<br>
/O<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</span></div>
<br>
</div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<hr>
<p class="MsoNormal"><span style="font-size:7.5pt;line-height:115%;font-family:
"Arial","sans-serif";mso-fareast-font-family:"Times New Roman";color:gray">This e-mail and any attachment
<span class="GramE">is</span> for <span class="SpellE">authorised</span> use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained
 or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.</span></p>
</body>
</html>