[Asterisk-Users] Problem with Wait() and chan_capi-cm?

Armin Schindler armin at melware.de
Sun Feb 12 02:31:59 MST 2006


On Sun, 12 Feb 2006, Florian Heer wrote:
> Hi!
> 
> I am playing around with Asterisk and have a problem :-)
> (Asterisk-version: 1.2.4, chan_capi-cm-version: 0.6.4)
> I have a sip-phone at my desk and an ISDN-phone (independent of the
> Asterisk-server) in my living room, when I'm not at my desk, the sip-phone is
> switched off. I would like to be able to accept calls at both phones (when
> available) and have Voicemail kick in if I don't answer. The 'normal'
> extension would be something like this:
> 
> exten => 12345,1,Dial(SIP/me,30)
> exten => 12345,2,VoiceMail(su12345)
> 
> Works fine as long as the sip-phone is available, if it is not, it is flagged
> congested/busy, so the next extension would be 102, if I wanted VoiceMail to
> kick in in that case, this works:
> exten => 12345,1,Dial(SIP/me,30)
> exten => 12345,2,VoiceMail(su12345)
> exten => 12345,102,VoiceMail(su12345)
> 
> But that is not, what I had in mind, I would like to have 30 seconds to get to
> the phone, so in theory, this should do the trick:
> exten => 12345,1,Dial(SIP/me,30)
> exten => 12345,2,VoiceMail(su12345)
> exten => 12345,102,Wait(30)
> exten => 12345,103,VoiceMail(su12345)
> 
> But Asterisk can not take over the line after the wait.
> 
> To test, if the Wait was the problem, I created this:
> exten => 12345,1,Wait(10)
> exten => 12345,2,Answer()
> exten => 12345,3,Milliwatt()
> 
> And still: Asterisk can't take over the ISDN line. The console output says:
> == ISDN1: Incoming call '12345' -> '12345'
> -- Executing Wait("CAPI/ISDN1/12345-19", "10") in new stack
> -- Executing Answer("CAPI/ISDN1/12345-19", "") in new stack
> == ISDN1: Answering for 12345
> -- Executing Milliwatt("CAPI/ISDN1/12345-19", "") in new stack
> > CAPI INFO 0x34d1: Invalid call reference value
>  == Spawn extension (capi-in, 12345, 3) exited non-zero on
> 'CAPI/ISDN1/12345-19'
> == ISDN1: CAPI Hangingup
> 
> If I try that in a pure sip-context, it works as I thought it would.
> 
> Now: do I do something wrong? Is there a problem with the Wait() application?
> Or is that more likely a bug in chan_capi-cm?

If there is a bug, I would need a full log (set verbose 5 ; capi debug) to
find out.
But: if there is a call signaled, the switch has a timeout (about 4 or 5 
seconds), this timeout can be extended by sending ALERT (Ringing).
Normaly, when you Dial() another phone, this other device will signal
that it is ringing and the status will be put through to chan_capi to
signal Ringing(). Now when your Dial() returns with any Ringing signal,
the ISDN call is still without ALERT (nobody wants to signal the call).
So you should do
 exten => 12345,1,Ringing()
(or after the unsuccessful Dial())
to make sure the ISDN call gets ALERT in that case.

Armin




More information about the asterisk-users mailing list