Hi @ll,

I have got the following setup:

I have got an incoming ISDN-line that connects to an old proprietary PBX (elmeg). Several analogue phones are connected to the elemeg.

A small machine that runs Asterisk is connected to the elmeg pbx by ISDN-cable using an AVM Fritz!ISDN PCI-card.
I currently use asterisk to connect to using IAX to make and receive calls. This works very nicely.
Now I wanted to make use of asterisk’s voice mail system. This works nicely as well:

[quote=“extensions.conf”]exten => 31,1,Dial(IAX2/2000&SIP/2000,30)
exten => 31,2,VoiceMail(2000)[/quote]

BUT: If there are no IAX-phones registered at Asterisk, the Dial(IAX2/2000&SIP/2000,30) command will finish immediately and the voice mail system takes over, not giving me a chance to answer the call with one of my analogue phones that are connected to the elmeg pbx that asterisk of course does not know of.
I tried using something like:
to redirect Asterisk to a Wait()-call, but this lead to the isdn-connection to the elmeg pbx being terminated early.

I found this thread which looked to my very promising at first, but I could not get this to work on my machine. Especiall I do not understand how this: “SIP/dummy60@callback” is going to help. It connects to the non existing SIP-Server “callback” which fails immediately…?

Any hints and ideas greatly appreciated :smile:.

EDIT: I found a solution. This does the trick:

[quote=“extensions.conf”]exten => 31,1,Dial(IAX2/2000&SIP/2000,30)
exten => 31,2,GotoIf($[ ${DIALSTATUS} = CHANUNAVAIL ]?unavailable:voicemail)
exten => 31,3(unavailable),Ringing()
exten => 31,4,Wait(30)
exten => 31,5(voicemail),VoiceMail(2000)