[asterisk-dev] What chan->dialcontext is intended for?

lumen lumen at bulma.net
Fri Sep 21 04:22:18 CDT 2007


Hi guys:

I'm diving into the code of dial.c.

I'm don't understand for what dialcontext is intended for in the channel
structure.

I see that is used in the pickup logic. In source code of
app_directed_pickup.c, I can see that dialcotext is used to decide the
channel we want to pickup:


00099  if ((!strcasecmp(target->macroexten, exten) || !strcasecmp(target->exten, exten)) &&
00100      !strcasecmp(target->dialcontext, context) &&
00101      can_pickup(target)) {

           do the pickup

       }

But the definition of the dialcotext variable in channel structure is:

Dial: Extension context that we were called from

When 'dialcontext' and 'context' variable will differ?



More information about the asterisk-dev mailing list