[asterisk-users] NAT problem with recvonly calls
Hello, We have a problem with a SIP doorbell device which sends media one way only, and NAT at the receiving device. When the doorbell button is pressed it makes a call to a configured destination. Since the doorbell only sends and doesn't receive it sends the INVITE with sendonly in the SDP, and the destination then replies with a 200 OK with recvonly in the SDP. The problem is that the destination is behind NAT, and its reply contains a private network IP in the SDP. Normally Asterisk when nat=yes works around that by adjusting the destination for RTP to be the address it actually receives audio from, however because this device is recvonly Asterisk never receives audio from it. This means Asterisk keeps trying to send the doorbell's RTP to the private network IP which of course fails, and the destination never gets the RTP from the doorbell. Does anyone know how to work around this issue? Thank you in advance, -- David Cunningham, Voisonics Limited http://voisonics.com/ USA: +1 213 221 1092 New Zealand: +64 (0)28 2558 3782 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] NAT problem with recvonly calls
David, Does Asterisk send a 180 or a 183 with SDP? We have found that using these two lines help (where xc is a 500ms blank sound file) Exten => _X.,n, Progress() Exten => _X.,n, Playback(xc,noanswer) On Wed, Dec 2, 2020 at 4:30 PM David Cunningham wrote: > Hello, > > We have a problem with a SIP doorbell device which sends media one way > only, and NAT at the receiving device. > > When the doorbell button is pressed it makes a call to a configured > destination. Since the doorbell only sends and doesn't receive it sends the > INVITE with sendonly in the SDP, and the destination then replies with a > 200 OK with recvonly in the SDP. > > The problem is that the destination is behind NAT, and its reply contains > a private network IP in the SDP. Normally Asterisk when nat=yes works > around that by adjusting the destination for RTP to be the address it > actually receives audio from, however because this device is recvonly > Asterisk never receives audio from it. This means Asterisk keeps trying to > send the doorbell's RTP to the private network IP which of course fails, > and the destination never gets the RTP from the doorbell. > > Does anyone know how to work around this issue? > > Thank you in advance, > > -- > David Cunningham, Voisonics Limited > http://voisonics.com/ > USA: +1 213 221 1092 > New Zealand: +64 (0)28 2558 3782 > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] NAT problem with recvonly calls
Hi Dovid, We're using Enswitch so it uses AGI rather than a regular Asterisk dialplan, but perhaps sending it to a custom-made Asterisk context with the lines you suggest could be the best way forward. Thank you for that. On Thu, 3 Dec 2020 at 13:01, Dovid Bender wrote: > David, > > Does Asterisk send a 180 or a 183 with SDP? We have found that using these > two lines help (where xc is a 500ms blank sound file) > Exten => _X.,n, Progress() > Exten => _X.,n, Playback(xc,noanswer) > > > On Wed, Dec 2, 2020 at 4:30 PM David Cunningham > wrote: > >> Hello, >> >> We have a problem with a SIP doorbell device which sends media one way >> only, and NAT at the receiving device. >> >> When the doorbell button is pressed it makes a call to a configured >> destination. Since the doorbell only sends and doesn't receive it sends the >> INVITE with sendonly in the SDP, and the destination then replies with a >> 200 OK with recvonly in the SDP. >> >> The problem is that the destination is behind NAT, and its reply contains >> a private network IP in the SDP. Normally Asterisk when nat=yes works >> around that by adjusting the destination for RTP to be the address it >> actually receives audio from, however because this device is recvonly >> Asterisk never receives audio from it. This means Asterisk keeps trying to >> send the doorbell's RTP to the private network IP which of course fails, >> and the destination never gets the RTP from the doorbell. >> >> Does anyone know how to work around this issue? >> >> Thank you in advance, >> >> -- >> David Cunningham, Voisonics Limited >> http://voisonics.com/ >> USA: +1 213 221 1092 >> New Zealand: +64 (0)28 2558 3782 >> -- >> _ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >>http://lists.digium.com/mailman/listinfo/asterisk-users > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- David Cunningham, Voisonics Limited http://voisonics.com/ USA: +1 213 221 1092 New Zealand: +64 (0)28 2558 3782 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] NAT problem with recvonly calls
David, You should be able to do that via the agi as well. On Wed, Dec 2, 2020 at 20:32 David Cunningham wrote: > Hi Dovid, > > We're using Enswitch so it uses AGI rather than a regular Asterisk > dialplan, but perhaps sending it to a custom-made Asterisk context with the > lines you suggest could be the best way forward. > > Thank you for that. > > > On Thu, 3 Dec 2020 at 13:01, Dovid Bender wrote: > >> David, >> >> Does Asterisk send a 180 or a 183 with SDP? We have found that using >> these two lines help (where xc is a 500ms blank sound file) >> Exten => _X.,n, Progress() >> Exten => _X.,n, Playback(xc,noanswer) >> >> >> On Wed, Dec 2, 2020 at 4:30 PM David Cunningham < >> dcunning...@voisonics.com> wrote: >> >>> Hello, >>> >>> We have a problem with a SIP doorbell device which sends media one way >>> only, and NAT at the receiving device. >>> >>> When the doorbell button is pressed it makes a call to a configured >>> destination. Since the doorbell only sends and doesn't receive it sends the >>> INVITE with sendonly in the SDP, and the destination then replies with a >>> 200 OK with recvonly in the SDP. >>> >>> The problem is that the destination is behind NAT, and its reply >>> contains a private network IP in the SDP. Normally Asterisk when nat=yes >>> works around that by adjusting the destination for RTP to be the address it >>> actually receives audio from, however because this device is recvonly >>> Asterisk never receives audio from it. This means Asterisk keeps trying to >>> send the doorbell's RTP to the private network IP which of course fails, >>> and the destination never gets the RTP from the doorbell. >>> >>> Does anyone know how to work around this issue? >>> >>> Thank you in advance, >>> >>> -- >>> David Cunningham, Voisonics Limited >>> http://voisonics.com/ >>> USA: +1 213 221 1092 >>> New Zealand: +64 (0)28 2558 3782 >>> -- >>> _ >>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>> >>> Check out the new Asterisk community forum at: >>> https://community.asterisk.org/ >>> >>> New to Asterisk? Start here: >>> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >>> >>> asterisk-users mailing list >>> To UNSUBSCRIBE or update options visit: >>>http://lists.digium.com/mailman/listinfo/asterisk-users >> >> -- >> _ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >>http://lists.digium.com/mailman/listinfo/asterisk-users > > > > -- > David Cunningham, Voisonics Limited > http://voisonics.com/ > USA: +1 213 221 1092 > New Zealand: +64 (0)28 2558 3782 > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users