<div dir="ltr"><div dir="ltr">On Wed, Mar 15, 2023 at 11:49 AM Sean Bright <<a href="mailto:sean@seanbright.com">sean@seanbright.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/15/2023 9:43 AM, Marcin Groszek wrote:<br>
> Recently I discovered  that when realtime is used the port  is ignored<br>
> when used with host=dynamic and defaultip=x.x.x.x.<br>
><br>
>          if (port && !realtime && peer->host_dynamic) {<br>
>                  ast_sockaddr_set_port(&peer->defaddr, port);<br>
>          } else if (port) {<br>
>                  ast_sockaddr_set_port(&peer->addr, port);<br>
>          }<br>
><br>
> Is there a reason why port value is ignored if the peer is setup in<br>
> realtime?<br>
<br>
The `!realtime` check was added in 2005¹, the commit message is fairly<br>
vague, and I am not able to find bug #3286 it refers to.<br></blockquote><div><br></div><div>It's here[1] which doesn't really help.</div><div><br></div><div>[1] <a href="https://issues.asterisk.org/jira/browse/ASTERISK-3224">https://issues.asterisk.org/jira/browse/ASTERISK-3224</a></div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><font color="#073763">Joshua C. Colp</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Asterisk Project Lead</font></div><div style="font-family:tahoma,sans-serif"><font color="#073763">Sangoma Technologies</font></div><div style="font-family:tahoma,sans-serif"><font 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></font><br></div></div></div></div></div></div></div></div></div></div></div>