[asterisk-commits] oej: branch group/pinefool-poor-mans-plc-1.4 r383505 - in /team/group/pinefoo...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Mar 21 05:28:53 CDT 2013
Author: oej
Date: Thu Mar 21 05:28:49 2013
New Revision: 383505
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383505
Log:
Make PLC configurable in sip.conf (backport from 1.8 strangely enough)
Modified:
team/group/pinefool-poor-mans-plc-1.4/channels/chan_sip.c
team/group/pinefool-poor-mans-plc-1.4/configs/sip.conf.sample
Modified: team/group/pinefool-poor-mans-plc-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinefool-poor-mans-plc-1.4/channels/chan_sip.c?view=diff&rev=383505&r1=383504&r2=383505
==============================================================================
--- team/group/pinefool-poor-mans-plc-1.4/channels/chan_sip.c (original)
+++ team/group/pinefool-poor-mans-plc-1.4/channels/chan_sip.c Thu Mar 21 05:28:49 2013
@@ -797,6 +797,7 @@
#define SIP_PAGE2_RTAUTOCLEAR (1 << 2)
#define SIP_PAGE2_RT_FROMCONTACT (1 << 4)
#define SIP_PAGE2_RTSAVE_SYSNAME (1 << 5)
+#define SIP_PAGE2_POORMANSPLC (1 << 6)
/* Space for addition of other realtime flags in the future */
#define SIP_PAGE2_STATECHANGEQUEUE (1 << 9) /*!< D: Unsent state pending change exists */
#define SIP_PAGE2_IGNOREREGEXPIRE (1 << 10)
@@ -829,7 +830,7 @@
#define SIP_PAGE2_FLAGS_TO_COPY \
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_MWI | \
- SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_FORWARD_LOOP_DETECTED)
+ SIP_PAGE2_UDPTL_DESTINATION | SIP_PAGE2_FORWARD_LOOP_DETECTED | SIP_PAGE2_POORMANSPLC)
/* SIP packet flags */
#define SIP_PKT_DEBUG (1 << 0) /*!< Debug this packet */
@@ -4900,6 +4901,7 @@
free(p);
return NULL;
}
+ ast_rtp_set_plc(p->rtp, ast_test_flag(&p->flags[1], SIP_DTMF) == SIP_PAGE2_POORMANSPLC);
ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833);
ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
ast_rtp_settos(p->rtp, global_tos_audio);
@@ -18281,6 +18283,9 @@
} else if (!strcasecmp(v->name, "forwardloopdetected")) {
ast_set_flag(&mask[1], SIP_PAGE2_FORWARD_LOOP_DETECTED);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_FORWARD_LOOP_DETECTED);
+ } else if (!strcasecmp(v->name, "plc")) {
+ ast_set_flag(&mask[1], SIP_PAGE2_POORMANSPLC);
+ ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_POORMANSPLC);
} else
res = 0;
Modified: team/group/pinefool-poor-mans-plc-1.4/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/group/pinefool-poor-mans-plc-1.4/configs/sip.conf.sample?view=diff&rev=383505&r1=383504&r2=383505
==============================================================================
--- team/group/pinefool-poor-mans-plc-1.4/configs/sip.conf.sample (original)
+++ team/group/pinefool-poor-mans-plc-1.4/configs/sip.conf.sample Thu Mar 21 05:28:49 2013
@@ -489,6 +489,9 @@
; it may be a mandatory requirement for some
; destinations which do not have a prior
; account relationship with your server.
+
+; plc=yes ; Enable Poor Man's Packet Loss Concealment in RTP/Audio channels
+ ; Settable in device-level too.
;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
More information about the asterisk-commits
mailing list