[OpenSIPS-Users] - Not sending ACK back!

Daniel Zanutti daniel.zanutti at gmail.com
Fri Oct 21 17:23:48 UTC 2022


Hi Nitesh

As you already know, opensips is a low level software. You have to
understand several aspects of SIP, network, RTP, DNS that when you use
Asterisk, most you don't need to understand deep.

Trying to help you, your script is way simple for you achievements. You
need:
1) Check NAT on all request + all replies. This is to fix your SIP messages.

2) Check if you need to apply RTPPROXY on the call. You can use the
"engage" function on INVITE then forget about it OR you can use manual way
with "offer" function and handle all scenarios manually. For example, call
the "answer" function on the 200 OK. Then delete on BYE.

3) Routing local calls (ATA to ATA) you need to handle the Register first
with "save" function, then later handle the INVITE with the "lookup"
function, both of Registrar module.

4) PSTN can be used as a direct route or some dynamic routing solution.
Make it work first with direct routing. Need to check how authenticate
works on your carrier. If IP based will be fine, if user/pass you need to
make your opensips authenticate, it's a little harder.

5) DID - You have to create some specific INBOUND rules. Calls will be
anonymous or authenticated?

6) Fax - Better solve other issues first.

Hope this gives you some direction. Look for some tutorials.

Regards

On Fri, Oct 21, 2022 at 11:11 AM Nitesh Divecha <aviator.nitesh.d at gmail.com>
wrote:

> Hello All,
>
> I have been scratching my head for a few days now... Just to recap:
>
> 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.
>
> My goal is to:
> 1) Make two ATA's register and call each other (locally)... *Stopped
> working, I think routing logic is missing.*
> 2) Make ATA to call PSTN via an outbound SIP trunk or DID provider... *No
> ACK sent to Outbound provider.*
> 3) Receive inbound calls from PSTN or SIP trunk and forward it to
> registered ATA... *Getting rejected.*
> 4) Able to send and receive faxes from and to PSTN... *Haven't even
> touched.*
>
> Fast forward... I did achieve a few of my goals but they stopped
> working... You fix one thing and you break others...
>
> 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)").
>
> Here is my code snippet:
>
> ####### Routing Logic ########
>
>
> # main request routing logic
>
>
> route{
>
>
> #if ($rU=~"^\+[1-9][0-9]+$") {
>
>         if (dp_translate(10 ,$rU ,$rU) ) {
>
>                 xlog("*** 2. Dial plan translate from source $avp(src) to
> $rU ***\n");
>
>
>                 $avp(furi) = "sip:aaabbbcccc at gothamcity.com";
>
>                 uac_replace_from( , "$avp(furi)");
>
>                 #strip(1);
>
>                 if (!do_routing(0)) {
>
>                         send_reply(500,"No PSTN Route found");
>
>                         exit;
>
>                 }
>
>                 # t_on_branch("change_from");
>
>                 route(relay);
>
>                 exit;
>
>         }
>
>
>
> route[relay] {
>
>         xlog("*** 3. Entering route relay ***\n");
>
>         # for INVITEs enable some additional helper routes
>
>         if (is_method("INVITE")) {
>
>                 topology_hiding("C");
>
>                 if(remove_hf("User-Agent")){
>
>                         xlog("*** 4. User-Agent found and removed.
> ***\n");
>
>                 }
>
>
>                 if (isflagset("NAT") && has_body("application/sdp")) {
>
>                         rtpproxy_offer("ro");
>
>                         #rtpproxy_offer();
>
>                 }
>
>
>                 t_on_branch("per_branch_ops");
>
>                 t_on_reply("handle_nat");
>
>                 t_on_failure("missed_call");
>
>         }
>
>
>         if (isflagset("NAT")) {
>
>                 add_rr_param(";nat=yes");
>
>         }
>
>
>         if (!t_relay()) {
>
>                 send_reply(500,"Internal Error");
>
>         }
>
>         exit;
>
> }
>
> Any thoughts or suggestions on what to check for ACK?
>
> Cheers,
> Nitesh
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221021/076557ec/attachment-0001.html>


More information about the Users mailing list