[asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
Mark Michelson
mmichelson at digium.com
Wed Jul 15 16:48:34 CDT 2009
Barry L. Kline wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I must be missing something here but I can't figure out why I can't get
> DEVICE_STATE() to give me anything other than "NOT_INUSE".
>
> I have two extensions: 6666 and 6668. I used 6668 to make a call to
> yet another phone, so I know that it's busy. I then use 6666 to call
> 6668 and in the dialplan have a noop to see what DEVICE_STATE() is
> returning for both extensions.
>
> I get:
>
>
> [Jul 15 17:20:43] -- Executing [6668 at sip-deskset:1]
> NoOp("SIP/6666-08636430", "SIP/6668 has state NOT_INUSE") in new stack
> [Jul 15 17:20:43] -- Executing [6668 at sip-deskset:2]
> NoOp("SIP/6666-08636430", "SIP/6666 has state NOT_INUSE") in new stack
>
>
> 6668 is configure so that I get this:
>
> * Name : 6668
> Secret : <Set>
> MD5Secret : <Not set>
> Context : sip-deskset
> Subscr.Cont. : <Not set>
> Language :
> AMA flags : Unknown
> Transfer mode: open
> CallingPres : Presentation Allowed, Not Screened
> Callgroup :
> Pickupgroup :
> Mailbox :
> VM Extension : asterisk
> LastMsgsSent : 32767/65535
> Call limit : 99
> Busy level : 1
> Dynamic : Yes
> Callerid : "Matts SIP" <6668>
> MaxCallBR : 384 kbps
> Expire : 2016
> Insecure : no
> Nat : RFC3581
> ACL : No
> T38 pt UDPTL : No
> CanReinvite : No
> PromiscRedir : No
> User=Phone : No
> Video Support: No
> Text Support : No
> Trust RPID : No
> Send RPID : No
> Subscriptions: Yes
> Overlap dial : No
> DTMFmode : rfc2833
> Timer T1 : 500
> Timer B : 32000
> ToHost :
> Addr->IP : 192.168.1.70 Port 5060
> Defaddr->IP : 0.0.0.0 Port 5060
> Transport : UDP
> Def. Username: Barry's IP450
> SIP Options : (none)
> Codecs : 0x4 (ulaw)
> Codec Order : (ulaw:20)
> Auto-Framing : No
> 100 on REG : No
> Status : OK (14 ms)
> Useragent : PolycomSoundPointIP-SPIP_450-UA/3.1.3.0439
> Reg. Contact : sip:6668 at 192.168.1.70
> Qualify Freq : 60000 ms
> Sess-Timers : Accept
> Sess-Refresh : uas
> Sess-Expires : 1800 secs
> Min-Sess : 90 secs
>
>
> - From what I have read, with 'Busy Level = 1' I should be seeing BUSY
> returned from the DEVICE_STATE() call, yet I don't.
>
> What is the super-secret sauce required to get Asterisk to return the
> correct state?
>
> TIA,
>
> Barry
You need to set a call-limit for the SIP peer. Device state calculation for a
SIP peer is predicated on both the call-limit and busylevel. Let's say that you
were to have a call-limit of 2, but no busylevel set. These are the device
states reported for the peer based on the number of calls currently handled:
0 calls: not in use
1 call: in use
2 calls: busy
Basically, the busylevel defaults to the call-limit value. Now if you add a
busylevel = 1 to sip.conf, these are the device states reported:
0 calls: not in use
1 call: busy
2 calls: busy
Mark Michelson
More information about the asterisk-users
mailing list