[Asterisk-Users] How to delay dialing
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Jan 30 22:33:36 MST 2004
On Friday 30 January 2004 20:05, Terence Parker wrote:
> > 1) The 'W' character is only for the zaptel channel.
> > 2) It's case insensitive (i.e. it does NOT need to be uppercase).
> > See line 2387 of zaptel.c if you'd like to confirm this for
> > yourself. 3) There is no current way within Asterisk to insert a
> > pause into the Voicetronix driver.
> > 4) There is no current way within Asterisk to insert a flash-hook
> > into the Voicetronix driver.
> > 5) The solution for 3 and 4 is attached. This patch will allow
> > you to use the 'w' OR the 'W' character to insert a pause and to
> > use the 'f' or 'F' character to insert a flash-hook. Please note
> > (VERY IMPORTANT): in the Voicetronix driver, the pause is 1.0
> > seconds, not 0.5 seconds, like it is in the Zaptel driver.
>
> I have tried applying your patch, but unfortunately get the following
> compilation errors:
New patch attached. Let's see if I can upset the Avaya virus detector
with this attachment (again).
> Looking at the patch file, am I correct in assuming then that the
> Voicetronix OpenLine4 does in fact support the comma and ampersand
> characters - but that it's just a matter of getting the asterisk's
> chan_vpb to translate the use of 'w' and 'f' to ',' and '&'
> respectively for the Voicetronix API?
That's correct. My patch simply allows the features to be used in
Asterisk.
-Tilghman
-------------- next part --------------
Index: channels/chan_vpb.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_vpb.c,v
retrieving revision 1.12
diff -u -r1.12 chan_vpb.c
--- channels/chan_vpb.c 9 Dec 2003 23:55:17 -0000 1.12
+++ channels/chan_vpb.c 31 Jan 2004 05:27:04 -0000
@@ -681,13 +681,26 @@
{
struct vpb_pvt *p = (struct vpb_pvt *)ast->pvt->pvt;
int res = 0;
- char *s = strrchr(dest, '/');
+ char *s = strrchr(dest, '/'), *t;
if (s)
s = s + 1;
else
s = dest;
+ /* We cannot use either the & or the , in a Dial string, as these
+ * characters are used to signal 1) different concurrent technologies,
+ * or 2) separation of application arguments. Therefore, this channel
+ * driver should translate the w (for a pause) to the , and the f (for
+ * a flash-hook) to a &. */
+
+ for (t = s; t != '\0' ; t++) {
+ if ((*t == 'w') || (*t == 'W'))
+ *t = ',';
+ else if ((*t == 'f') || (*t == 'F'))
+ *t = '&';
+ }
+
if (ast->_state != AST_STATE_DOWN && ast->_state != AST_STATE_RESERVED) {
ast_log(LOG_WARNING, "vpb_call on %s neither down nor reserved!\n",
ast->name);
More information about the asterisk-users
mailing list