<html xmlns:v="urn:schemas-microsoft-com:vml" 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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.gmailsignatureprefix
        {mso-style-name:gmail_signature_prefix;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I found a clue as to why the second leg is not returning a local or remote address:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[2023-07-06 11:40:35] WARNING[253072]: pjsip/dialplan_functions.c:903 channel_read_pjsip: No transport information for channel PJSIP/222-0000007d<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[2023-07-06 11:40:35] WARNING[935126]: func_channel.c:527 func_channel_read: Unknown or unavailable item requested: 'pjsip,local_addr'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[2023-07-06 11:40:35] WARNING[40100]: pjsip/dialplan_functions.c:917 channel_read_pjsip: No transport information for channel PJSIP/222-0000007d<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>[2023-07-06 11:40:35] WARNING[935126]: func_channel.c:527 func_channel_read: Unknown or unavailable item requested: 'pjsip,remote_addr'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Well…maybe not a root cause but certainly something of interest.  This works with the first leg, but not the second leg of the call.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> asterisk-users [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Joshua C. Colp<br><b>Sent:</b> Wednesday, July 5, 2023 12:02 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br><b>Subject:</b> Re: [asterisk-users] Getvar of CHANNEL not working for a couple of items<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Jul 5, 2023 at 12:50 PM TTT <<a href="mailto:lists@telium.io" target="_blank">lists@telium.io</a>> wrote:<o:p></o:p></p></div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><div><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><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'>  Channel A: "1688509741.112" , name:  "PJSIP/111-00000064" , is originator:  Y , call-Id:  "<a href="mailto:u.l6kcou25cax60@mydomain.com" target="_blank">u.l6kcou25cax60@mydomain.com</a>" , local_uri:  "<<a href="mailto:sip%3A222@mydomain.com" target="_blank">sip:222@mydomain.com</a>;user=phone>" , local_tag:  "1734d973-c4da-4ae8-a37d-5f7065f1fe54" , local_addr:  "<a href="http://172.31.253.4:5060" target="_blank">172.31.253.4:5060</a>" , remote_uri:  "\\\"TestPhone x111\\\" <<a href="mailto:sip%3A111@mydomain.com" target="_blank">sip:111@mydomain.com</a>>" , remote_tag:  "yinue4v5ufa4" , remote_addr:  "<a href="http://172.31.253.20:5060" target="_blank">172.31.253.20:5060</a>"</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'>  Channel B: "1688509741.113" , name:  "PJSIP/222-00000065" , is originator:  N , call-Id:  "1f104544-fc1a-4414-ba74-68c526e294de" , local_uri:  "\\\"TestPhone\\\" <<a href="mailto:sip%3A111@172.31.253.4" target="_blank">sip:111@172.31.253.4</a>>" , local_tag:  "ac5eeb59-f559-4bb7-a3c2-170ca7f05f8b" , local_addr:  "" , remote_uri:  "<<a href="mailto:sip%3A222@172.31.253.20" target="_blank">sip:222@172.31.253.20</a>;line=46922>" , remote_tag:  "klwqxe1fvt5wk" , remote_addr:  ""</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>And here's what seems strange:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Channel A's local_uri looks like Channel B's uri</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Channel A's remote_uri looks like channel A's uri</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Channel B's local_uri looks like channel A's uri</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Channel B's remote_uri looks like channel B;s uri</span><o:p></o:p></p></div></div></div></blockquote><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>These aren't strange. They look alike because of callerid and target dialed information. They are still independent call legs.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>I’m having trouble understanding your explanation (googling just led me to generic callerid and target info).  I thought a phone’s local_uri would be how to reach that phone (not the other party), and vice versa for the remote_uri.  If the above URI info is correct then I must misunderstand their meaning.  Could you provide more explanation on how to interpret them (why they seems reversed to me), or a link?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>I assumed the remote & local URI where equivalent to the to & from lines (respectively) in the invite…</span><o:p></o:p></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>They are the From and To header, but what remote_uri and local_uri refers to changes depending on the direction of the SIP dialog.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Received call: From = remote_uri, To = local_uri<o:p></o:p></p></div></div><p class=MsoNormal>Sent call: >From = local_uri, To = remote_uri<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The contents of each depend on callerid information, settings, the Contact of the target when doing an outgoing call, what the remote endpoint chose for To URI on a received call.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span class=gmailsignatureprefix>-- </span><o:p></o:p></p><div><div><div><div><div><div><div><div><div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Joshua C. Colp</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Asterisk Project Lead</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Sangoma Technologies</span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Tahoma",sans-serif;color:#073763'>Check us out at <a href="http://www.sangoma.com" target="_blank">www.sangoma.com</a> and <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a></span><span style='font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></body></html>