[svn-commits] murf: branch murf/bug11210 r110694 - in /team/murf/bug11210: ./ channels/ con...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Mar 25 13:11:36 CDT 2008
Author: murf
Date: Tue Mar 25 13:11:36 2008
New Revision: 110694
URL: http://svn.digium.com/view/asterisk?view=rev&rev=110694
Log:
Merged revisions 110610,110615,110619,110621,110625,110629,110631,110636,110639,110689,110691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r110610 | file | 2008-03-24 09:28:25 -0600 (Mon, 24 Mar 2008) | 6 lines
Only print out the set_address_from_contact host verbose message if debugging is enabled on the dialog.
(closes issue #12280)
Reported by: rjain
Patches:
chan_sip.c.diff uploaded by rjain (license 226)
................
r110615 | russell | 2008-03-24 11:36:04 -0600 (Mon, 24 Mar 2008) | 10 lines
Merged revisions 110614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r110614 | russell | 2008-03-24 12:34:56 -0500 (Mon, 24 Mar 2008) | 2 lines
Turn a NOTICE into a DEBUG message.
........
................
r110619 | mmichelson | 2008-03-24 13:19:37 -0600 (Mon, 24 Mar 2008) | 23 lines
Merged revisions 110618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r110618 | mmichelson | 2008-03-24 14:17:41 -0500 (Mon, 24 Mar 2008) | 15 lines
This is a revert for revision 108288. The reason is that that revision
was not for an actual bug fix per se, and so it really should not have been in 1.4 in
the first place. Plus, people who compile with DO_CRASH are more likely
to encounter a crash due to this change. While I think the usage of DO_CRASH
in ast_sched_del is a bit absurd, this sort of change is beyond the scope of 1.4
and should be done instead in a developer branch based on trunk
so that all scheduler functions are fixed at once.
I also am reverting the change to trunk and 1.6 since they also suffer from
the DO_CRASH potential.
(closes issue #12272)
Reported by: qq12345
........
................
r110621 | mmichelson | 2008-03-24 14:14:07 -0600 (Mon, 24 Mar 2008) | 11 lines
Remove the "Event: registration" header from Asterisk-generated
SIP REGISTER requests. rjain points out that RFC 3265 specifies
that the Event: header is not a valid header for REGISTER requests
and that the "registration" value is not defined at IANA.
(closes issue #12279)
Reported by: rjain
Patches:
chan_sip.c.diff uploaded by rjain (license 226)
................
r110625 | oej | 2008-03-25 04:54:07 -0600 (Tue, 25 Mar 2008) | 6 lines
Use the "Server" header when responding to SIP requests.
(closes issue #12278)
Reported by: rjain
Patches:
chan_sip.c.diff uploaded by rjain (license 226)
................
r110629 | file | 2008-03-25 08:39:45 -0600 (Tue, 25 Mar 2008) | 12 lines
Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines
Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue #10058)
Reported by: tracinet
........
................
r110631 | file | 2008-03-25 09:18:41 -0600 (Tue, 25 Mar 2008) | 4 lines
Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue #9239)
Reported by: sunder
................
r110636 | mmichelson | 2008-03-25 09:41:33 -0600 (Tue, 25 Mar 2008) | 15 lines
Merged revisions 110635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r110635 | mmichelson | 2008-03-25 10:40:33 -0500 (Tue, 25 Mar 2008) | 7 lines
When reverting a commit, I accidentally left in this bit which was an experiment
to see what would happen. It passed the compile test, and I didn't notice I had
left this change in too.
So this is a revert of a revert...sort of.
........
................
r110639 | mmichelson | 2008-03-25 09:44:01 -0600 (Tue, 25 Mar 2008) | 3 lines
Oops here too. I need to stop coding for a while...
................
r110689 | tilghman | 2008-03-25 11:40:28 -0600 (Tue, 25 Mar 2008) | 6 lines
Update the sample configuration, to use Macro less (since it's now deprecated).
(closes issue #12293)
Reported by: pprindeville
Patches:
bugid-0012293.1.6.patch uploaded by pprindeville (license 347)
................
r110691 | tilghman | 2008-03-25 11:46:34 -0600 (Tue, 25 Mar 2008) | 6 lines
Update sample configurations to make virtual hosting more obvious.
(closes issue #11969)
Reported by: pprindeville
Patches:
acme-virtualpbx.1.6.patch uploaded by pprindeville (license 347)
................
Modified:
team/murf/bug11210/ (props changed)
team/murf/bug11210/CHANGES
team/murf/bug11210/Makefile
team/murf/bug11210/channels/chan_iax2.c
team/murf/bug11210/channels/chan_sip.c
team/murf/bug11210/configs/extensions.conf.sample
team/murf/bug11210/configs/sip.conf.sample
team/murf/bug11210/configs/voicemail.conf.sample
team/murf/bug11210/include/asterisk/options.h
team/murf/bug11210/main/app.c
team/murf/bug11210/main/asterisk.c
team/murf/bug11210/main/channel.c
Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/murf/bug11210/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Mar 25 13:11:36 2008
@@ -1,1 +1,1 @@
-/trunk:1-110595
+/trunk:1-110692
Modified: team/murf/bug11210/CHANGES
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/CHANGES?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/CHANGES (original)
+++ team/murf/bug11210/CHANGES Tue Mar 25 13:11:36 2008
@@ -25,6 +25,11 @@
the arguments to Directory; previously, you could enter only 3, regardless
of how many names are in your company. For large companies, this should be
quite helpful.
+
+SIP Changes
+-----------
+ * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
+ audio file to be played upon completion of an attended transfer.
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0 -------------
Modified: team/murf/bug11210/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/Makefile?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/Makefile (original)
+++ team/murf/bug11210/Makefile Tue Mar 25 13:11:36 2008
@@ -675,6 +675,7 @@
echo ";cache_record_files = yes ; Cache recorded sound files to another directory during recording" ; \
echo ";record_cache_dir = /tmp ; Specify cache directory (used in cnjunction with cache_record_files)" ; \
echo ";transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded" ; \
+ echo ";transmit_silence = yes ; Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated" ; \
echo ";transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly" ; \
echo ";runuser = asterisk ; The user to run as" ; \
echo ";rungroup = asterisk ; The group to run as" ; \
Modified: team/murf/bug11210/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_iax2.c?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/channels/chan_iax2.c (original)
+++ team/murf/bug11210/channels/chan_iax2.c Tue Mar 25 13:11:36 2008
@@ -1227,7 +1227,7 @@
}
time(&t);
if (t != lasterror)
- ast_log(LOG_NOTICE, "Out of idle IAX2 threads for scheduling!\n");
+ ast_debug(1, "Out of idle IAX2 threads for scheduling!\n");
lasterror = t;
return -1;
@@ -7987,7 +7987,7 @@
if (!(thread = find_idle_thread())) {
time(&t);
if (t != last_errtime)
- ast_log(LOG_NOTICE, "Out of idle IAX2 threads for I/O, pausing!\n");
+ ast_debug(1, "Out of idle IAX2 threads for I/O, pausing!\n");
last_errtime = t;
usleep(1);
return 1;
Modified: team/murf/bug11210/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/channels/chan_sip.c?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/channels/chan_sip.c (original)
+++ team/murf/bug11210/channels/chan_sip.c Tue Mar 25 13:11:36 2008
@@ -7568,7 +7568,7 @@
copy_header(resp, req, "Call-ID");
copy_header(resp, req, "CSeq");
if (!ast_strlen_zero(global_useragent))
- add_header(resp, "User-Agent", global_useragent);
+ add_header(resp, "Server", global_useragent);
add_header(resp, "Allow", ALLOWED_METHODS);
add_header(resp, "Supported", SUPPORTED_EXTENSIONS);
@@ -9653,7 +9653,6 @@
snprintf(tmp, sizeof(tmp), "%d", r->expiry);
add_header(&req, "Expires", tmp);
add_header(&req, "Contact", p->our_contact);
- add_header(&req, "Event", "registration");
add_header_contentLength(&req, 0);
initialize_initreq(p, &req);
@@ -10021,7 +10020,9 @@
port = !ast_strlen_zero(pt) ? atoi(pt) : STANDARD_SIP_PORT;
}
- ast_verbose("--- set_address_from_contact host '%s'\n", host);
+ if (sip_debug_test_pvt(pvt)) {
+ ast_verbose("--- set_address_from_contact host '%s'\n", host);
+ }
/* XXX This could block for a long time XXX */
/* We should only do this if it's a name, not an IP */
@@ -17662,6 +17663,17 @@
ast_set_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER); /* Delay hangup */
+ /* If we are performing an attended transfer and we have two channels involved then copy sound file information to play upon attended transfer completion */
+ if (target.chan2) {
+ const char *chan1_attended_sound = pbx_builtin_getvar_helper(target.chan1, "ATTENDED_TRANSFER_COMPLETE_SOUND"), *chan2_attended_sound = pbx_builtin_getvar_helper(target.chan2, "ATTENDED_TRANSFER_COMPLETE_SOUND");
+ if (!ast_strlen_zero(chan1_attended_sound)) {
+ pbx_builtin_setvar_helper(target.chan1, "BRIDGE_PLAY_SOUND", chan1_attended_sound);
+ }
+ if (!ast_strlen_zero(chan2_attended_sound)) {
+ pbx_builtin_setvar_helper(target.chan2, "BRIDGE_PLAY_SOUND", chan2_attended_sound);
+ }
+ }
+
/* Perform the transfer */
manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: SIP\r\nTransferType: Attended\r\nChannel: %s\r\nUniqueid: %s\r\nSIP-Callid: %s\r\nTargetChannel: %s\r\nTargetUniqueid: %s\r\n",
transferer->owner->name,
@@ -18072,7 +18084,6 @@
update_call_counter(p, DEC_CALL_LIMIT);
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
-
if (p->owner)
ast_queue_hangup(p->owner);
else
Modified: team/murf/bug11210/configs/extensions.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/configs/extensions.conf.sample?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/configs/extensions.conf.sample (original)
+++ team/murf/bug11210/configs/extensions.conf.sample Tue Mar 25 13:11:36 2008
@@ -210,7 +210,8 @@
;
; List canonical entries here
;
-;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo)
+;exten => 12564286000,1,Gosub(stdexten,s,1(6000,IAX2/foo))
+;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail
;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
[dundi-e164-customers]
@@ -376,50 +377,86 @@
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp
-[macro-stdexten];
-;
-; Standard extension macro:
-; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
+[stdexten]
+;
+; Standard extension subroutine:
+; ${ARG1} - Extension
; ${ARG2} - Device(s) to ring
-;
-exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum
-exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
-
-exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce
-exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
-
-exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce
-exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
+; ${ARG3} - Optional context in Voicemail (if empty, then "default")
+;
+; Note that the current version will drop through to the next priority in the
+; case of their pressing '#'. This gives more flexibility in what do to next:
+; you can prompt for a new extension, or drop the call, or send them to a
+; general delivery mailbox, or...
+;
+; The use of the LOCAL() function is purely for convenience. Any variable
+; initially declared as LOCAL() will disappear when the innermost Gosub context
+; in which it was declared returns. Note also that you can declare a LOCAL()
+; variable on top of an existing variable, and its value will revert to its
+; previous value (before being declared as LOCAL()) upon Return.
+;
+exten => s,1,NoOp(Start stdexten)
+exten => s,n,Set(LOCAL(ext)=${ARG1})
+exten => s,n,Set(LOCAL(dev)=${ARG2})
+exten => s,n,Set(LOCAL(cntx)=${ARG3})
+
+exten => s,n,Set(LOCAL(mbx)="${ext}"$["${cntx}" ? "@${cntx}" :: ""])
+exten => s,n,Dial(${dev},20) ; Ring the interface, 20 seconds maximum
+exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
+
+exten => s-NOANSWER,1,Voicemail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce
+exten => s-NOANSWER,n,NoOp(Finish stdexten NOANSWER)
+exten => s-NOANSWER,n,Return() ; If they press #, return to start
+
+exten => s-BUSY,1,Voicemail(${mbx},b)
+ ; If busy, send to voicemail w/ busy announce
+exten => s-BUSY,n,NoOp(Finish stdexten BUSY)
+exten => s-BUSY,n,Return() ; If they press #, return to start
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
-exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
-
-[macro-stdPrivacyexten];
-;
-; Standard extension macro:
-; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
+exten => a,1,VoicemailMain(${mbx}) ; If they press *, send the user into VoicemailMain
+ ; does this ever return?
+
+[stdPrivacyexten]
+;
+; Standard extension subroutine:
+; ${ARG1} - Extension
; ${ARG2} - Device(s) to ring
; ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority)
; ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)`
-;
-exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call screening
+; ${ARG5} - Context in voicemail (if empty, then "default")
+;
+; See above note in stdexten about priority handling on exit.
+;
+exten => s,1,NoOp(Start stdPrivacyexten)
+exten => s,n,Set(LOCAL(ext)=${ARG1})
+exten => s,n,Set(LOCAL(dev)=${ARG2})
+exten => s,n,Set(LOCAL(dontcntx)=${ARG3})
+exten => s,n,Set(LOCAL(tortcntx)=${ARG4})
+exten => s,n,Set(LOCAL(cntx)=${ARG5})
+
+exten => s,n,Set(LOCAL(mbx)="${ext}"$["${cntx}" ? "@${cntx}" :: ""])
+exten => s,n,Dial(${dev},20|p) ; Ring the interface, 20 seconds maximum, call screening
; option (or use P for databased call screening)
-exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
-
-exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce
-exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
-
-exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce
-exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
-
-exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a polite "Don't call again" script.
-
-exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a telemarketer torture script.
+exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
+
+exten => s-NOANSWER,1,Voicemail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce
+exten => s-NOANSWER,n,NoOp(Finish stdPrivacyexten NOANSWER)
+exten => s-NOANSWER,n,Return() ; If they press #, return to start
+
+exten => s-BUSY,1,Voicemail(${mbx},b) ; If busy, send to voicemail w/ busy announce
+exten => s-BUSY,n,NoOp(Finish stdPrivacyexten BUSY)
+exten => s-BUSY,n,Return() ; If they press #, return to start
+
+exten => s-DONTCALL,1,Goto(${dontcntx},s,1) ; Callee chose to send this call to a polite "Don't call again" script.
+
+exten => s-TORTURE,1,Goto(${tortcntx},s,1) ; Callee chose to send this call to a telemarketer torture script.
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
-exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
+exten => a,1,VoicemailMain(${mbx}) ; If they press *, send the user into VoicemailMain
+ ; does this ever return?
[macro-page];
;
@@ -463,7 +500,8 @@
;
exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
; (but skip if channel is not up)
-exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
+exten => 1234,n,Gosub(stdexten,s,1(1234,${GLOBAL(CONSOLE)}))
+exten => 1234,n,Goto(default,s,1) ; exited Voicemail
exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
@@ -579,9 +617,13 @@
;exten => 6391,1,Dial(JINGLE/asterisk at digium.com/mogorman at astjab.org) ;Dial via jingle using asterisk as the transport and calling mogorman.
;exten => 6394,1,Dial(Local/6275/n) ; this will dial ${MARK}
-;exten => 6275,1,Macro(stdexten,6275,${MARK}) ; assuming ${MARK} is something like Zap/2
+;exten => 6275,1,Gosub(stdexten,s,1(6275,${MARK}))
+ ; assuming ${MARK} is something like Zap/2
+;exten => 6275,n,Goto(default,s,1) ; exited Voicemail
;exten => mark,1,Goto(6275|1) ; alias mark to 6275
-;exten => 6536,1,Macro(stdexten,6236,${WIL}) ; Ditto for wil
+;exten => 6536,1,Gosub(stdexten,s,1(6236,${WIL}))
+ ; Ditto for wil
+;exten => 6536,n,Goto(default,s,1) ; exited Voicemail
;exten => wil,1,Goto(6236|1)
;If you want to subscribe to the status of a parking space, this is
@@ -604,6 +646,56 @@
;
;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg))
;
+
+; example of a compartmentalized company called "acme"
+;
+; this is the context that your incoming IAX/SIP trunk dumps you in...
+;[acme-incoming]
+;exten => s,1,Wait(1)
+;exten => s,n,Answer()
+;exten => s,n(menu),Playback(acme/vm-brief-menu)
+;exten => s,n(exten),Background(vm-enter-num-to-call)
+;exten => s,n,WaitExten(5)
+;exten => s,n(goodbye),Playback(vm-goodbye)
+;exten => s,n(end),Hangup()
+;
+;include => acme-extens
+;
+;exten => i,1,Playback(vm-invalid)
+;exten => i,n,Goto(s,exten) ; optionally, transfer to operator
+;
+;exten => t,1,Goto(s,goodbye)
+;
+; this is the context our internal SIP hardphones use (see sip.conf)
+;
+;[acme-internal]
+;exten => s,1,Answer()
+;exten => s,n(exten),Background(vm-enter-num-to-call)
+;exten => s,n,WaitExten(5)
+;exten => s,n(goodbye),Playback(vm-goodbye)
+;exten => s,n(end),Hangup()
+;
+;include => trunkint
+;include => trunkld
+;include => trunklocal
+;
+;include => acme-extens
+;
+; you can test what your system sounds like to outside callers by dialing this
+;exten => 777,1,DISA(no-password,acme-incoming)
+;
+; grouping of acme's extensions... never used directly, always included.
+;
+;[acme-extens]
+;exten => 111,1,Gosub(stdexten,s,1(111,SIP/pete_1,acme))
+;exten => 111,n,Goto(s,exten)
+;
+;exten => 112,1,Gosub(stdexten,s,1(112,SIP/nancy_1,acme))
+;exten => 112,n,Goto(s,end)
+;
+; end of acme example
+
+
; For more information on applications, just type "core show applications" at your
; friendly Asterisk CLI prompt.
;
Modified: team/murf/bug11210/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/configs/sip.conf.sample?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/configs/sip.conf.sample (original)
+++ team/murf/bug11210/configs/sip.conf.sample Tue Mar 25 13:11:36 2008
@@ -944,6 +944,8 @@
;defaultuser=goran ; Username to use when calling this device before registration
; Normally you do NOT need to set this parameter
;setvar=CUSTID=5678 ; Channel variable to be set for all calls from this device
+;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will cause the given audio file to be played
+ ; upon completion of an attended transfer
;[pre14-asterisk]
;type=friend
Modified: team/murf/bug11210/configs/voicemail.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/configs/voicemail.conf.sample?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/configs/voicemail.conf.sample (original)
+++ team/murf/bug11210/configs/voicemail.conf.sample Tue Mar 25 13:11:36 2008
@@ -305,3 +305,13 @@
;The intro can be customized on a per-context basis
;directoryintro=dir-company2
1234 => 5678,Company2 User,root at localhost
+
+; example for our acme compartmentalized company
+;
+; Pete telecommutes from Chicago, so we'll customize timestamps for him.
+;
+;[acme]
+;tz=eastern
+;111 => 7383,Pete,pete at acme-widgets.com,,tz=central
+;112 => 6262,Nancy,nancy at acme-widgets.com
+;
Modified: team/murf/bug11210/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/include/asterisk/options.h?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/include/asterisk/options.h (original)
+++ team/murf/bug11210/include/asterisk/options.h Tue Mar 25 13:11:36 2008
@@ -64,7 +64,7 @@
AST_OPT_FLAG_OVERRIDE_CONFIG = (1 << 15),
/*! Reconnect */
AST_OPT_FLAG_RECONNECT = (1 << 16),
- /*! Transmit Silence during Record() */
+ /*! Transmit Silence during Record() and DTMF Generation */
AST_OPT_FLAG_TRANSMIT_SILENCE = (1 << 17),
/*! Suppress some warnings */
AST_OPT_FLAG_DONT_WARN = (1 << 18),
Modified: team/murf/bug11210/main/app.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/main/app.c?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/main/app.c (original)
+++ team/murf/bug11210/main/app.c Tue Mar 25 13:11:36 2008
@@ -244,6 +244,7 @@
{
const char *ptr;
int res = 0;
+ struct ast_silence_generator *silgen = NULL;
if (!between)
between = 100;
@@ -257,6 +258,10 @@
/* ast_waitfor will return the number of remaining ms on success */
if (res < 0)
return res;
+
+ if (ast_opt_transmit_silence) {
+ silgen = ast_channel_start_silence_generator(chan);
+ }
for (ptr = digits; *ptr; ptr++) {
if (*ptr == 'w') {
@@ -282,6 +287,10 @@
that has occurred previously while acting on the primary channel */
if (ast_autoservice_stop(peer) && !res)
res = -1;
+ }
+
+ if (silgen) {
+ ast_channel_stop_silence_generator(chan, silgen);
}
return res;
Modified: team/murf/bug11210/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/main/asterisk.c?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/main/asterisk.c (original)
+++ team/murf/bug11210/main/asterisk.c Tue Mar 25 13:11:36 2008
@@ -2633,8 +2633,8 @@
/* Build transcode paths via SLINEAR, instead of directly */
} else if (!strcasecmp(v->name, "transcode_via_sln")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSCODE_VIA_SLIN);
- /* Transmit SLINEAR silence while a channel is being recorded */
- } else if (!strcasecmp(v->name, "transmit_silence_during_record")) {
+ /* Transmit SLINEAR silence while a channel is being recorded or DTMF is being generated on a channel */
+ } else if (!strcasecmp(v->name, "transmit_silence_during_record") || !strcasecmp(v->name, "transmit_silence")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_TRANSMIT_SILENCE);
/* Enable internal timing */
} else if (!strcasecmp(v->name, "internal_timing")) {
Modified: team/murf/bug11210/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug11210/main/channel.c?view=diff&rev=110694&r1=110693&r2=110694
==============================================================================
--- team/murf/bug11210/main/channel.c (original)
+++ team/murf/bug11210/main/channel.c Tue Mar 25 13:11:36 2008
@@ -4355,6 +4355,7 @@
for (/* ever */;;) {
struct timeval now = { 0, };
int to;
+ const char *bridge_play_sound = NULL;
to = -1;
@@ -4438,6 +4439,16 @@
pbx_builtin_setvar_helper(c1, "BRIDGEPVTCALLID", c0->tech->get_pvt_uniqueid(c0));
if (c1->tech->get_pvt_uniqueid)
pbx_builtin_setvar_helper(c0, "BRIDGEPVTCALLID", c1->tech->get_pvt_uniqueid(c1));
+
+ /* See if we need to play an audio file to any side of the bridge */
+ if ((bridge_play_sound = pbx_builtin_getvar_helper(c0, "BRIDGE_PLAY_SOUND"))) {
+ bridge_playfile(c0, c1, bridge_play_sound, 0);
+ pbx_builtin_setvar_helper(c0, "BRIDGE_PLAY_SOUND", NULL);
+ }
+ if ((bridge_play_sound = pbx_builtin_getvar_helper(c1, "BRIDGE_PLAY_SOUND"))) {
+ bridge_playfile(c1, c0, bridge_play_sound, 0);
+ pbx_builtin_setvar_helper(c1, "BRIDGE_PLAY_SOUND", NULL);
+ }
if (c0->tech->bridge &&
(c0->tech->bridge == c1->tech->bridge) &&
More information about the svn-commits
mailing list