How to personalize P-Asserted-Identity message

When a call is answered the caller get an UPDATE sip msg, like this:

P-Asserted-Identity: "called_Name" <sip:9502@10.10.0.173>

where “called_Name” is setted by a lua script:

session:setVariable("called_disp_name", our_variable_called_disp_name);

and the “9502” is the destination extension.
As we are in multi domain configuration, the destination extension is the result of a manipulation of an intial dialed number, that in the origin was preceded by the destination domain prefix, ex: 1339502.
I would like to send the message with the initial number (1339502), but I can’t figure how to do it.
I had a look on the mod_sofia.c sources, I found this function:

case SWITCH_MESSAGE_INDICATE_DISPLAY:
	{
		const char *name = NULL, *number = NULL;
		const char *call_info = NULL;

		....

		name = msg->string_array_arg[0];
		number = msg->string_array_arg[1];
		call_info = switch_channel_get_variable(channel, "presence_call_info_full");
		...

		if (zstr(number)) {
			number = tech_pvt->caller_profile->destination_number;
		}
		...
		snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <sip:%s@%s>", name, number, tech_pvt->profile->sipip);

is it possible to use the instrucion:

number = msg->string_array_arg[1];

to personalize that field? how to do in a lua script?
Or, if I would try to modify the sources, is it possible to retrive a session variable in this function? and how? (I have no experience on freeswitch souces and only a little knowledge of C)