Barry L. Kline
2009-Jul-15 21:26 UTC
[asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
-----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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKXkmMCFu3bIiwtTARAvoNAJ4nGmm2U27XTs+E2O1Eze5bDTEVZgCcDDQm 4JvWx6zOlAl8ZnFyFxu8lfo=uhHc -----END PGP SIGNATURE-----
Mark Michelson
2009-Jul-15 21:48 UTC
[asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
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, > > BarryYou 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
Philipp Kempgen
2009-Jul-15 21:52 UTC
[asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
Barry L. Kline schrieb:> 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.> What is the super-secret sauce required to get Asterisk to return the > correct state?Just to be sure: Do you have hints configured for the extensions? See http://das-asterisk-buch.de/2.1/blf-leds.html (The text is in german but there are many examples in extensions.conf and extensions.ael syntax. "Zur?ck" = "Previous", "Weiter" = "Next") Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --
Barry L. Kline
2009-Jul-15 22:46 UTC
[asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Philipp Kempgen wrote:> Just to be sure: Do you have hints configured for the extensions? > See http://das-asterisk-buch.de/2.1/blf-leds.html > (The text is in german but there are many examples in extensions.conf > and extensions.ael syntax. "Zur?ck" = "Previous", "Weiter" = "Next")Hi Philipp. I did configure the hints (see my other reply) and things are still not working properly. Thanks for your suggestion! Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKXlxZCFu3bIiwtTARAhpLAJ9D8z4Mbhg9ACt62sTR46UQApcQMACdGH48 Uy14CTE7pKMb8qffF+wfiow=d5oG -----END PGP SIGNATURE-----
Why are you putting semi-colons at the end of every line? The dialplan isn't written in PHP ;). -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Barry L. Kline Sent: 15 July 2009 23:46 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Michelson wrote:> > You need to set a call-limit for the SIP peer. Device statecalculation for a> SIP peer is predicated on both the call-limit and busylevel. Let's saythat you> were to have a call-limit of 2, but no busylevel set. These are thedevice> states reported for the peer based on the number of calls currentlyhandled: Hi Mark. Thanks for your explanation of these parameters. I should have posted my configurations. I double-checked the contents of sip.conf and I have this. The 'subscribecontext' was added for testing, per the other reply I got for my question. ; ; Settings common to all devices on our system ; [basic-options](!) type=friend host=dynamic canreinvite=no disallow=all allow=ulaw dtmfmode=rfc2833 qualify=yes ; ; Standard desksets here ; [lan-deskset](!,basic-options) context=sip-deskset notifyringing = yes notifyhold = yes limitonpeers = yes call-limit=99 [6668](lan-deskset) secret=mysecret callerid="Matts SIP" <6668> username=Barry's IP450 call-limit=32 busylevel=1 subscribecontext=hint-context My hint-context is: [hint-context] exten => 6668,hint,SIP/6668; I'm still not getting anything other than NOT_INUSE from DEVICE_STATE. Here is the CLI output: [Jul 15 18:40:15] -- Executing [6668 at sip-deskset:1] NoOp("SIP/6666-0955ecc8", "SIP/6668 has state NOT_INUSE") in new stack [Jul 15 18:40:15] -- Executing [6668 at sip-deskset:2] NoOp("SIP/6666-0955ecc8", "SIP/6666 has state NOT_INUSE") in new stack [Jul 15 18:40:15] -- Executing [6668 at sip-deskset:3] ExecIf("SIP/6666-0955ecc8", "0?Busy(10)") in new stack [Jul 15 18:40:15] -- Executing [6668 at sip-deskset:4] Dial("SIP/6666-0955ecc8", "SIP/6668") in new stack And here is sip show inuse: corp-asterisk*CLI> sip show inuse * User name In use Limit 6668 1 32 6667 0 99 6666 1 99 * Peer name In use Limit 6668 1/1/0 32 6667 0/0/0 99 6666 0/0/0 99 For completeness, here is the dialplan that's producing this: exten => 6668,1,NoOp(SIP/${EXTEN} has state ${DEVICE_STATE(SIP/${EXTEN})}); exten => 6668,n,NoOp(SIP/6666 has state ${DEVICE_STATE(SIP/6666)}); exten => 6668,n,ExecIf($[${DEVICE_STATE(SIP/${EXTEN})}="BUSY"]?Busy(10)); exten => 6668,n,Dial(SIP/${EXTEN}); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKXlwaCFu3bIiwtTARAkRpAJ4+2WF9qrIwrC3Kdpwd0YAOm/5S1wCfUR1T CtI9kZNQYpW2Sv6uFNud7Jo=9Zp/ -----END PGP SIGNATURE----- _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users