This is how we dealt with 3rd party reg. however this won't cover your requirement for having it in the body.

route[THIRD_PARTY_REG]
{
        xlog("L_INFO", "3rd party REG: $rm -> $td ($mb) \n");

        $uac_req(method) = "REGISTER";
        $uac_req(ruri) = "<sip:" + REG_AS + ">" ;
        $uac_req(furi) = "<sip:" + HOSTNAME + ">" ;
        $uac_req(turi) = $tu;
        $uac_req(ouri) = "<sip:" + REG_AS + ">" ;

        $var(cparams) = "<sip:" + HOSTNAME + ":" + PORT + ">";

        if (@contact.params["+u.asmc.gcm"] != $null) {
                $var(cparams) = $var(cparams) + ";+u.asmc.gcm=" + @contact.params["+u.asmc.gcm"];
        }
        if (@contact.params["+u.asmc.apn"] != $null) {
                $var(cparams) = $var(cparams) + ";+u.asmc.apn=" + @contact.params["+u.asmc.apn"];
        }
        ## also add +sip.instance
        if (@contact.params["+sip.instance"] != $null) {
                $var(dan) = @contact.params["+sip.instance"] ;
                $var(cparams) = $var(cparams) + ";+sip.instance=\"" + $var(dan) + "\"" ;
        }

        $uac_req(hdrs) = "Contact: " + $var(cparams) + ";expires=600\r\n";
        uac_req_send();
        return;
}


On 01/07/2015 09:25 AM, Jyaim Jyaim wrote:
Hello all,

Just to share the solution I use to get the initial register into 3rd party register, I attached the diff file on modified code.
Maybe useful one day to someone ;)

Regards

2014-12-30 15:03 GMT+01:00 Olle E. Johansson <oej@edvina.net>:

On 30 Dec 2014, at 13:58, Jyaim Jyaim <jyaime@gmail.com> wrote:

Hello,

I'm using Kamailio with a SIP Application Server: when a user registers on the IMS Core, Kamailio is configured to send a 3rd Party REGISTER request to the application server.
This 3rd party REGISTER request starts some logic on the AS.

I'm trying to add the initial REGISTER request sent by user device in the 3rd party register request body.

Do you think it is possible to configure Kamailio to get that?
Yes. start looking at the UAC module.

/O

Thank you!

2014-12-30 11:10 GMT+01:00 Olle E. Johansson <oej@edvina.net>:

On 30 Dec 2014, at 10:26, Jyaim Jyaim <jyaime@gmail.com> wrote:

> Hello,
>
> I'm wondering if I can configure Kamailio to get in 3rd party REGISTER request's body the initial REGISTER request received from user ?
>
Sorry, but I don't understand. Who's getting the initial REGISTER and who wants it?
Please explain a bit more.

/O


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


This e-mail and any attachment is for authorised 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.