summaryrefslogtreecommitdiff
path: root/channels/misdn
diff options
context:
space:
mode:
authorChristian Richter <christian.richter@beronet.com>2006-05-05 16:38:15 +0000
committerChristian Richter <christian.richter@beronet.com>2006-05-05 16:38:15 +0000
commitefccf89eae741d2bf147379f7089fd71ca954ea1 (patch)
treeca06f1ea210d470ab2ecbfbcabdf2b24375da431 /channels/misdn
parent816a7cf13bb2f9a715a2129478a570422e8d8843 (diff)
Added option far_alerting. This option makes it possible to generate a Ringing on other channels if they feel that they should have inband ringing, but there is non in reality. I need this due to the fact that asterisk has not the possibility to transmit progress indicators thus chan_sip and others do not know wether they should generate a Rining tone themselves if they receive AST_CONTROL_RINGING..
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/misdn')
-rw-r--r--channels/misdn/chan_misdn_config.h1
-rw-r--r--channels/misdn/isdn_lib.c13
-rw-r--r--channels/misdn/isdn_lib.h2
3 files changed, 13 insertions, 3 deletions
diff --git a/channels/misdn/chan_misdn_config.h b/channels/misdn/chan_misdn_config.h
index 9717e7846..a2ff16b3a 100644
--- a/channels/misdn/chan_misdn_config.h
+++ b/channels/misdn/chan_misdn_config.h
@@ -23,6 +23,7 @@ enum misdn_cfg_elements {
/* port config items */
MISDN_CFG_FIRST = 0,
MISDN_CFG_GROUPNAME, /* char[] */
+ MISDN_CFG_FAR_ALERTING, /* int (bool) */
MISDN_CFG_RXGAIN, /* int */
MISDN_CFG_TXGAIN, /* int */
MISDN_CFG_TE_CHOOSE_CHANNEL, /* int (bool) */
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 824fc59cd..51ccce3f3 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -3064,8 +3064,6 @@ int handle_err(msg_t *msg)
int queue_l2l3(msg_t *msg) {
iframe_t *frm= (iframe_t*)msg->data;
struct misdn_stack *stack;
- int err=0;
-
stack=find_stack_by_addr( frm->addr );
@@ -3261,7 +3259,6 @@ void manager_event_handler(void *arg)
stack=stack->next ) {
while ( (msg=msg_dequeue(&stack->upqueue)) ) {
- int res=0;
/** Handle L2/3 Signalling after bchans **/
if (!handle_frm_nt(msg)) {
/* Maybe it's TE */
@@ -3848,3 +3845,13 @@ void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel
}
}
+
+
+
+void misdn_lib_echo(struct misdn_bchannel *bc, int onoff)
+{
+ cb_log(1,bc->port, " --> ECHO %s\n", onoff?"ON":"OFF");
+ manager_ph_control(bc, onoff?CMX_ECHO_ON:CMX_ECHO_OFF, 0);
+}
+
+
diff --git a/channels/misdn/isdn_lib.h b/channels/misdn/isdn_lib.h
index 444ae62ff..c6324d37e 100644
--- a/channels/misdn/isdn_lib.h
+++ b/channels/misdn/isdn_lib.h
@@ -392,6 +392,8 @@ void misdn_lib_setup_bc(struct misdn_bchannel *bc);
void misdn_lib_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
+void misdn_lib_echo(struct misdn_bchannel *bc, int onoff);
+
unsigned char * flip_buf_bits ( unsigned char * buf , int len);
int misdn_lib_is_ptp(int port);