[Serusers] Problem with 'replace'

Simon Miles simon at SystemsRM.co.uk
Wed Jan 5 12:09:00 CET 2005


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
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050105/a10fdf7d/attachment.htm>


More information about the sr-users mailing list