<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Its not being executed. Version 5.5
<div><br>
<div dir="ltr">
<div><span style="font-size: 13pt;">Daniel W. Graham, CTO</span></div>
<div>CMS Internet LLC<br>
<div>DIRECT (989) 400-4230</div>
</div>
<div><br>
</div>
<div>INTERNET | TELEPHONE | MANAGED IT</div>
</div>
<div dir="ltr"><br>
<blockquote type="cite">On Jul 2, 2021, at 3:12 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<p>Can you doublecheck msg_apply_changes() is executed?</p>
<p>What version are you using?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 02.07.21 08:58, Daniel W. Graham wrote:<br>
</div>
<blockquote type="cite" cite="mid:D49EE2BB-D716-4354-BD34-F76E601F0665@exchange.intra.cmsinter.net">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@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;}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;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<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 class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com">"miconda@gmail.com"</a>
<a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Reply-To: </b><a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com">"miconda@gmail.com"</a>
<a class="moz-txt-link-rfc2396E" 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 class="moz-txt-link-rfc2396E" href="mailto:dan@cmsinter.net">
<dan@cmsinter.net></a>, "Kamailio (SER) - Users Mailing List" <a class="moz-txt-link-rfc2396E" 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></span></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" moz-do-not-send="true">"miconda@gmail.com"</a>
<a href="mailto:miconda@gmail.com" moz-do-not-send="true"><miconda@gmail.com></a><br>
<b>Reply-To: </b><a href="mailto:miconda@gmail.com" moz-do-not-send="true">"miconda@gmail.com"</a>
<a href="mailto:miconda@gmail.com" moz-do-not-send="true"><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" moz-do-not-send="true">
<sr-users@lists.kamailio.org></a>, Daniel Graham <a href="mailto:dan@cmsinter.net" moz-do-not-send="true">
<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" moz-do-not-send="true"><sr-users-bounces@lists.kamailio.org></a> on behalf of Daniel Graham
<a href="mailto:dan@cmsinter.net" moz-do-not-send="true"><dan@cmsinter.net></a><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">
<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" moz-do-not-send="true">
<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" moz-do-not-send="true"><sr-users-bounces@lists.kamailio.org></a> on behalf of Ben Kaufman
<a href="mailto:bkaufman@nexvortex.com" moz-do-not-send="true"><bkaufman@nexvortex.com></a><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">
<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" moz-do-not-send="true">
<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" style="border-collapse:collapse" cellspacing="0" cellpadding="0" border="0">
<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"><br>
</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" moz-do-not-send="true">
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" moz-do-not-send="true">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"><br>
</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" moz-do-not-send="true">
<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" moz-do-not-send="true">
<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>
<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" moz-do-not-send="true">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" style="border-collapse:collapse" cellspacing="0" cellpadding="0" border="0">
<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">
<br>
</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" moz-do-not-send="true">
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" moz-do-not-send="true">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"><br>
</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" moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a>>; David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" moz-do-not-send="true">david.villasmil.work@gmail.com</a>>;
Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" moz-do-not-send="true">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" moz-do-not-send="true">sr-users-bounces@lists.kamailio.org</a>> on
behalf of Daniel Graham <<a href="mailto:dan@cmsinter.net" moz-do-not-send="true">dan@cmsinter.net</a>><br>
<b>Reply-To: </b>"Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">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" moz-do-not-send="true">david.villasmil.work@gmail.com</a>>, "<a href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>" <<a href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>,
"Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">miconda@gmail.com</a>" <<a href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>, "Kamailio (SER) - Users Mailing List" <<a href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>><br>
<b>Cc: </b>Daniel Graham <<a href="mailto:dan@cmsinter.net" moz-do-not-send="true">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" moz-do-not-send="true">
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" moz-do-not-send="true">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" moz-do-not-send="true">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>
<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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">
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" moz-do-not-send="true">
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" moz-do-not-send="true">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" moz-do-not-send="true">
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>
<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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a><o:p></o:p></pre>
<pre><a href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</div>
</blockquote>
</div>
</body>
</html>