<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Found it. record_route bit me. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ERROR: <core> [core/msg_translator.c:3355]: sip_msg_apply_changes(): cannot apply msg changes after adding record-route header - it breaks conditional 2nd header<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Assuming not but thought I’d ask, any way to access a header before its added to the message?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Future request, that secsipid_add_identity() returns the auto generated uuid for origid.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Daniel Graham <dan@cmsinter.net><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br>
<b>Date: </b>Friday, July 2, 2021 at 1:54 PM<br>
<b>To: </b>"miconda@gmail.com" <miconda@gmail.com><br>
<b>Cc: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">I checked twice but nothing. I will test again in case I am missing something, I found it odd too that its failing but no error in debug.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I tried adding another header and msg_apply_changes() before the call to secsipid_add_identity(), and that doesnt show up in $mb or accessible by $hdr() either.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Daniel W. Graham, CTO<o:p></o:p></p>
<p class="MsoNormal">CMSInter.net LLC<o:p></o:p></p>
<p class="MsoNormal">DIRECT (989) 400-4230<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">"miconda@gmail.com" <miconda@gmail.com><br>
<b>Reply-To: </b>"miconda@gmail.com" <miconda@gmail.com><br>
<b>Date: </b>Friday, July 2, 2021 at 1:46 PM<br>
<b>To: </b>Daniel Graham <dan@cmsinter.net><br>
<b>Cc: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p>If msg_apply_changes() fails, then there has to be other error messages in the logs. Don't you see any?<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 02.07.21 18:18, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Sorry. msg_apply_changes() was in config and I didn’t see the execution in debug.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I just changed to this and receive “Failed to apply changes”.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> if (!msg_apply_changes()) {<o:p></o:p></p>
<p class="MsoNormal"> xlogl("L_WARN", "Failed to apply changes\n");<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a>
<a href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Reply-To: </b><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a> <a href="mailto:miconda@gmail.com">
<miconda@gmail.com></a><br>
<b>Date: </b>Friday, July 2, 2021 at 9:24 AM<br>
<b>To: </b>Daniel Graham <a href="mailto:dan@cmsinter.net"><dan@cmsinter.net></a><br>
<b>Cc: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p>What do you mean? Do you have msg_apply_changes() in the config, it is executed but has no effect?<o:p></o:p></p>
<p>Or you don't have msg_apply_changes() in the config and thus not executed?<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 02.07.21 15:10, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Its not being executed. Version 5.5 <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:13.0pt">Daniel W. Graham, CTO</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">CMS Internet LLC<o:p></o:p></p>
<div>
<p class="MsoNormal">DIRECT (989) 400-4230<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">On Jul 2, 2021, at 3:12 AM, Daniel-Constantin Mierla
<a href="mailto:miconda@gmail.com"><miconda@gmail.com></a> wrote:<o:p></o:p></p>
</blockquote>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p>Can you doublecheck msg_apply_changes() is executed?<o:p></o:p></p>
<p>What version are you using?<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 02.07.21 08:58, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">I don’t see any issues in the log.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">The identity header is being sent but still nothing in $mb<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Daniel W. Graham, CTO<o:p></o:p></p>
<p class="MsoNormal">CMSInter.net LLC<o:p></o:p></p>
<p class="MsoNormal">DIRECT (989) 400-4230<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a>
<a href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Reply-To: </b><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a> <a href="mailto:miconda@gmail.com">
<miconda@gmail.com></a><br>
<b>Date: </b>Friday, July 2, 2021 at 2:41 AM<br>
<b>To: </b>Daniel Graham <a href="mailto:dan@cmsinter.net"><dan@cmsinter.net></a>, "Kamailio (SER) - Users Mailing List"
<a href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p>Then secsipid_add_identity() or msg_apply_changes() failed -- do you get error messages? Try to run with debug=3 for seeing more details in the logs.<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 02.07.21 08:19, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Identity is not in $mb.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Daniel W. Graham, CTO<o:p></o:p></p>
<p class="MsoNormal">CMSInter.net LLC<o:p></o:p></p>
<p class="MsoNormal">DIRECT (989) 400-4230<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a>
<a href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Reply-To: </b><a href="mailto:miconda@gmail.com">"miconda@gmail.com"</a> <a href="mailto:miconda@gmail.com">
<miconda@gmail.com></a><br>
<b>Date: </b>Friday, July 2, 2021 at 2:09 AM<br>
<b>To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a>, Daniel Graham <a href="mailto:dan@cmsinter.net">
<dan@cmsinter.net></a><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p>Hello,<o:p></o:p></p>
<p>try to print $mb after secsipid_add_identity() and msg_apply_changes(), is the Identity header there?<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 02.07.21 07:53, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">I need to immediately get the uuid created by secsipid_add_identity().<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Is there a way to immediately read a header after its added?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I tried msg_apply_changes() but $hdr(Identity) is null.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">sr-users
<a href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf of Daniel Graham
<a href="mailto:dan@cmsinter.net"><dan@cmsinter.net></a><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Date: </b>Thursday, July 1, 2021 at 6:11 PM<br>
<b>To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal">Confirmed it was due to the sngrep copy. Thanks for mentioning it!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">sr-users
<a href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf of Ben Kaufman
<a href="mailto:bkaufman@nexvortex.com"><bkaufman@nexvortex.com></a><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Date: </b>Thursday, July 1, 2021 at 12:49 PM<br>
<b>To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal">Dump the header to your log file, and copy it from there. I don’t know what happens with the ncurses in sngrep, but I finally looked them side by side and …. “Hey! This one’s missing bytes!”<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">Ben Kaufman</span></b><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><i><span style="font-size:10.0pt;color:black">Sr. VoIP Engineer</span></i><o:p></o:p></p>
</td>
</tr>
<tr style="height:12.0pt">
<td style="padding:0in 0in 0in 0in;height:12.0pt"></td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">P: </span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">E: <a href="mailto:bkaufman@nexvortex.com">
bkaufman@nexvortex.com</a></span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">24 hour client support:
<a href="tel:+18556396300">855.639.6300</a></span><o:p></o:p></p>
</td>
</tr>
<tr style="height:6.0pt">
<td style="padding:0in 0in 0in 0in;height:6.0pt"></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="color:black"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> sr-users <a href="mailto:sr-users-bounces@lists.kamailio.org">
<sr-users-bounces@lists.kamailio.org></a> <b>On Behalf Of </b>Daniel W. Graham<br>
<b>Sent:</b> Thursday, July 1, 2021 10:25 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <a href="mailto:sr-users@lists.kamailio.org">
<sr-users@lists.kamailio.org></a><br>
<b>Subject:</b> Re: [SR-Users] SECSIPID Identity Decode<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Haha, yep :) I wondered if that was biting me. <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">On Jul 1, 2021, at 11:07 AM, Ben Kaufman <<a href="mailto:bkaufman@nexvortex.com">bkaufman@nexvortex.com</a>> wrote:<o:p></o:p></p>
</blockquote>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">I observed a similar behavior, but it was the result of my cutting and pasting the identity header from sngrep, which looks to have dropped a few bytes on the line break. Any chance that’s what you’re doing, too?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">Ben Kaufman</span></b><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><i><span style="font-size:10.0pt;color:black">Sr. VoIP Engineer</span></i><o:p></o:p></p>
</td>
</tr>
<tr style="height:12.0pt">
<td style="padding:0in 0in 0in 0in;height:12.0pt"></td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">P: </span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">E: <a href="mailto:bkaufman@nexvortex.com">
bkaufman@nexvortex.com</a></span><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">24 hour client support:
<a href="tel:+18556396300">855.639.6300</a></span><o:p></o:p></p>
</td>
</tr>
<tr style="height:6.0pt">
<td style="padding:0in 0in 0in 0in;height:6.0pt"></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="color:black"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Daniel W. Graham<br>
<b>Sent:</b> Wednesday, June 30, 2021 10:31 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>>; David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>>; Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>><br>
<b>Subject:</b> Re: [SR-Users] SECSIPID Identity Decode<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Here is an example, payload taken from Identity header.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Identity was added with secsipid_add_identity<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Payload test:<o:p></o:p></p>
<p class="MsoNormal">$var(test) = "eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6I5ODkyODkyMjgwIl19LCJpYXQiOjE2MjUxMDk2MzQsIm9yaWciOnsidG4iOiI5ODk0MDA0MjMwIn0sIm9yaWdpZCI6IjNmYmE4NTg0LTRkNzMtNGU2NC04NDc5LTQ5MjU2ZGIyMWFhYSJ9";<o:p></o:p></p>
<p class="MsoNormal">xlogl("L_WARN", "$(var(test){s.decode.base64t})\n");<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Result is:<o:p></o:p></p>
<p class="MsoNormal">{"attest":"A","dest":{"tn":#<span style="font-family:"Tahoma",sans-serif">���</span>#<span style="font-family:"Tahoma",sans-serif">��</span>##<span style="font-family:"Tahoma",sans-serif">�</span>#002%<span style="font-family:"Tahoma",sans-serif">���</span>&<span style="font-family:"Tahoma",sans-serif">�</span>#027B#<span style="font-family:"Tahoma",sans-serif">�</span>#023c#S#023#003<span style="font-family:"Tahoma",sans-serif">�</span>#023sB<span style="font-family:"Tahoma",sans-serif">�</span>&<span style="font-family:"Tahoma",sans-serif">�</span>&<span style="font-family:"Tahoma",sans-serif">�</span>r#<span style="font-family:"Tahoma",sans-serif">��</span>'F<span style="font-family:"Tahoma",sans-serif">�</span>#<span style="font-family:"Tahoma",sans-serif">�</span>#<span style="font-family:"Tahoma",sans-serif">���</span>C#003#003C#3#002'<span style="font-family:"Tahoma",sans-serif">��</span>&<span style="font-family:"Tahoma",sans-serif">�</span>&<span style="font-family:"Tahoma",sans-serif">�</span>v<span style="font-family:"Tahoma",sans-serif">�</span>B#<span style="font-family:"Tahoma",sans-serif">�</span>Vc<span style="font-family:"Tahoma",sans-serif">�</span>s#006f"<span style="font-family:"Tahoma",sans-serif">�</span>&6#026#022<span style="font-family:"Tahoma",sans-serif">�</span>CVCB<span style="font-family:"Tahoma",sans-serif">�</span>#023c3#022<span style="font-family:"Tahoma",sans-serif">�</span>3#0066#<span style="font-family:"Tahoma",sans-serif">�</span>#026#6#026S<span style="font-family:"Tahoma",sans-serif">�</span>r'<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">-dan<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org">sr-users-bounces@lists.kamailio.org</a>> on behalf of Daniel Graham
<<a href="mailto:dan@cmsinter.net">dan@cmsinter.net</a>><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br>
<b>Date: </b>Wednesday, June 30, 2021 at 5:32 PM<br>
<b>To: </b>David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>>, "<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>" <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>, "Kamailio (SER) - Users Mailing
List" <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal">That’s the same way I am doing it, I was just trying to do a verification that the identity header/payload was correct before activating new changes.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I will do further testing and share results. Just found it odd that the header would decode but payload wouldn’t.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Daniel W. Graham, CTO<o:p></o:p></p>
<p class="MsoNormal">CMSInter.net LLC<o:p></o:p></p>
<p class="MsoNormal">DIRECT (989) 400-4230<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>><br>
<b>Date: </b>Wednesday, June 30, 2021 at 4:06 PM<br>
<b>To: </b>"<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>" <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>, "Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br>
<b>Cc: </b>Daniel Graham <<a href="mailto:dan@cmsinter.net">dan@cmsinter.net</a>><br>
<b>Subject: </b>Re: [SR-Users] SECSIPID Identity Decode</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I DO IT WITH: <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"># Break JWT<br>
$var(jwt1) = $(hdr(Identity){s.select,0,.}{s.decode.base64t});<br>
$var(jwt2) = $(hdr(Identity){s.select,1,.}{s.decode.base64t});<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal">David Villasmil <o:p></o:p></p>
<div>
<p class="MsoNormal">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">
david.villasmil.work@gmail.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">phone: +34669448337<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Jun 30, 2021 at 8:48 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p>Hello,<o:p></o:p></p>
<p>not familiar with python functions, have you tried with Kamailio transformation?<o:p></o:p></p>
<p><a href="https://www.kamailio.org/wiki/cookbooks/5.5.x/transformations#sdecodebase64url" target="_blank">https://www.kamailio.org/wiki/cookbooks/5.5.x/transformations#sdecodebase64url</a><o:p></o:p></p>
<p>Maybe you have to specify in Python that it is ASCII, I remember I had to do decoding when porting kamcli to work with Python3 -- had to change from using directly the variables received as parameter to a decoded value, something like:<o:p></o:p></p>
<p>prefix = tprefix.encode("ascii", "ignore").decode()<o:p></o:p></p>
<p>Also, if you can, share the identity header here to test with and see if can be reproduced.<o:p></o:p></p>
<p>Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 30.06.21 21:14, Daniel W. Graham wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am unable to base64url decode the json payload in identity header generated by secsipid.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(Using python for test)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">decoded_payload = url64.decode(‘payload’)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 27: invalid continuation byte<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Header decodes fine this way but not payload.
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is this an issue with the payload encoding?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kamailio 5.5<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Daniel W. Graham, CTO<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">CMSInter.net LLC<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">DIRECT (989) 400-4230<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">INTERNET | TELEPHONE | MANAGED IT<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>__________________________________________________________<o:p></o:p></pre>
<pre>Kamailio - Users Mailing List - Non Commercial Discussions<o:p></o:p></pre>
<pre> * <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
<pre>Important: keep the mailing list in the recipients, do not reply only to the sender!<o:p></o:p></pre>
<pre>Edit mailing list options or unsubscribe:<o:p></o:p></pre>
<pre> * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
<p class="MsoNormal">__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal">__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
* <a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
* <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>__________________________________________________________<o:p></o:p></pre>
<pre>Kamailio - Users Mailing List - Non Commercial Discussions<o:p></o:p></pre>
<pre> * <a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
<pre>Important: keep the mailing list in the recipients, do not reply only to the sender!<o:p></o:p></pre>
<pre>Edit mailing list options or unsubscribe:<o:p></o:p></pre>
<pre> * <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</body>
</html>