Re: [asterisk-dev] Idle Timers and Keep-Alives

2018-01-29 Thread André Valentin
Hi!

Please notice that such a TCP keepalive paket is often filtered by 
carrier-grade nat. So this would end in no keepalive packet for the client.

Kind regards,

André


Am 26.01.2018 um 10:58 schrieb marek cervenka:
> +1
> 
> 
> Dne 24/01/2018 v 21:50 George Joseph napsal(a):
>> So here's a proposal...
>>
>> We remove BOTH pjproject and asterisk keep-alives.
>> We add the following parameters to pjsip transport:
>>
>> tcp_keepalives =  ; turn on or off tcp keepalives
>> ; If tcp_keepalives = yes, the following parameters can be used to override 
>> the default kernel
>> ; settings in /proc/sys/net/ipv4/tcp_keepalive_(time,intvl,probes)
>> tcp_keepalive_time =  ; The number of seconds a connection can be 
>> idle before the first keepalive is sent.
>> tcp_keepalive_interval =  ; Interval between keepalive probes.
>> tcp_keepalive_probes =  ; Number of unacknowledged probes before a 
>> failure is reported.
>>
>> To preserve backward compatibility, the current keep_alive_interval setting 
>> in pjsip.conf/global
>> would turn tcp keepalives on for tcp and tls transports with both 
>> tcp_keepalive_time and
>> tcp_keepalive_interval set to keep_alive_interval and tcp_keepalive_probes 
>> set to 2.
>>
>> One advantage of this is that wireshark captures will clearly show these as 
>> tcp keepalives even on
>> a tls connection.   Another advantage is that we eliminate the competing 
>> keepalive mechanisms
>> with their threading and locking baggage.
>>
>> No code changes to pjproject would be required for this change.  We can turn 
>> off their keepalives
>> in our config_site.h file.
>>
>>
>>
>>
>> On Fri, Jan 5, 2018 at 9:07 AM, Ross Beer > <mailto:ross.b...@outlook.com>> wrote:
>>
>> Could the operating system manage this also, for example with the 
>> following:
>>
>> sysctl.conf
>>
>> net.ipv4.tcp_fin_timeout = 60
>> net.ipv4.tcp_retries1 = 3
>> net.ipv4.tcp_syn_retries = 5
>>
>> # Keep TCP connections alive
>> net.ipv4.tcp_keepalive_time = 300
>> net.ipv4.tcp_keepalive_intvl = 60
>> net.ipv4.tcp_keepalive_probes = 20
>>
>> From a chan_pjsip point of view, it would receive notification that the 
>> underlying connection has closed.
>> 
>> --
>> *From:* asterisk-dev-boun...@lists.digium.com 
>> <mailto:asterisk-dev-boun...@lists.digium.com> 
>> > <mailto:asterisk-dev-boun...@lists.digium.com>> on behalf of Alexander Traud 
>> mailto:pabstr...@compuserve.com>>
>> *Sent:* 05 January 2018 15:44
>> *To:* Asterisk Developers Mailing List
>> *Subject:* Re: [asterisk-dev] Idle Timers and Keep-Alives
>>  
>> > Do we even WANT an idle timer?
>>
>> I posted my concerns already in <http://gerrit.asterisk.org/6807 
>> <http://gerrit.asterisk.org/6807>>: I have a device which crashes when it 
>> receives such a keepalive. I could live with a timer when Asterisk is not 
>> the registrar but registered somewhere else. But I do not _need_ that either.
>>
>>
>>
>> -- 
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-dev 
>> <http://lists.digium.com/mailman/listinfo/asterisk-dev>
>>
>> --
>> _____
&

Re: [asterisk-dev] Transcoding: Codec 2, iLBC 20, SILK, GSM-EFR, AMR(-WB)

2015-11-27 Thread André Valentin
Hello Alexander,

great work!! If you ask, it would be  nice if transcoding support is there for 
GSM-EFR and both AMR Codes.
If you need testing, I can support you.

Kind regards,

André


Am 24.11.2015 um 16:08 schrieb Alexander Traud:
> Thanks to the codec/format changes which were introduced with Asterisk 13,
> adding new trancoding modules is possible within one working day. Thanks to
> format-attribute modules, the debugging of the SDP/fmtp-negotiation resides
> in one source file. Therefore, I was able to port five formats to
> Asterisk 13: .
>
>
> Question #1: Level of Integration?
>
> Now, I plan to submit those modules into Asterisk. However, which level of
> integration is desired for which format: pass-through only (like G.729),
> pass-through plus library detection (like Opus), everything (like Speex)?
>
> pass-through including fmtp negotiation (level 1)
>  |  pass-through plus library detection in ./configure (level 2)
>  |   |  transcoding module in codecs/codec_* (level 3)
>  |   |   |
> [x] [x] [x] Codec 2 
> [x] [x] [x] iLBC 20; the other mode iLBC 30 is available already
> [ ] [ ] [ ] SILK; deprecated since September 2012 in favor of Opus
> [x] [x] [ ] GSM-EFR; GSM-FR is available already
> [x] [x] [ ] AMR and AMR-WB
>
> Your opinion? Please, set/change your checkmarks as desired! Of course, I am
> able to find a contra position for each codec. Of course, I would like to
> see complete support for all codecs (level 3). Anyway, some arguments why I
> implemented those codecs:
> * SILK/24 is the only default HD codec in the famous CSipSimple for Android.
>   All other HD codecs must be enabled in CSipSimple manually.
> * GSM-EFR is default in Stock-Android, optional in Voice-over-LTE (VoLTE)
>   Beside AMR and GSM-FR the only codec with compression (the rest is G.711).
> * AMR(-WB) are mandatory when linked to VoLTE (3GPP TS 26.103 chapter 7)
> * Codec 2 does not have a MIME media-type specification, yet.
>   However, Codec 2 is supported in FreeSWITCH and CSipSimple.
> * iLBC 20 was an apprentice piece thanks to the patch in ASTERISK-18094.
>
>
> Question #2: Format-attribute Keys as Header Files?
>
> In Asterisk 13, some formats do have a header file in include/asterisk/,
> like CELT and Opus (*_attr_keys). However internally, nobody consumes those
> headers anymore. Some format-attribute modules offer "format_attribute_set"
> but nobody uses that either. Is it OK, to create new header files? For which
> use-case should I implement "format_attribute_set"?
>
>
> Question #3: Module Loading Priority
>
> H.26x modules load very late (AST_MODPRI_DEFAULT). The Opus Codec module
> loads very early (AST_MODPRI_CHANNEL_DEPEND). Which one is correct? Or are
> both and there is a reason why video modules load later than audio modules?
>
>
> Question #4: Orphan Format-attribute module CELT
>
> Currently, Asterisk 13 does not offer even pass-through of SILK or CELT.
> Still their header files and their format-attribute modules are present. Is
> there a reason for this?
> For example, the SILK module contains several bugs, like creating several
> fmtp lines instead of one, is able to parse only a single parameter, and
> does not return a default when used with an internal transcoding module.
>
>
> Final Sentence
>
> Although it would be nice to see at least some of this work in Asterisk, I
> am mainly interested in a code-review. Is it possible to submit everything
> for code-review even if there is no chance to pass?
>
>
>


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[asterisk-dev] PJSIP and persistent TLS

2014-03-03 Thread André Valentin
Hi!

I'm just trying to move my function ality from chan_sip to pjsip. I stumbled 
upon one problem.
With chan_sip and a via persistant TLs connected phone everything works as 
expected. Calls in/out work.
Even if asterisk tries to reach the phone, it reuses the existing TLS 
connection.

If I switch this to PJSIP, it stops working. I configured the following 
parameters:
symmetric_rtp=true
force_rport=true
and others...

I I know call the phone via PJSIP, asterisk does not reuse the TLS connection. 
It tries to create a new one, which of course fails.

Any ideas?

With kind regards,

André


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev