[Asterisk-Users] Re: Custom handling of SIP 302 redirect?

Steve Davies davies147 at gmail.com
Mon Oct 24 07:02:51 MST 2005


On 10/21/05, Steve Davies <davies147 at gmail.com> wrote:
>
> I have noticed that when a SIP redirect is sent back to Asterisk by a
> SIP peer, that Asterisk will (quite appropriately) do a
> Dial(LOCAL/redirect-number) in the context of the original callee.
>
> It also forks the CDR, which is excellent. Sadly, under these
> circumstances, I need to alter the caller-ID to be a valid value, set
> the 'src' to be the correct extension no., and set the accountcode to
> something recognisable as an outbound call by that user.
>

I have managed to get part-way through this problem... It seems that
ACCOUNTCODE persists across the dial, so I can set that to a
meaningful value most of the time, and use the data later for billing,
sadly this is only a small (20 character) field, so I can only
transfer a limited amount of data.

Other fields such as userdata do not persist, and variables that are
set in the dialplan do not stay in-scope either. Can anyone suggest
another mechanism for passing data across?

Perhaps this should be raised as a feature-request such that the
caller-ID field is populated from the SIP client that sends the
redirect? Looking at the source I expected this to happen already, but
it is a fairly complex interaction.

Kind regards,
Steve



More information about the asterisk-users mailing list