I am trying to manipulate the 'from' header to add a leading zero - our PSTN gateway does not send it over in the from header for CLI.
 
If I use the replace function - replace ( "From:.*<sip:", "From: <sip:0"), then this is OK for the subsequent messages that are forwarded, but not for the current message that is in memory and this is the one that is being put into the database for accounting.
 
Looking at the source it looks like the replace function is effecting the main buffer, but if the from header has already been read then I can manipulate it ! !
 
Am I right in this thinking. Is there a way around it other then writing my own module ? I'm currently running the ser from the development CVS
 
Thanks
 
Simon