On 05/02/16 09:16, smititelu wrote:
On 21.12.2015 10:48, Daniel-Constantin Mierla wrote:
Hello,

in failure route the sip message is cloned in shared memory, with many references to shared memory buffer, as well as shorter size (just to fit the sip message) of the buffer storing the message (the core used a private memory buffer to max capacity configured for message size).

I'm not sure where to I start working on this. Can you give some tips on the places/functions to look on and try to extend for failure routes?

First to look at is how the transaction structure is created -- see t_newtran() as a starting point. Updating the content of the sip request requires to do changes in the 'uas' structure of the transaction.

It may simplify by allocating more than the message buffer for the clone in shared memory for transaction and then be sure that updated request doesn't exceed the allocated buffer. Still, some other fields need to be updated as well, as they point to the values inside the previous sip message content.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com
http://miconda.eu