[asterisk-commits] qwell: branch 1.6.0 r113174 - in /branches/1.6.0: ./ channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 7 14:11:19 CDT 2008
Author: qwell
Date: Mon Apr 7 14:10:45 2008
New Revision: 113174
URL: http://svn.digium.com/view/asterisk?view=rev&rev=113174
Log:
Merged revisions 113119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r113119 | qwell | 2008-04-07 13:02:51 -0500 (Mon, 07 Apr 2008) | 16 lines
Merged revisions 113118 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r113118 | qwell | 2008-04-07 13:00:09 -0500 (Mon, 07 Apr 2008) | 8 lines
Allow playback with noanswer (and add earlyrtp option).
(closes issue #9077)
Reported by: pj
Patches:
earlyrtp.diff uploaded by wedhorn (license 30)
Tested by: pj, qwell, DEA, wedhorn
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_skinny.c
branches/1.6.0/configs/skinny.conf.sample
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_skinny.c?view=diff&rev=113174&r1=113173&r2=113174
==============================================================================
--- branches/1.6.0/channels/chan_skinny.c (original)
+++ branches/1.6.0/channels/chan_skinny.c Mon Apr 7 14:10:45 2008
@@ -1223,6 +1223,7 @@
int lastlineinstance;
int lastcallreference;
int capability;
+ int earlyrtp;
struct sockaddr_in addr;
struct in_addr ourip;
struct skinny_line *lines;
@@ -2902,6 +2903,7 @@
else
memset(device_vmexten, 0, sizeof(device_vmexten));
+ d->earlyrtp = 1;
while(v) {
if (!strcasecmp(v->name, "host")) {
if (ast_get_ip(&d->addr, v->value)) {
@@ -2928,6 +2930,8 @@
ast_copy_string(d->version_id, v->value, sizeof(d->version_id));
} else if (!strcasecmp(v->name, "canreinvite")) {
canreinvite = ast_true(v->value);
+ } else if (!strcasecmp(v->name, "earlyrtp")) {
+ d->earlyrtp = ast_true(v->value);
} else if (!strcasecmp(v->name, "nat")) {
nat = ast_true(v->value);
} else if (!strcasecmp(v->name, "callerid")) {
@@ -3148,6 +3152,9 @@
l->hidecallerid ? "" : l->cid_name,
c->cid.cid_ani ? NULL : l->cid_num);
ast_setstate(c, AST_STATE_RING);
+ if (!sub->rtp) {
+ start_rtp(sub);
+ }
res = ast_pbx_run(c);
if (res) {
ast_log(LOG_WARNING, "PBX exited non-zero\n");
@@ -3602,45 +3609,61 @@
case AST_CONTROL_RINGING:
if (ast->_state != AST_STATE_UP) {
if (!sub->progress) {
- transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
+ if (!d->earlyrtp) {
+ transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
+ }
transmit_callstate(s, l->instance, SKINNY_RINGOUT, sub->callid);
transmit_dialednumber(s, exten, l->instance, sub->callid);
transmit_displaypromptstatus(s, "Ring Out", 0, l->instance, sub->callid);
transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, exten, exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
sub->ringing = 1;
- break;
+ if (!d->earlyrtp) {
+ break;
+ }
}
}
- return -1;
+ return -1; /* Tell asterisk to provide inband signalling */
case AST_CONTROL_BUSY:
if (ast->_state != AST_STATE_UP) {
- transmit_tone(s, SKINNY_BUSYTONE, l->instance, sub->callid);
+ if (!d->earlyrtp) {
+ transmit_tone(s, SKINNY_BUSYTONE, l->instance, sub->callid);
+ }
transmit_callstate(s, l->instance, SKINNY_BUSY, sub->callid);
sub->alreadygone = 1;
ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);
- break;
- }
- return -1;
+ if (!d->earlyrtp) {
+ break;
+ }
+ }
+ return -1; /* Tell asterisk to provide inband signalling */
case AST_CONTROL_CONGESTION:
if (ast->_state != AST_STATE_UP) {
- transmit_tone(s, SKINNY_REORDER, l->instance, sub->callid);
+ if (!d->earlyrtp) {
+ transmit_tone(s, SKINNY_REORDER, l->instance, sub->callid);
+ }
transmit_callstate(s, l->instance, SKINNY_CONGESTION, sub->callid);
sub->alreadygone = 1;
ast_softhangup_nolock(ast, AST_SOFTHANGUP_DEV);
- break;
- }
- return -1;
+ if (!d->earlyrtp) {
+ break;
+ }
+ }
+ return -1; /* Tell asterisk to provide inband signalling */
case AST_CONTROL_PROGRESS:
if ((ast->_state != AST_STATE_UP) && !sub->progress && !sub->outgoing) {
- transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
+ if (!d->earlyrtp) {
+ transmit_tone(s, SKINNY_ALERT, l->instance, sub->callid);
+ }
transmit_callstate(s, l->instance, SKINNY_PROGRESS, sub->callid);
transmit_displaypromptstatus(s, "Call Progress", 0, l->instance, sub->callid);
transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, exten, exten, l->instance, sub->callid, 2); /* 2 = outgoing from phone */
sub->progress = 1;
- break;
- }
- return -1;
- case -1:
+ if (!d->earlyrtp) {
+ break;
+ }
+ }
+ return -1; /* Tell asterisk to provide inband signalling */
+ case -1: /* STOP_TONE */
transmit_tone(s, SKINNY_SILENCE, l->instance, sub->callid);
break;
case AST_CONTROL_HOLD:
@@ -3656,7 +3679,7 @@
break;
default:
ast_log(LOG_WARNING, "Don't know how to indicate condition %d\n", ind);
- return -1;
+ return -1; /* Tell asterisk to provide inband signalling */
}
return 0;
}
Modified: branches/1.6.0/configs/skinny.conf.sample
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/configs/skinny.conf.sample?view=diff&rev=113174&r1=113173&r2=113174
==============================================================================
--- branches/1.6.0/configs/skinny.conf.sample (original)
+++ branches/1.6.0/configs/skinny.conf.sample Mon Apr 7 14:10:45 2008
@@ -63,6 +63,11 @@
;jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
;-----------------------------------------------------------------------------------
+;----------------------------------- DEVICE OPTIONS --------------------------------
+;earlyrtp=1 ; whether audio signalling should be provided by asterisk
+ ; (earlyrtp=1) or device generated (earlyrtp=0).
+ ; defaults to earlyrtp=1
+;-----------------------------------------------------------------------------------
; Typical config for 12SP+
;[florian]
More information about the asterisk-commits
mailing list