[asterisk-users] Need help for transfer
Robert Lister
robl at linx.net
Wed Dec 3 12:01:05 CST 2008
On Tue, Dec 02, 2008 at 05:04:25PM +0530, Max Alex wrote:
> Hi All,
> I need to stop the transfer feature on particular sip user.
> I am using linksys phone and it has set the forwarding enable to another
> user.
> I have three users 2101, 2102, 2103.
> 2102 is registered in linksys phone with forwarding enable to 2103.
> But is there any procedure in asterisk that we can not allow 2102 not to
> forward on 2103.
> and also i want to prevent the SIP/2.0 302 Moved Temporarily.
> please advice me that how can we set the user for not to forward or transfer
> on 2103.
> i have tested with allowtransfer=no in sip.
I'm a bit confused as to what you are asking as you mention two things,
call forwarding, and transfer.
I take this to mean call forwarding (aka divert) is where one handset
is set up to divert its incoming calls to another handset.
Transfer is where the user has answered the call, and then wants to
transfer an active call to another extension.
To make matters more interesting, there are multiple ways to do both
forwarding and transfer, depending on your configuration. Both can be done
either by the handset, or by asterisk doing it in-band (if you so configure
it in features.conf, and asterisk is actually in the media path.)
You don't mention what model Linksys phone you are using, but it may be
possible to disable the Call forward features, or to lock it so that the
number can't be set or changed by the user.
That might be sufficient, or you may want the user to be able to forward
their phone to other numbers, just not 2103. This might be slightly harder
to achieve, but you might be able to arrange that the SIP accounts are in
different contexts in sip.conf / extensions.conf such that the context that
2102 is in, does not include 2103, or just responds with Congestion() or
some error tone when 2103 is called, and so 2102 won't be able to actually
dial 2103, and hence the divert/transfer won't work either.
If 2102 actually needs to be able to dial 2102, or you have some other "call
group" problems, then maybe what you want is to have your dialplan calls
come in to Queue or Agent or Local device instead of a SIP device, then you
may have a bit more control over it in the dialplan. (You can't transfer
calls to an Agent.) But this might break too much other functionality you
want to keep (call waiting etc.)
Another approach would be to disable the call forward features on all the
handsets and put in some dialplan logic that uses astdb or some other source
to process call diverts.
This is what I do, so it would be fairly trivial to put in some dialplan
logic in extensions.conf, if I wanted to, to prevent certain users from
being able to divert to certain other users. (Users have to use a little web
interface or phone interface to set up their divert destinations on the
server.)
I'm not sure how you could easily prevent a call transfer from the handset
for one specific destination though.
If you were really desperate you could disable the handset's local transfer
features (if the handset allows that) and do all transfers with asterisk
(#1 / #2 etc.) Then you could control by using the callerID and
${TRANSFER_CONTEXT} what transfers to where. This would mean, however, that
asterisk would have to stay in the media path for all calls to do with that
handset, which could make it slightly less efficient in some setups, (say
for example the server is remote to the handset in a different site. A call
between two handsets even in the same site, would have the media path going
via asterisk in another site.)
You might be able to monitor the number of concurrent SIP channels the
handset can have (maybe see GROUP() variable or various other sip options
for limiting maximum number of channels) Then have some logic that does not
allow the second extension to be called if the first extension has 1 or more
calls in progress (the assumption being that the first extension is trying
to transfer to the second one.)
Anyone else think of some nicer ways to do this?
More information about the asterisk-users
mailing list