Re: [asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
Why are you putting semi-colons at the end of every line? The dialplan isn't written in PHP ;). -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@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 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: 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 [6...@sip-deskset:1] NoOp(SIP/-0955ecc8, SIP/6668 has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:2] NoOp(SIP/-0955ecc8, SIP/ has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:3] ExecIf(SIP/-0955ecc8, 0?Busy(10)) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:4] Dial(SIP/-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 1 99 * Peer name In use Limit 6668 1/1/0 32 6667 0/0/0 99 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/ has state ${DEVICE_STATE(SIP/)}); 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 ___ -- 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
Re: [asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
Barry L. Kline wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark Michelson wrote: 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: 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 [6...@sip-deskset:1] NoOp(SIP/-0955ecc8, SIP/6668 has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:2] NoOp(SIP/-0955ecc8, SIP/ has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:3] ExecIf(SIP/-0955ecc8, 0?Busy(10)) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:4] Dial(SIP/-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 1 99 * Peer name In use Limit 6668 1/1/0 32 6667 0/0/0 99 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/ has state ${DEVICE_STATE(SIP/)}); exten = 6668,n,ExecIf($[${DEVICE_STATE(SIP/${EXTEN})}=BUSY]?Busy(10)); exten = 6668,n,Dial(SIP/${EXTEN}); Thanks for the config info. I have a couple of suggestions for fixes. 1. Try changing the type in [basic-options] from friend to peer. I've found that device state reporting for outbound calls (from the perspective of the phone) tends to be more accurate with this type. 2. If for some odd reason number 1 either doesn't sound appealing to you or doesn't work, then try moving the limitonpeers=yes option from your [basic-options] section to the [general] section. No, neither of these ideas actually make any real sense to me, but they are based on behavior that I have witnessed with my Asterisk setup in my office. Mark Michelson ___ -- 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
Re: [asterisk-users] DEVICE_STATE() and Asterisk 1.6.0.10
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark Michelson wrote: Thanks for the config info. I have a couple of suggestions for fixes. 1. Try changing the type in [basic-options] from friend to peer. I've found that device state reporting for outbound calls (from the perspective of the phone) tends to be more accurate with this type. 2. If for some odd reason number 1 either doesn't sound appealing to you or doesn't work, then try moving the limitonpeers=yes option from your [basic-options] section to the [general] section. No, neither of these ideas actually make any real sense to me, but they are based on behavior that I have witnessed with my Asterisk setup in my office. Mark Michelson I'll give these a try and see if they help. At this point, I'd be willing to slaughter a goat and place its entrails on the keyboard if I thought it would help. Barry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKX0w5CFu3bIiwtTARAsy8AKCDbPMDZJ98v1HuL/KLDuQsayI84ACfX4OI Jw5YOgQllm1+wbq2wThh4Wg= =eE0m -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
Re: [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: and 6668. I used 6668 to make a call to yet another phone, so I know that it's busy. I then use 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 [6...@sip-deskset:1] NoOp(SIP/-08636430, SIP/6668 has state NOT_INUSE) in new stack [Jul 15 17:20:43] -- Executing [6...@sip-deskset:2] NoOp(SIP/-08636430, SIP/ 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:6...@192.168.1.70 Qualify Freq : 6 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 ___ -- 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
Re: [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: and 6668. I used 6668 to make a call to yet another phone, so I know that it's busy. I then use 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 -- ___ -- 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
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 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: 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 [6...@sip-deskset:1] NoOp(SIP/-0955ecc8, SIP/6668 has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:2] NoOp(SIP/-0955ecc8, SIP/ has state NOT_INUSE) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:3] ExecIf(SIP/-0955ecc8, 0?Busy(10)) in new stack [Jul 15 18:40:15] -- Executing [6...@sip-deskset:4] Dial(SIP/-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 1 99 * Peer name In use Limit 6668 1/1/0 32 6667 0/0/0 99 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/ has state ${DEVICE_STATE(SIP/)}); 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
Re: [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- ___ -- 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