Hello,
Hello, SIP newbie here.We are a new WISP offering voip to our residential customers. Due toIP address scarcity we have to use large scale NAT in our network. Inorder for our local customers to call each other and have good callquality we wish to connect their ATA's directly to each other ratherthan have the RTP proxied 6000 miles across the public internet.I'm wondering about the best way to program an outbound proxy tomonitor the calls and bypass the ITSP's B2BUA for local calls. We wantto rely on the ITSP's server for authentication (so we would onlyREGISTER our UA's locally after we get an OK from the remoteserver. Or perhaps we would not need a local registrar at all.)The remote server is also where the users manage their account. So weonly want to attempt to connect the 2 UA's directly after the calleehas sent an "OK" response to the INVITE from the ITSP. (The callee mayhave set "Do not disturb" on his account at the ITSP, and it needs tohandle voicemail, forwarding etc.)We have other constraints. The server hardware needs to be very lowpower to be installed at our solar-powered head end. Thus forpotentially several hundred clients it needs to handle only SIP, nomedia. We could potentially install a media relay server elsewhere,but hopefully we won't need to do any media proxying at all.The NAT assignment is all handled by a Mikrotik router at our headend. I've looked at the milkfish configuration file and it seems likein some ways, ours should be simpler. Milkfish assumes it is runningon the gateway, so when it sets up an rtpproxy it doesn't costanything. For us, it doesn't seem like we should have to do any NATfixup or any media proxying. If the connection is local, the 2 UA'sshould connect directly with each other. Otherwise, the connectionwill be directly between our UA and whatever the ITSP sets up as theother end, and the ITSP already knows how to traverse our NAT verywell.One idea I had is that, for local calls, when the initial INVITE isforwarded from the caller to the ITSP, the caller's original SDPpayload is stashed away somewhere. Then when the INVITE comes throughon the way to the callee, replace the ITSP's SDP info with the stashedoriginal. Then when the callee responds with an "OK", I forward theresponse directly to the caller instead of the ITSP.There would have to be some fixup of loose ends, also. How to let theITSP that its proxy services are no longer needed? (It could havedecided to forward the call to voicemail in the meantime, etc.)Can you query the SER transaction database by Call-ID to find theother side of the call and extract information from it?Perhaps I'm barking up the wrong tree, but I'm sure there's a correctway to do this.Any help would be appreciated.