Hi Daniel!
I am trying to understand better how topoh works.
I see it registers callbacks, e.g.:
sr_event_register_cb(SREV_NET_DATA_IN, th_msg_received);
When th_msg_received() is executed, - is the SIP message already parsed?
If yes, why calling th_prepare_msg() and parse the message again?
If no, if parsing in th_prepare_msg() fails, shouldn't the return value
of th_prepare_msg() be evaluated?
regards
Klaus
Daniel-Constantin Mierla schrieb:
Hi Klaus,
On 1/5/10 12:29 AM, Klaus Darilion wrote:
Hi Daniel!
What happens if topoh receives a manipulated request - e.g. if
somebody manipulates the encoded line parameter. Will topoh detect the
manipulation (e.g. is there is checksum encoded too) or will topoh
just decode this parameter into a malformed URI?
What happens if decoding fails - will be message be dropped?
topoh operations are transparent to cfg script -- in the cfg you get the
SIP message decoded, with clear values, so accounting, authorization and
other checks are not affected.
If the SIP message becomes malformed, it is same situation as you would
get a malformed SIP message when not using topoh -- you can use sanity
module to detect and drop/whatsoever.
Cheers,
Daniel