Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I noticed that inserting \n OR \r\n at the end of call reason in send_reply_code causes the stack to suffix the callid with \r\n.
This causes previous nodes to NO LONGER recognize the callid and NOT relay the reply back to the requesting party.
This is the snippet:
sl_send_reply("502", "Bad Gateway, Not Registered Here\n");
change the original callid Call-ID: kerwtzwwrhxanwb@oneiric to become
Call-ID: kerwtzwwrhxanwb@oneiric\r\n in the reply
Question 1: Now I realise that \r\n might be incorrect anyway (is that so?) but it should not impact the callid in the response, or is that expected behavior?
Question 2: when is insertion of \r\n applicable anyway in headers?
1) the second param of sl_send_reply() contains only the string, without any other terminator.
2) depends on the function - like when append/inserting a header, it is required to have also the EOH.