Made able to process PRI subcommands for more events.
Moved the PRI subcommand processing to a common routine.
................
r197103 | root | 2009-05-27 11:19:53 -0500 (Wed, 27 May 2009) | 13 lines
The bridge was terminating immediately after the attended transfer was
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.
Use a different determinator on whether to print the delimiter, since leading fields may be blank.
(closes issue #15208)
Reported by: ramonpeek
Patch by me, though inspired in part by a patch from ramonpeek
........
................
r197260 | seanbright | 2009-05-27 15:08:16 -0500 (Wed, 27 May 2009) | 6 lines
Since we use bashisms in build_tools/mkpkgconfig, we should call on bash
explicitly when running from the Makefile.
Adding some generic handling of error codes sent to us in replys to requests.
Previously they always set hangupcause 0, which is generally wrong. With this
change, we're setting some generic hangup causes. For 5xx errors, which indicate
some sort of problem with the remote server, we're now setting CONGESTION.
datafiles: _all
- if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+ if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" bash build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
# Should static HTTP be installed during make samples or even with its own target ala
# webvoicemail? There are portions here that *could* be customized but might also be
# improved a lot. I'll put it here for now.
ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ dahdi_pri_handle_subcmds(pri, chanpos, e->e, e->answer.channel,
+ e->answer.subcmds);
/* Now we can do call progress detection */
/* We changed this so it turns on the DSP no matter what... progress or no progress.
@@ -15263,8 +15313,8 @@
unsigned int state;
int i;
- for (i = 0; i < e->hangup.subcmds.counter_subcmd; i++) {
- struct pri_subcommand *subcmd = &e->hangup.subcmds.subcmd[i];
+ for (i = 0; i < e->hangup.subcmds->counter_subcmd; i++) {
+ struct pri_subcommand *subcmd = &e->hangup.subcmds->subcmd[i];
switch (subcmd->cmd) {
case PRI_SUBCMD_CC_ERROR:
@@ -15328,6 +15378,8 @@
int i;
ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ dahdi_pri_handle_subcmds(pri, chanpos, e->e, e->hangup.channel,
+ e->hangup.subcmds);
if (!pri->pvts[chanpos]->alreadyhungup) {
/* we're calling here dahdi_hangup so once we get there we need to clear p->call after calling pri_hangup */
pri->pvts[chanpos]->alreadyhungup = 1;
@@ -15381,8 +15433,8 @@
ast_mutex_lock(&pri->pvts[chanpos]->lock);
}
#endif
- for (i = 0; i < e->hangup.subcmds.counter_subcmd; i++) {
- struct pri_subcommand *subcmd = &e->hangup.subcmds.subcmd[i];
+ for (i = 0; i < e->hangup.subcmds->counter_subcmd; i++) {
+ struct pri_subcommand *subcmd = &e->hangup.subcmds->subcmd[i];
Modified: team/group/issue14292/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14292/channels/chan_sip.c?view=diff&rev=197334&r1=197333&r2=197334
==============================================================================
--- team/group/issue14292/channels/chan_sip.c (original)
+++ team/group/issue14292/channels/chan_sip.c Wed May 27 17:03:23 2009
@@ -5698,6 +5698,16 @@
case 606: /* Not acceptable */
return AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
default:
+ if (cause < 500 && cause >= 400) {
+ /* 4xx class error that is unknown - someting wrong with our request */
+ return AST_CAUSE_INTERWORKING;
+ } else if (cause < 600 && cause >= 500) {
+ /* 5xx class error - problem in the remote end */
+ return AST_CAUSE_CONGESTION;
+ } else if (cause < 700 && cause >= 600) {
+ /* 6xx - global errors in the 4xx class */
+ return AST_CAUSE_INTERWORKING;
+ }
return AST_CAUSE_NORMAL;
}
/* Never reached */
Modified: team/group/issue14292/configs/chan_dahdi.conf.sample
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14292/configs/chan_dahdi.conf.sample?view=diff&rev=197334&r1=197333&r2=197334
==============================================================================
--- team/group/issue14292/configs/chan_dahdi.conf.sample (original)
+++ team/group/issue14292/configs/chan_dahdi.conf.sample Wed May 27 17:03:23 2009
@@ -713,8 +713,9 @@
;progzone=uk
;
; Set the tonezone. Equivalent of the defaultzone settings in
-; /etc/dahdi.conf . This sets the tone zone by number.
-; Note that you'd still need to load tonezones (loadzone in dahdi.conf).
+; /etc/dahdi/system.conf. This sets the tone zone by number.
+; Note that you'd still need to load tonezones (loadzone in
+; /etc/dahdi/system.conf).
; The default is -1: not to set anything.
;tonezone = 0 ; 0 is US
;
@@ -1147,7 +1148,7 @@
; Configuration Sections
; ~~~~~~~~~~~~~~~~~~~~~~
-; You can also configure channels in a separate dahdi.conf section. In
+; You can also configure channels in a separate chan_dahdi.conf section. In
; this case the keyword 'channel' is not used. Instead the keyword
; 'dahdichan' is used (as in users.conf) - configuration is only processed
; in a section where the keyword dahdichan is used. It will only be
@@ -1167,7 +1168,7 @@
;
; When starting a new section almost all of the configuration values are
; copied from their values at the end of the section [channels] in
-; dahdi.conf and [general] in users.conf - one section's configuration
+; chan_dahdi.conf and [general] in users.conf - one section's configuration
; does not affect another one's.
;
; Instead of letting common configuration values "slide through" you can
Modified: team/group/issue14292/configs/extensions.conf.sample
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14292/configs/extensions.conf.sample?view=diff&rev=197334&r1=197333&r2=197334
==============================================================================
--- team/group/issue14292/configs/extensions.conf.sample (original)
+++ team/group/issue14292/configs/extensions.conf.sample Wed May 27 17:03:23 2009
@@ -131,8 +131,8 @@
TRUNK=DAHDI/G2 ; Trunk interface
;
; Note the 'G2' in the TRUNK variable above. It specifies which group (defined
-; in dahdi.conf) to dial, i.e. group 2, and how to choose a channel to use in
-; the specified group. The four possible options are:
+; in chan_dahdi.conf) to dial, i.e. group 2, and how to choose a channel to use
+; in the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy DAHDI channel
; (aka. ascending sequential hunt group).
;autocontext=line1 ; This supports automatic generation of the dialplan entries
; if the autocontext option is used. Each trunk should have
- ; a unique context name. Then, in dahdi.conf, this device
+ ; a unique context name. Then, in chan_dahdi.conf, this device
; should be configured to have incoming calls go to this context.
;ringtimeout=30 ; Set how long to allow this trunk to ring on an inbound call before hanging
[interfaces]
; Specify serial ports to listen for SMDI messages on below. These will be
-; referenced later in dahdi.conf. If you do not specify any interfaces then
-; SMDI will be disabled. Interfaces can have several different attributes
+; referenced later in chan_dahdi.conf. If you do not specify any interfaces
+; then SMDI will be disabled. Interfaces can have several different attributes
; associated with them.
; Set the number of stop bits to use per character here. The default is no,
Modified: team/group/issue14292/configs/vpb.conf.sample
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14292/configs/vpb.conf.sample?view=diff&rev=197334&r1=197333&r2=197334
==============================================================================
--- team/group/issue14292/configs/vpb.conf.sample (original)
+++ team/group/issue14292/configs/vpb.conf.sample Wed May 27 17:03:23 2009
@@ -97,8 +97,8 @@
;
; NOTE that other caller ID standards are supported in Asterisk, but are
; not yet active in chan_vpb. It should be reasonably trivial to add
-; support for the other standards (see the default dahdi.conf for a list
-; of them) that Asterisk already handles.
+; support for the other standards (see the default chan_dahdi.conf for a
+; list of them) that Asterisk already handles.
;
callerid=bell
Modified: team/group/issue14292/funcs/func_cut.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/issue14292/funcs/func_cut.c?view=diff&rev=197334&r1=197333&r2=197334
==============================================================================
--- team/group/issue14292/funcs/func_cut.c (original)
+++ team/group/issue14292/funcs/func_cut.c Wed May 27 17:03:23 2009
@@ -186,6 +186,7 @@
if (ast_str_strlen(str)) {
int curfieldnum = 1;
char *tmp2 = ast_str_buffer(str);
+ int firstfield = 1;
while (tmp2 != NULL && args.field != NULL) {
char *nextgroup = strsep(&(args.field), "&");
int num1 = 0, num2 = INT_MAX;
@@ -222,7 +223,8 @@
/* Output fields until we either run out of fields or num2 is reached */
while (tmp2 != NULL && curfieldnum <= num2) {
char *tmp3 = strsep(&tmp2, ds);
- ast_str_append(buf, buflen, "%s%s", ast_str_strlen(*buf) ? ds : "", tmp3);
+ ast_str_append(buf, buflen, "%s%s", firstfield ? "" : ds, tmp3);
+ firstfield = 0;
curfieldnum++;
}
}
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum