[Asterisk-Users] How to delay dialing
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Jan 30 10:29:27 MST 2004
On Friday 30 January 2004 10:15, Walker Haddock wrote:
> On Thu, Jan 29, 2004 at 04:10:42PM -0800, David Liu wrote:
> > Hi there,
> >
> > I am trying to delay sending out DTMF from Voicetronix OpenLine4
> > to the CO line. The reason being is that Voicetronix sends out
> > the DTMF too fast even before the line is fully established with
> > the carrier. Usually when dialing an 8 digit number, only 7
> > digits are actually successfully heard by the carrier.
> >
> > Currently, my dial plan is:
> > exten => _9.,1,Dial(vpb/1-1/${EXTEN:1})
> >
> > Daniel said to insert a , before the numbers. I am not too sure
> > where to insert it. I tried
> > exten => _9.,1,Dial(vpb/1-1/,${EXTEN:1}) and that seems to be
> > cause a parsing error.
> >
> > Anybody has any ideas for a hack?
> >
> > David
>
> The token to insert a pause is `W` (must be upper case). Try this:
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.
-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 30 Jan 2004 17:27:28 -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, '/'), char *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