Hi all,

i'm trying to setup a function like "secretary/director": when an user
call director number (eg. 5000), the call were firstly diverted to
secretary (5001). At this point, when secretary answer, can decide to
transfer back the call to director (5000).

Because i'm using OpenSIPS as SIP router, when this function is needed i
did a special "extension" like DIVERT_[from]_[to]:

; On DIVERT
exten => _DIVERT_.,1,Noop("from-voip: DIVERT ${CALLERID(num)} -
${EXTEN}") ; Example: DIVERT_5000_5001
exten => _DIVERT_.,n,Set(DIVFrom=${CUT(EXTEN,_,2)})
exten => _DIVERT_.,n,Set(DIVTo=${CUT(EXTEN,_,3)})
exten => _DIVERT_.,n,Noop("Divert ${CALLERID(num)} from ${DIVFrom} to
${DIVTo}")
exten => _DIVERT_.,n,Macro(services-divert) // Divert
exten => _DIVERT_.,n,Hangup()

and a macro like:

[macro-services-divert] ; Servizio direttore-segretaria
exten => s,1,Noop("Divert from ${CALLERID(num)}")
same  => n,Answer
same  => n,Playback(msg/msg_attendereufficiodesiderato)
same  => n,Dial(SIP/voip-trunk/${DIVTo},30)

It works *BUT* when from the secretary phone the call were forwarded
back to director (and, at this point, director phone must ring !), the
call stall with an error on OpenSIPS like:

In-Dialog NOTIFY from [my asterisk box ip]
(callid=707902a659eb005b141a9491195bd3cf@voip) is not valid according to
dialog

Any hits ?

Michele

-- 
Michele Pinassi
Responsabile Telefonia di Ateneo
Servizio Reti, Sistemi e Sicurezza Informatica - Università degli Studi di Siena
tel: 0577.(23)5000 - central...@unisi.it

Per trovare una soluzione rapida ai tuoi problemi tecnici consulta le FAQ di 
Ateneo, http://www.faq.unisi.it 


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to