[Asterisk-Dev] Redirection reason

Kristian Nielsen kn at sifira.dk
Tue Sep 27 06:08:39 MST 2005


"Kevin P. Fleming" <kpfleming at digium.com> writes:

> Kristian Nielsen wrote:
> 
> > I just wanted to mention this now in case anyone had any input or
> > preferences on how it should be done, for example to make sure it works
> > with any other protocols that might have this information available.
> 
> I believe that Zaptel and libpri are already capturing and passing
> this information up into chan_zap, so you should have what you need to
> make it available via channel variables.

Ok, thanks Kevin I found it. In chan_zap, it sets the PBX channel
variable PRIREDIRECTREASON to some string value.

This is different from how things like callerid and RDNIS (redirecting
number) are handled. These are stored in the 'struct ast_callerid cid'
embedded in struct ast_channel, and accessible from the dialplan with
functions/magic variables.

The advantage of storing in chan->cid is that when a call is bridged to
another channel, say with Dial(...), the information is copied over and
thus available to the channel driver in the new channel. This is not
true of channel variables like PRIREDIRECTREASON.

It wasn't clear to me from you message: Would you accept a patch that
added redirect reason to struct ast_callerid, or would you prefer to
stick to the PRIREDIRECTREASON variable, with the limitation that
entails?

[We have the need to pass redirect reason between two different channel
drivers we are writing, and I thought adding to struct ast_callerid was
the cleanest way.]

 - Kristian.

-- 
Kristian Nielsen   kn at sifira.dk
Development Manager, Sifira A/S




More information about the asterisk-dev mailing list