1

I want to create e outbound dialer which will check if a user is available to take call or not before initiating a call from the extension

4 Answers4

1

Send this:

Action: Getvar
ActionID: 1
Variable: DEVICE_STATE(SIP/1107)

To get this:

Response: Success
ActionID: 1
Variable: DEVICE_STATE(SIP/1107)
Value: BUSY

It also works with PJSIP

Nahuel Greco
  • 1,080
  • 14
  • 12
0

Yes Definitely. I use it a lot.

Action: SIPshowpeer

Description: Show one SIP peer with details on current status.

Syntax:

Action: SIPshowpeer
ActionID: <value>
Peer: <value>

Here is the wiki link.

moonstruck
  • 2,729
  • 2
  • 26
  • 29
0

There is another approach:

Action: ExtensionState
Parameters: Exten, Context, ActionID

Take a little reading: http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+ExtensionState

0

You can add that peer into some asterisk queue. After that you can use 'queue show [queueNumber]' (visit https://www.voip-info.org/wiki/view/asterisk+cli+command+queue+show) to get each peer status before initiating a call

Harsh
  • 43
  • 6