Second call

Dear,

i have one question about dialing.
I would like to set the timeout on Dial at 40 if the peer is not using the phone (= it is the first call).
In the meanwhile if a second call arrives, the timeout should be 20.

Is it possibile to do this?

Another question: is there any command to use in the extensions.conf to check if a specific peers (ex: SIP/100) has already a call running (= a channel used)?

Thanks and regards,
Davide

The preferred method is to to use group counts.

There is a DEVICESTATE function (check spelling) that can detect if a peer has an active call. You may still need to set a call limit for that to work.

Hi David,

thank you very much for your reply.
In this guide (voip-info.org/wiki/view/Aste … vice_State) i found:

Example of using DEVICE_STATE for call-limit:

Because call-limit is deprecated, sometimes you will need to make sure that, if an extension is in use, you will not call it.
The following dialplan entries make sure that extension 100 has only one call at a time.

exten => 100,1,ExecIf($[ ${DEVICE_STATE(SIP/${EXTEN})} = INUSE ]?Busy)
exten => 100,2,Dial(SIP/${EXTEN})

I tried, but also the second call will be forwarded to the EXTEN. Any idea?

Thanks and regards,
Davide

call limit is deprecated in favour of group counts, but was, I think a pre-requisite for DEVICE_STATE to work properly and may still be. As I said, using group counts is the preferred method now.

I found the problem: it’s necessary to set callcounter=yes