Vieri
2007-Sep-13 13:30 UTC
[asterisk-users] how to determine if a SIP extension has DND on or off
I would like to determine through an AGI script if a specific SIP extension has DND on or off. I know that if the SIP client dialed *78 or *79 it is usually enough to just do a: database show dnd to fetch the DND status from the database. However, not all clients dial *78 or *79 (or whichever feature code is defined for DND). Some softphones such as SJPhone have a DND button. When pressed and someone tries to Dial() that extension, the Asterisk CLI shows something like this: -- Called SIP/4053 -- Got SIP response 486 "Do Not Disturb" back from 10.215.144.48 -- SIP/4053-08311988 is busy So how could I get the "response code" *without* actually dialing from within an AGI script? (I don't want to establish a call, just want to see if the SIP client replies with a DND response code) Like a "ping" of some sort... Vieri ____________________________________________________________________________________ Check out the hottest 2008 models today at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Steve Langstaff
2007-Sep-13 13:42 UTC
[asterisk-users] how to determine if a SIP extension has DND on oroff
Sending the phone a SIP OPTIONS message *should* get you the response code that the phone would respond with if you sent it an INVITE - I don't know how to do that from AGI though.> -----Original Message----- > From: asterisk-users-bounces at lists.digium.com > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Vieri > Sent: 13 September 2007 14:30 > To: asterisk-users at lists.digium.com > Subject: [asterisk-users] how to determine if a SIP extension > has DND on oroff > > I would like to determine through an AGI script if a specific > SIP extension has DND on or off. > > I know that if the SIP client dialed *78 or *79 it is usually > enough to just do a: > > database show dnd > > to fetch the DND status from the database. > > However, not all clients dial *78 or *79 (or whichever > feature code is defined for DND). > > Some softphones such as SJPhone have a DND button. > When pressed and someone tries to Dial() that extension, the > Asterisk CLI shows something like this: > > -- Called SIP/4053 > -- Got SIP response 486 "Do Not Disturb" back from > 10.215.144.48 > -- SIP/4053-08311988 is busy > > So how could I get the "response code" *without* actually > dialing from within an AGI script? (I don't want to establish > a call, just want to see if the SIP client replies with a DND > response code) Like a "ping" of some sort... > > Vieri > > > > > ______________________________________________________________ > ______________________ > Check out the hottest 2008 models today at Yahoo! Autos. > http://autos.yahoo.com/new_cars.html > > _______________________________________________ > > Sign up now for AstriCon 2007! September 25-28th. > http://www.astricon.net/ > > --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 >