[Asterisk-Users] FW: Limit incoming calls to SIP Channels

Ryan Courtnage ryan at voxbox.ca
Fri Jul 30 03:10:00 MST 2004


On July 30, 2004 03:40 pm, Daniel Niasoff wrote:
> Hi All,
>
> Can someone please tell me how to limit incoming calls to SIP channels
> using the SetGroup & Checkgroup command. I don't want any call waiting on
> SIP channels and you are somehow meant to be able to do it with these
> commands.

It's on the wiki @ http://voip-info.org/wiki-Asterisk+cmd+SetGroup

One thing I do is ensure I increment the the GROUPCOUNT for both the caller 
and callee, to ensure the callee doesn't get a 2nd call while on the phone.

Do it something like:

[sip-phones]

; increment GROUPCOUNT for the calling exten
exten => 200,1,SetGroup(${CALLERIDNUM}) 

; increment GROUPCOUNT for exten you are calling
exten => 200,2,SetGroup(${EXTEN})

; ensure this is the 1st call to this exten 
exten => 200,3,CheckGroup(1)

; dial if we make it this far
exten => 200,4,Dial(200)

; CheckGroup jumped here, 200 is on the phone
exten => 200,104,Busy


You will also want to ensure you SetGroup(${CALLERIDNUM}) before dialing any 
outgoing numbers as well (to PSTN,etc). ie:

[outbound-local]
exten => _9NXXXXXX,1,SetGroup(${CALLERIDNUM})
....

Cheers
Ryan



More information about the asterisk-users mailing list