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
Asked
Active
Viewed 1,761 times
4 Answers
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
-
in SIPshowpeer I cant find anything in the response which tells me if the device is busy, unavaiable or not_inuse – Mushir Ahmed Mar 11 '14 at 09:03
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

cortexdump.com
- 51
- 1
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