<div dir="ltr"><div>Hello All, </div><div><br></div><div>I have been scratching my head for a few days now... Just to recap: </div><div><br></div><div>I'm a newbie with OpenSIPS so bear with me... I got OpenSIPS 3.3.1 (residential) running on Debian 11 with OpenSIPS Control Panel 9.3.2 and MySQL. </div><div><br></div><div>My goal is to: </div><div>1) Make two ATA's register and call each other (locally)... <b>Stopped working, I think routing logic is missing.</b></div><div>2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... <b>No ACK sent to Outbound provider.</b></div><div>3) Receive inbound calls from PSTN or SIP trunk and forward it to registered ATA... <b>Getting rejected.</b></div><div>4) Able to send and receive faxes from and to PSTN... <b>Haven't even touched.</b></div><div><br></div><div>Fast forward... I did achieve a few of my goals but they stopped working... You fix one thing and you break others... </div><div><br></div><div>My current issue is OpenSIPS is not sending ACK back to the Outbound provider when I make calls to PSTN thus calls are getting dropped from the Outbound provider due to no ACK. This issue started when I implemented topology_hiding('C"), rtpproxy_offer("ro"), uac_replace_from( , "$avp(furi)").</div><div><br></div><div>Here is my code snippet: </div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(52,187,200);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">####### Routing Logic ########</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(52,187,200);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"># main request routing logic</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">route{</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(52,187,200);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">#if ($rU=~"^\+[1-9][0-9]+$") {</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures">if (dp_translate(10 ,$rU ,$rU) ) {</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">xlog("*** 2. Dial plan translate from source $avp(src) to $rU ***\n");</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">$avp(furi) = "<a href="mailto:sip%3Aaaabbbcccc@gothamcity.com">sip:aaabbbcccc@gothamcity.com</a>";</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">uac_replace_from( , "$avp(furi)");</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,200)">#strip(1);</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">if (!do_routing(0)) {</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                        </span></span><span style="font-variant-ligatures:no-common-ligatures">send_reply(500,"No PSTN Route found");</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">exit;</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(52,187,200);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures"># t_on_branch("change_from");</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">route(relay);</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">exit;</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">














<br class="gmail-Apple-interchange-newline"></span></p><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">route[relay] {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures">xlog("*** 3. Entering route relay ***\n");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(52,187,200);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures"># for INVITEs enable some additional helper routes</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures">if (is_method("INVITE")) {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">topology_hiding("C");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">if(remove_hf("User-Agent")){</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                        </span></span><span style="font-variant-ligatures:no-common-ligatures">xlog("*** 4. User-Agent found and removed. ***\n");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">if (isflagset("NAT") && has_body("application/sdp")) {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">rtpproxy_offer("ro");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,200)">#rtpproxy_offer();</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">t_on_branch("per_branch_ops");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">t_on_reply("handle_nat");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">t_on_failure("missed_call");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures">if (isflagset("NAT")) {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">add_rr_param(";nat=yes");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9);min-height:12px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures">if (!t_relay()) {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(198,156,115)"><span class="gmail-Apple-converted-space">                </span></span><span style="font-variant-ligatures:no-common-ligatures">send_reply(500,"Internal Error");</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">}</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(198,156,115);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">        </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(40,254,20)">exit;</span></p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:"ProFont for Powerline";color:rgb(40,254,20);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p>
<br class="gmail-Apple-interchange-newline"></div><div>Any thoughts or suggestions on what to check for ACK?</div><div><br></div><div>Cheers,</div><div>Nitesh</div><div> </div><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>