<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">I got the solution for this. Should have used $fn.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Thanks,</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Vivek</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt; overflow-wrap: break-word;">-----Original Message-----<br />From: "vivek@advaitamtech.com" <vivek@advaitamtech.com><br />Sent: Thursday, 14 September, 2017 8:07pm<br />To: sr-users@lists.kamailio.org<br />Subject: Replacing the From header user part.<br /><br /></p>
<div id="SafeStyles1505458696">
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Hi All,</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Am trying to replace the user part of From header with own user name in kamailio.cfg</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">I tried to assign directly,</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Eg: $fU = "abcd"</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Sometime when I receive From header as  ' "12345" <12345@1.1.1.1>;tag=xxxx '. In this case it works as ' "12345" <abcd@1.1.1.1>;tag=xxxx ' .</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">So i tried using replace_all() function. But this ended up adding extra characters(in my case "abcd") infront of content_type header. I dont know why.</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Can someone please help me out in replacing the from header in this case?</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;"> </p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Thanks,</p>
<p style="margin:0;padding:0;margin: 0; padding: 0; font-family: arial; font-size: 10pt; overflow-wrap: break-word;">Vivek</p>
</div></font>