[asterisk-users] Only secretary can call the boss, all othersonly reach the

Yuan LIU yliu11 at hotmail.com
Fri Mar 16 15:02:25 MST 2007


>From: Ricardo Carvalho <rjcarvalho at reit.up.pt>
>Date: Fri, 16 Mar 2007 13:41:49 +0000
>
>With Ioan suggestion it still doesn't work, because Asterisk still thinks 
>that the INVITE sent as consequence of the REFER message isn't correlated 
>with a transferred call coming from the secretary.

Your requirement that the secretary only press the phone's built-in transfer 
key makes Asterisk out of the loop, as SIP requires that a proxy do not act 
on REFER, and that the agent receiving REFER do not treat REFER-to in any 
special way.

To force the secretary to use an Asterisk-defined key sequence, you can 
disable the phone's feature keys.  Alas!  Only if hard phone manufacturers 
allow us to reprogram these keys.

On the other hand, you can still use Jonathan's method, to change the boss' 
real extension.  If there's a special reason why this can't be done, I can 
think of a really crooked method to do what you want:

. Retrain your secretary to "transfer" call to boss to a special extension, 
say boss_xfer, instead of to boss_extension.
. In boss_xfer, set some special variable or SIP header before 
Dial(Local/s at boss_extension).
. In boss_extension, check for this special viable or SIP header before 
really dialing boss' phone.
. Keep boss_xfer a top secret.

Yuan Liu

>I've also tried to do it using different contexts, but it still doesn't 
>work. I've done like this:
>[default]
>exten => secretary_extension,1,Dial(SIP/secretary_extension)
>exten => boss_extension,1,Dial(SIP/secretary_extension)
>[secretary]
>include => default
>exten => boss_extension,1,Dial(SIP/boss_extension)
>
>The problem seems to be that in either case, Asterisk doesn't keep the 
>state of the call, to know that if transferred from the secretary, the 
>server should let it pass to the boss and not redirecting it back to the 
>secretary.
>May this be solved with Transfer([Tech/]dest[|options])? And is it the only 
>way to do it? Can't it be done with normal "transfer" key that the phones 
>I've deployed have?
>
>
>Any other ideas?!
>Thanks,
>Ricardo.
>
>Ioan Indreias wrote:
>>Maybe you could use something like:
>>
>>exten => 
>>boss_ext,1,GotoIf($[${CALLERID(number)}=secretary_ext]?boss:secretary)
>>exten => boss_ext,n(boss),Dial(SIP/boss_ext)
>>exten => boss_ext,n(secretary),Dial(SIP/secretary_ext)
>>
>>## nini @ www.modulo.ro ##
>>
>>Jonathan k. Creasy wrote:
>>>Why don't you just give the secretary the boss' REAL extension and give a 
>>>different extension to the world that just rings the secretary?
>>>-jonathan
>>>
>>>
>>>>-----Original Message-----
>>>>From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
>>>>bounces at lists.digium.com] On Behalf Of Ricardo Carvalho
>>>>Sent: Friday, January 26, 2007 12:13 PM
>>>>To: Asterisk Users Mailing List - Non-Commercial Discussion
>>>>Subject: [asterisk-users] Only secretary can call the boss, all others
>>>>only reach the secretary when dial the boss extension
>>>>
>>>>Dear all,
>>>>
>>>>How may I configure my extensions.conf so that only the boss's secretary
>>>>can call the boss through his extension, all others when dial his
>>>>extension only makes the boss's secretary phone ring, not his. If she
>>>>wants, she can transfer the incoming call to the boss dialling his
>>>>extension.
>>>>
>>>>I've tried the following, but it doesn't work:
>>>>
>>>>exten => _boss_extension/callerid_secretary,1,Dial(SIP/boss_extension)
>>>>exten => _boss_extension,1,Dial(SIP/secretary_extension)
>>>>
>>>>This doesn't work because when the secretary tries to transfer the call
>>>>to the boss (using her phone's transfer key, not #), one REFER SIP
>>>>message is sent back to the caller's phone providing him the new address
>>>>for whom the next INVITE should be sent. That INVITE is sent, but when
>>>>reaches Asterisk, that INVITE matches this line:
>>>>
>>>>exten => _boss_extension,1,Dial(SIP/secretary_extension)
>>>>
>>>>and not this one:
>>>>
>>>>exten => _boss_extension/callerid_secretary,1,Dial(SIP/boss_extension)
>>>>
>>>>Any ideas of how may I solve this issue?
>>>>Regards,
>>>>Ricardo.




More information about the asterisk-users mailing list