Re: TCP dial via proxy

David Cunningham <[email protected]>
Newsgroups gmane.comp.telephony.pbx.asterisk.user
Message-ID <CAHGbP-8x1rZt06oq=WX8b3CdRtzc5Q7c8G8ymay1=fMBdDhYHA@mail.gmail.com>
Thank you Thomas. I know it would be good to move to pjsip, and that's
coming in a future product version, but it isn't used in the version of
this scenario.


On Fri, 22 Jul 2022 at 01:30, Thomas Ray <[email protected]> wrote:

> The answer is chan_pjsip. You can do this with chan_pjsip. There’s no real
> support for chan_sip anymore. It’s dead, it’s going away. No fixes or
> updates will be accepted against it as of this point.
>
>
>
> *From: *asterisk-users <[email protected]> on
> behalf of Dovid Bender <[email protected]>
> *Reply-To: *Asterisk Users Mailing List - Non-Commercial Discussion <
> [email protected]>
> *Date: *Thursday, July 21, 2022 at 9:21 AM
> *To: *Asterisk Users Mailing List - Non-Commercial Discussion <
> [email protected]>
> *Subject: *Re: [asterisk-users] TCP dial via proxy
>
>
>
> David,
>
>
>
> We had this exact "issue" in the past and were not able to figure out how
> to do it. Where we wanted tcp we prefixed the sip URI with "force_tcp". So:
>
> Dial(SIP/[email protected]//2.2.2.2 <http://[email protected]/2.2.2.2>)
>
> became:
>
> Dial(SIP/[email protected]//2.2.2.2
> <http://[email protected]/2.2.2.2>)
>
> On Kamailio's side in the FORWARD block we added:
>
> # HACK for forcing TCP
>                 if ($oU != $null && $(oU{s.len}) != 0) {
>                     $var(prefix) = $(oU{s.substr,0,9});
>                     if ($var(prefix) == "force_tcp") {
>                         $rU = $(oU{s.substr,9,0});
>                         add_uri_param( "transport=tcp" );
>                         $fs = "tcp:" + $Ri + ":5060";
>                     }
>                 }
>
>
>
>
>
>
>
> On Wed, Jul 20, 2022 at 10:47 PM David Cunningham <
> [email protected]> wrote:
>
> Hello,
>
>
>
> We have an Asterisk dial which sends the call via a proxy using //, for
> example:
>
>
>
> Dial(SIP/${EXTEN}@peer_address//proxy_address)
>
>
>
> Does anyone know how we can make the SIP to the proxy use TCP? We tried
> making proxy_address match a peer in sip.conf with "transport = tcp" but
> that didn't seem to work. We are using chan_sip.
>
>
>
> Thanks very much for any advice.
>
>
>
> --
>
> 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
> --
> _____________________________________________________________________
> -- 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.