When you use a custom context in your extension_custom.conf file the conext has to be named custom as well, So it would be:
[custom-from-pstn-mck]
exten => s,1,answer
exten => s,2,SetCallerID(McKesson)
exten => s,3,dial(SIP/5005&SIP/5000,25,tr)
exten => s,3,Goto(aa_2,s,1)
Next read this:
There are three different kind of groups in Asterisk:
(1) group=blah
This is used to bundle (typically trunk) interfaces together so that you can use something like Dial,Zap/g2/.... to use any of the channels in group 2.
(2) callgroup=blah
This is a list of group memberships that you belong to for call pickup purposes
(3) pickupgroup=blah
This is a list of groups that you are permitted to pickup in.
For #2 and #3, basically, you just dial *8# and you can pickup a ringing phone if you have a group in your pickupgroup that is in their callgroup.
hint: pickupgroup is for FXS interfaces while callgroup is for FXO interfaces.
--------------------------------------------------------------------------------
group has nothing to do with either callgroup or pickupgroup.
callgroup is a group of incoming "calls".
pickupgroup is for membership purposes.
A channel that belongs to a pickupgroup, can pickup all incoming calls on the same callgroup by hitting *8#.
A channel can belong to multiple pickupgroup's, ie:
pickupgroup=1,2,3
This channel would then be able to pickup calls on callgroup 1, 2 or 3 by hitting *8#.
You can change *8 to something else - see Asterisk config features.conf
--------------------------------------------------------------------------------
group =
sets the group membership for all channels beneath where you define it.
group =
can be a single group or a list of groups.
For example:
group = 1
channel => 1-4
group = 1,2
channel => 5-6
group = 2,3
channel => 7-8
group = 4
channel => 9-12
group =
channel => 13-16
Channnels 1-4 are in just group 1.
Channels 5 and 6 are in groups 1 and 2.
Channels 7 and 8 are in groups 2 and 3.
Channels 9-12 are in group 4, and
Channels 13-16 are in no groups... so...
1,1,Dial,Zap/g1...
would give you the first channel in the range 1-6 that was available.
1,1,Dial,Zap/g2...
would give you the first channel in the range 5-8 that was available.
1,1,Dial,Zap/g3...
would give you the first channel in the range 7-8 that was available
1,1,Dial,Zap/g4...
would give you the first channel in the range 9-12 that was available.
So, to simplify:
[from-pstn-mck]
exten => s,1,answer
exten => s,2,SetCallerID(McKesson)
exten => s,3,dial(SIP/5005&SIP/5000,25,tr)
exten => s,3,Goto(aa_2,s,1)
would be:
[custom-ring-group] #wyou don't need to answer like above, unless you plan to use sound files.
exten => s,1,dial(SIP/5005&SIP/5000,25,tr)
exten => t,2,Hangup #or you can send them to voice mail etc....
Then include
include => custom-ring-group
to your from-pstn context in extensions.conf