I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Hi I've seen something like that, where the TCP connection for the Websocket has been closed/reset by the time the MESSAGE request comes (in fact, I looked immediately for websocket in your screenshot when I saw the "No error" text). I'm not sure whether TM or SL sent the response in my case, though (and I don't know what the 2 means yet). Is that possible? Does it happen consistently? What's kamailio.cfg code have you got for sending that request? What other troubleshooting steps have you taken, and what were the results? I would try to find a pattern, because that often leads to the cause and then the solution.
James
On Fri, 20 Mar 2026 at 08:02, zhaobin via sr-users sr-users@lists.kamailio.org wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error? __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
On Wed, 25 Mar 2026 at 11:11, Richard Robson via sr-users sr-users@lists.kamailio.org wrote:
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
I'm not sure about that, because the default script behavior is to do nothing. My understanding is that if there's a transaction, then TM will send a final response if the script does not, but SL won't get involved like that.
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
I agree with this; that's how I always do it: add logs at many places and eventually find the exact line of code that leads to the error (and _then_ figure out why).
James
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
On 25/03/2026 16:56, James Browne wrote:
On Wed, 25 Mar 2026 at 11:11, Richard Robson via sr-users sr-users@lists.kamailio.org wrote:
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
I'm not sure about that, because the default script behavior is to do nothing. My understanding is that if there's a transaction, then TM will send a final response if the script does not, but SL won't get involved like that.
I can't remember the exact scenario, but I have seen this before and IIRC that what was happening, But I could be wrong, Bit it would be a start
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
I agree with this; that's how I always do it: add logs at many places and eventually find the exact line of code that leads to the error (and _then_ figure out why).
Yep, always add logs. I add them with a tag (making grepping easier) and in both logic paths to confirm whish way it went.
Also is there any branching going on?
James
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
TM does not send a reply automatically. It will relay a received failure automatically, but if your config looks like this:
request_route { t_newtran(); exit; }
There will be no reply sent, and Kamailio will log this:
10(16) WARNING: [54a0809b-23b2-4448-8f72-63867c6b0ecf INVITE-154400 <null>] tm [t_lookup.c:2060]: t_unref(): script writer didn't release transaction
In addition to the suggestion of adding more log lines (which is a solid idea, especially if they’re at dbg level), I often find it’s helpful to create as simple an example as possible (like my example above) to check the behavior.
Regards, Kaufman
From: James Browne via sr-users sr-users@lists.kamailio.org Date: Wednesday, March 25, 2026 at 12:00 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: James Browne james@frideo.com Subject: [SR-Users] Re: about sip message
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Wed, 25 Mar 2026 at 11:11, Richard Robson via sr-users sr-users@lists.kamailio.org wrote:
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
I'm not sure about that, because the default script behavior is to do nothing. My understanding is that if there's a transaction, then TM will send a final response if the script does not, but SL won't get involved like that.
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
I agree with this; that's how I always do it: add logs at many places and eventually find the exact line of code that leads to the error (and _then_ figure out why).
James
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Yes, you're right. I tested now and I see it. I don't know why I thought that (I wonder whether it was different in earlier versions of kamailio).
Anyway, at least I was right that SL does not automatically send a reply (and that was the main point in the original message which didn't mention TM (which means I took us off track with that)), so something in the kamailio.cfg code is making that happen. As mentioned, adding logging should track it down.
James
On Thu, 26 Mar 2026 at 14:15, Ben Kaufman bkaufman@bcmone.com wrote:
TM does not send a reply automatically. It will relay a received failure automatically, but if your config looks like this:
request_route { t_newtran(); exit; }
There will be no reply sent, and Kamailio will log this:
10(16) WARNING: [54a0809b-23b2-4448-8f72-63867c6b0ecf INVITE-154400 <null>] tm [t_lookup.c:2060]: t_unref(): script writer didn't release transaction
In addition to the suggestion of adding more log lines (which is a solid idea, especially if they’re at dbg level), I often find it’s helpful to create as simple an example as possible (like my example above) to check the behavior.
Regards, Kaufman
From: James Browne via sr-users sr-users@lists.kamailio.org Date: Wednesday, March 25, 2026 at 12:00 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: James Browne james@frideo.com Subject: [SR-Users] Re: about sip message
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Wed, 25 Mar 2026 at 11:11, Richard Robson via sr-users sr-users@lists.kamailio.org wrote:
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
I'm not sure about that, because the default script behavior is to do nothing. My understanding is that if there's a transaction, then TM will send a final response if the script does not, but SL won't get involved like that.
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
I agree with this; that's how I always do it: add logs at many places and eventually find the exact line of code that leads to the error (and _then_ figure out why).
James
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
I don't know why I thought that (I wonder whether it was different in earlier versions of kamailio).
I don’t think earlier versions worked like that, but I would guess what you’re thinking of is that if you exit a reply route, the reply will be relayed automatically. For example, the reply processed by this would get relayed back upstream:
reply_route { xlog("In reply route\n"); exit; }
Kaufman Senior Voice Engineer
E: bkaufman@bcmone.com 24/7 support: 888.543.2000
[img]
SIP.UShttps://sip.us Client Support: 800.566.9810
SIPTRUNKhttps://siptrunk.com Client Support: 800.250.6510
Flowroutehttps://flowroute.com Client Support: 855.356.9768
From: James Browne james@frideo.com Date: Friday, March 27, 2026 at 11:55 AM To: Ben Kaufman bkaufman@bcmone.com Cc: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] Re: about sip message
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Yes, you're right. I tested now and I see it. I don't know why I thought that (I wonder whether it was different in earlier versions of kamailio).
Anyway, at least I was right that SL does not automatically send a reply (and that was the main point in the original message which didn't mention TM (which means I took us off track with that)), so something in the kamailio.cfg code is making that happen. As mentioned, adding logging should track it down.
James
On Thu, 26 Mar 2026 at 14:15, Ben Kaufman bkaufman@bcmone.com wrote:
TM does not send a reply automatically. It will relay a received failure automatically, but if your config looks like this:
request_route { t_newtran(); exit; }
There will be no reply sent, and Kamailio will log this:
10(16) WARNING: [54a0809b-23b2-4448-8f72-63867c6b0ecf INVITE-154400 <null>] tm [t_lookup.c:2060]: t_unref(): script writer didn't release transaction
In addition to the suggestion of adding more log lines (which is a solid idea, especially if they’re at dbg level), I often find it’s helpful to create as simple an example as possible (like my example above) to check the behavior.
Regards, Kaufman
From: James Browne via sr-users sr-users@lists.kamailio.org Date: Wednesday, March 25, 2026 at 12:00 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: James Browne james@frideo.com Subject: [SR-Users] Re: about sip message
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Wed, 25 Mar 2026 at 11:11, Richard Robson via sr-users sr-users@lists.kamailio.org wrote:
Are you handling the MESSAGE explicitly?
It sounds like you are falling through the script without doing anything and the core is returning 500 No error by the SL module because there is no transaction.
I'm not sure about that, because the default script behavior is to do nothing. My understanding is that if there's a transaction, then TM will send a final response if the script does not, but SL won't get involved like that.
the best way to find out what is occurring it follow the logs or manually step through the script and seeing what the logic will do with a MESSAGE method.
I agree with this; that's how I always do it: add logs at many places and eventually find the exact line of code that leads to the error (and _then_ figure out why).
James
Regards,
Richard
On 19/03/2026 10:21, zhaobin via sr-users wrote:
I try send sip message from freeswitch to webrtc sip client,then kamailio send back 500 error.
I have some question about this: 1:image show kamailio sl module send this error.Why sip message is trans by sl module,not tm module? 2:about error show (2/SL),i know SL is sl module,and 2 is what? 3:so i must get debug log to get more infomations about this error?
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!