[asterisk-dev] An idea: Interception macro for registering overlap dialling

Pavel Troller patrol at sinus.cz
Tue May 8 22:47:34 CDT 2012


Hi Richard!

> > Hi!
> >   Thanks to Richard's help with my recent (rather stupid) question
> >   regarding
> > the Connected Party Number handling, I've familiarized using the
> > Interception
> > Macros for this purpose and I am very happy with them.
> >   I think I have an idea for further usage of such a kind of macro:
> >   to
> > register the digits bridged in the overlap dialling process.
> >   Let's assume a scenario, where an outgoing call is made to a trunk
> >   allowing
> > overlap dialling (say, DAHDI/PRI) from a technology allowing overlap
> > receiving
> > (say DAHDI/analog or PRI, IAX2, SIP with allowoverlap=dtmf etc.). The
> > example
> > dialplan entry would be very simple, say
> > exten => 9,1,Dial(DAHDI/i2)
> 
> exten => _9!,1,Dial(DAHDI/g1/${EXTEN:1})
> is a better way to do the overlap dialing for ISDN.

Of course. In my environment, I'm using relatively sophisticated "destination"
macros, which allow to specify various numeric conversions of the called as
well as calling numbers, minimum and maximum dialled number lengths, the
dialling type (enbloc/overlap) etc, and they are called exactly like your
Dial example. In my very stupid example I wanted to emphasize, that ONLY
overlap dialling will be possible.

> 
> > so immediately after receiving the extension code, the connection is
> > made
> > (the caller can hear the external dial tone) and further dialling is
> > then
> > transferred in overlap mode.
> >   In current Asterisk implementation (1.8), I don't know about a
> >   method, how to
> > bring the dialled digits to the Asterisk's "consciousness", they are
> > just
> > being bridged automatically but they don't appear anywhere (neither
> > in CDR
> > nor in CEL) and they cannot be retrieved even after the call is hung,
> > for
> > example using the "h" extension.
> >   If there would be an interception macro, which would trigger for
> >   every digit
> > being bridged, it would be possible to populate all the necessary
> > places with
> > them (custom CDR fields, database entries for "Last Number Redial"
> > feature etc.).
> > The digit(s) could be passed to the macro by means of a special
> > variable.
> > How complex would it be to add such a possibility ? I've looked at
> > the sources,
> > but the internal code path, which is used to transfer the signalling
> > including
> > the overlap dialling events, is too complex for me to even find a
> > good place,
> > where such a feature could be inserted to the code.
> >   Please note that I don't want to register any DTMF going over the
> >   answered
> > connection, what I want is just the overlap dialling phase (i.e.
> > before the call
> > is answered or the Proceeding event is received in the backward
> > direction).
> >   Is this idea at least partially feasible, or is this just a junk ?
> >   Or am I stupid again and is this already handled somehow and just
> >   I'm such an
> > idiot that I don't know about it ?
> >   With regards,
> >     Pavel
> 
> The best place to do what you are asking is in app_dial.c since what you
> are asking for is before a call is answered and the channels are bridged
> together.  After a call is bridged there are frame hooks available to
> modules to intercept frames passed over the bridge.  The FRAME_TRACE
> application uses frame hooks to show you the control frames passing
> over a bridge.

Ohh, what a beatiful function I've never heard of! It's a perfect signalling
tracer! OK, I will analyse this function and what it sets internally and I
hope that I will be able to utilize it for my purpose. Many thanks for your
valuable help!

> 
> Richard

With regards,
  Pavel



More information about the asterisk-dev mailing list