Hello,
I'm adding some additional SIP headers to the INVITE received, but when I use the siptrace module to duplicate the messages to a capture server, the INVITE does not contain the additional headers. I'm using a softphone to test my configuration, and it looks like Kamailio only sends the INVITE which is coming from the softphone to the capture server. When Kamailio relays the INVITE to its destination the headers are present.
Is there a way to duplicate the invite leaving kamailio to the capture server instead of the INVITE which is coming into kamailio? I already tried to put the sip_trace() function after the message is sent to its destination, but the extra headers didn't show up in the database. Note, that I'm using the "X-" as a prefix.
Regards,
Grant
Grant,
Have you tried msg_apply_changes() after the header append to see if that helps?
Grant Bagdasarian GB@cm.nl wrote:
Hello,
I'm adding some additional SIP headers to the INVITE received, but when I use the siptrace module to duplicate the messages to a capture server, the INVITE does not contain the additional headers. I'm using a softphone to test my configuration, and it looks like Kamailio only sends the INVITE which is coming from the softphone to the capture server. When Kamailio relays the INVITE to its destination the headers are present.
Is there a way to duplicate the invite leaving kamailio to the capture server instead of the INVITE which is coming into kamailio? I already tried to put the sip_trace() function after the message is sent to its destination, but the extra headers didn't show up in the database. Note, that I'm using the "X-" as a prefix.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
I just tried it and it did the trick. Thanks!
I was also looking at the documentation of the siptrace module and found this: by setting the flag equal with the value of 'trace_flag' (e.g., setflag(__trace_flag__)) parameter of the module. In this case, the message sent forward is processed. The logging mechanism is based on TM/SL callbacks, so only messages processed with TM/SL are logged I configured it like this: modparam("siptrace", "trace_flag", 22)
Then in the route block I did this: setflag(“22”), but that gave me an error. 0(3447) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 395, column 14: flag not declared
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 3:52 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
Grant,
Have you tried msg_apply_changes() after the header append to see if that helps?
Grant Bagdasarian <GB@cm.nlmailto:GB@cm.nl> wrote: Hello,
I’m adding some additional SIP headers to the INVITE received, but when I use the siptrace module to duplicate the messages to a capture server, the INVITE does not contain the additional headers. I’m using a softphone to test my configuration, and it looks like Kamailio only sends the INVITE which is coming from the softphone to the capture server. When Kamailio relays the INVITE to its destination the headers are present.
Is there a way to duplicate the invite leaving kamailio to the capture server instead of the INVITE which is coming into kamailio? I already tried to put the sip_trace() function after the message is sent to its destination, but the extra headers didn’t show up in the database. Note, that I’m using the “X-“ as a prefix.
Regards,
Grant
________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
Try: setflag(22);
Grant Bagdasarian GB@cm.nl wrote:
I just tried it and it did the trick. Thanks!
I was also looking at the documentation of the siptrace module and found this: by setting the flag equal with the value of 'trace_flag' (e.g., setflag(__trace_flag__)) parameter of the module. In this case, the message sent forward is processed. The logging mechanism is based on TM/SL callbacks, so only messages processed with TM/SL are logged I configured it like this: modparam("siptrace", "trace_flag", 22)
Then in the route block I did this: setflag(“22”), but that gave me an error. 0(3447) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 395, column 14: flag not declared
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 3:52 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
Grant,
Have you tried msg_apply_changes() after the header append to see if that helps?
Grant Bagdasarian <GB@cm.nlmailto:GB@cm.nl> wrote: Hello,
I’m adding some additional SIP headers to the INVITE received, but when I use the siptrace module to duplicate the messages to a capture server, the INVITE does not contain the additional headers. I’m using a softphone to test my configuration, and it looks like Kamailio only sends the INVITE which is coming from the softphone to the capture server. When Kamailio relays the INVITE to its destination the headers are present.
Is there a way to duplicate the invite leaving kamailio to the capture server instead of the INVITE which is coming into kamailio? I already tried to put the sip_trace() function after the message is sent to its destination, but the extra headers didn’t show up in the database. Note, that I’m using the “X-“ as a prefix.
Regards,
Grant
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
That does it also. Thanks!
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 4:02 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
Try: setflag(22); Grant Bagdasarian <GB@cm.nlmailto:GB@cm.nl> wrote: I just tried it and it did the trick. Thanks!
I was also looking at the documentation of the siptrace module and found this: by setting the flag equal with the value of 'trace_flag' (e.g., setflag(__trace_flag__)) parameter of the module. In this case, the message sent forward is processed. The logging mechanism is based on TM/SL callbacks, so only messages processed with TM/SL are logged I configured it like this: modparam("siptrace", "trace_flag", 22)
Then in the route block I did this: setflag(“22”), but that gave me an error. 0(3447) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 395, column 14: flag not declared
From: sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 3:52 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
Grant,
Have you tried msg_apply_changes() after the header append to see if that helps? Grant Bagdasarian <GB@cm.nlmailto:GB@cm.nl> wrote: Hello,
I’m adding some additional SIP headers to the INVITE received, but when I use the siptrace module to duplicate the messages to a capture server, the INVITE does not contain the additional headers. I’m using a softphone to test my configuration, and it looks like Kamailio only sends the INVITE which is coming from the softphone to the capture server. When Kamailio relays the INVITE to its destination the headers are present.
Is there a way to duplicate the invite leaving kamailio to the capture server instead of the INVITE which is coming into kamailio? I already tried to put the sip_trace() function after the message is sent to its destination, but the extra headers didn’t show up in the database. Note, that I’m using the “X-“ as a prefix.
Regards,
Grant
________________________________
SIP Express Router (SER) and Kamailio
(OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
________________________________
SIP Express Router (SER) and Kamailio
(OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com
On 08/09/2013 10:11 AM, Grant Bagdasarian wrote:
That does it also. Thanks!
Sure thing. Bear in mind that Kamailio is wildly inconsistent about when it requires a numerical parameter (e.g. a flag) as a string literal (in double quotes) vs. a numerical literal.
Generally speaking, module functions want numerical values in quotes:
ds_select_domain("1", "4"); t_relay("0x01");
while core functions expect numerical values straight up:
strip(4); setflag(22);
This has to do with the way arguments are passed and validated by modules.
However, it's not a hard and fast rule, and there may be exceptions.
-- Alex
Good to know. I'll keep that in mind. Thanks.
Grant
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 4:14 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
On 08/09/2013 10:11 AM, Grant Bagdasarian wrote:
That does it also. Thanks!
Sure thing. Bear in mind that Kamailio is wildly inconsistent about when it requires a numerical parameter (e.g. a flag) as a string literal (in double quotes) vs. a numerical literal.
Generally speaking, module functions want numerical values in quotes:
ds_select_domain("1", "4"); t_relay("0x01");
while core functions expect numerical values straight up:
strip(4); setflag(22);
This has to do with the way arguments are passed and validated by modules.
However, it's not a hard and fast rule, and there may be exceptions.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
Is it possible to only duplicate certain messages to the capture server? Like only the INVITE, CANCEL, BYE, 100, 200 and some 4/5/6 reply messages? Whenever I set the setflag(22) it pretty much duplicates every message to the capture server, but I want to regulate which messages are duplicated. I'm adding additional headers to specific SIP messages, but not all. msg_apply_changes only works for request messages, so I'm pretty much forced to use the setflag command.
The reason I'm doing all this is because I'm building custom logging based on SIP messages. That way we can have real-time status of calls with additional information. Pretty much every SIP dialog is a conversation in our database. Its state gets updated for each new SIP message. This does require the proxy to set certain custom headers.
Also, how are relpy messages processed? I know they go through the onreply_route route, but there is no command which relays this to its destination, or is this done by the core behind the scenes?
Regards,
Grant
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Grant Bagdasarian Sent: Friday, August 9, 2013 4:19 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
Good to know. I'll keep that in mind. Thanks.
Grant
-----Original Message----- From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Friday, August 9, 2013 4:14 PM To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Duplicate relayed INVITE message using siptrace not working
On 08/09/2013 10:11 AM, Grant Bagdasarian wrote:
That does it also. Thanks!
Sure thing. Bear in mind that Kamailio is wildly inconsistent about when it requires a numerical parameter (e.g. a flag) as a string literal (in double quotes) vs. a numerical literal.
Generally speaking, module functions want numerical values in quotes:
ds_select_domain("1", "4"); t_relay("0x01");
while core functions expect numerical values straight up:
strip(4); setflag(22);
This has to do with the way arguments are passed and validated by modules.
However, it's not a hard and fast rule, and there may be exceptions.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users