Re: [asterisk-users] Do not disturbe

2011-01-05 Thread Doug Lytle

Flavio Miranda wrote:

I really would like to understand why dont works!



The variable should be ${CALLERID(num)}, unless you have a very old 
version of Asterisk.


Doug


--
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Do not disturbe

2011-01-04 Thread Flavio Miranda

Hi all,
  I am trying to set up DND in my asterisk, I am using the following context:
[app-naoperturbe]
exten = *11,1,Set(DND=${DB(ddisturbe/${CALLERIDNUM})})exten = 
*11,2,GotoIf($[${DND} = YES]?*11,3:*11,101)exten = 
*11,3,Set(DB(ddisturbe/${CALLERIDNUM})=NO)exten = *11,4,Playback(beep)exten = 
*11,5,Hangup()exten = *11,101,Set(DB(ddisturbe/${CALLERIDNUM})=YES)exten = 
*11,102,Playback(beep)exten = *11,103,Hangup() I am testing with a softphone 
and when I dial *11, I receive the following log from cli:
Executing [...@a2billing:1] Set(SIP/2015-0187, DND=YES) in new stack
-- Executing [...@a2billing:2] GotoIf(SIP/2015-0187, 1?*11,3:*11,101) 
in new stack-- Goto (a2billing,*11,3)-- Executing [...@a2billing:3] 
Set(SIP/2015-0187, DB(ddisturbe/)=NO) in new stack-- Executing 
[...@a2billing:4] Playback(SIP/2015-0187, beep) in new stack-- 
SIP/2015-0187 Playing 'beep.gsm' (language 'en')-- Executing 
[...@a2billing:5] Hangup(SIP/2015-0187, ) in new stack  == Spawn 
extension (a2billing, *11, 5) exited non-zero on 'SIP/2015-0187'
Therefore, the facilite is not working!!What I am doing wrong, could somebody 
point me out please?!!
Thanks in advanced!!

Att,

 

Flavio Roberto Miranda

MSN:flaviormira...@hotmail.com
Skype: flaviormiranda

  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Do not disturbe

2011-01-04 Thread Doug Lytle

Flavio Miranda wrote:

Hi all,

  I am trying to set up DND in my asterisk, I am using the following 
context:


[app-naoperturbe]

exten = *11,1,Set(DND=${DB(ddisturbe/${CALLERIDNUM})})



This is mine:

[dnd]

;***
;* Do not disturb can be set via Asterisk
;* instead of the phones by dialing this
;* number.
;***

exten = 79*,1,Set(DND=${DB(DND/${CALLERID(num)})})
exten = 79*,n,GotoIf($[${DND} = YES]?3:100)

--
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Do not disturbe

2011-01-04 Thread Miguel Molina

El 04/01/11 18:13, Flavio Miranda escribió:

Hi all,

  I am trying to set up DND in my asterisk, I am using the following 
context:


[app-naoperturbe]

exten = *11,1,Set(DND=${DB(ddisturbe/${CALLERIDNUM})})
exten = *11,2,GotoIf($[${DND} = YES]?*11,3:*11,101)
exten = *11,3,Set(DB(ddisturbe/${CALLERIDNUM})=NO)
exten = *11,4,Playback(beep)
exten = *11,5,Hangup()
exten = *11,101,Set(DB(ddisturbe/${CALLERIDNUM})=YES)
exten = *11,102,Playback(beep)
exten = *11,103,Hangup()
I am testing with a softphone and when I dial *11, I receive the 
following log from cli:


Executing [...@a2billing:1] Set(SIP/2015-0187, DND=YES) in new 
stack
-- Executing [...@a2billing:2] GotoIf(SIP/2015-0187, 
1?*11,3:*11,101) in new stack

-- Goto (a2billing,*11,3)

1?*11,3:*11,101

The first 1 before the question mark tells you that the conditional 
was evaluated true.


-- Goto (a2billing,*11,3)

This tells you that the goto was been done because the true condition on 
the GotoIf instruction.


Everything else goes just as written.

Maybe you need to check some dialplan logic?

Hope it helps.

-- Executing [...@a2billing:3] Set(SIP/2015-0187, 
DB(ddisturbe/)=NO) in new stack
-- Executing [...@a2billing:4] Playback(SIP/2015-0187, 
beep) in new stack

-- SIP/2015-0187 Playing 'beep.gsm' (language 'en')
-- Executing [...@a2billing:5] Hangup(SIP/2015-0187, ) in 
new stack
  == Spawn extension (a2billing, *11, 5) exited non-zero on 
'SIP/2015-0187'


Therefore, the facilite is not working!!
What I am doing wrong, could somebody point me out please?!!

Thanks in advanced!!


Cheers,

--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Do not disturbe

2011-01-04 Thread Flavio Miranda

I really would like to understand why dont works!
should I to set up any other function?  maybe on features?

Att,

 

Flavio Roberto Miranda

MSN:flaviormira...@hotmail.com
Skype: flaviormiranda



 Date: Tue, 4 Jan 2011 20:08:39 -0500
 From: supp...@drdos.info
 To: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] Do not disturbe
 
 Flavio Miranda wrote:
  Hi all,
 
I am trying to set up DND in my asterisk, I am using the following 
  context:
 
  [app-naoperturbe]
 
  exten = *11,1,Set(DND=${DB(ddisturbe/${CALLERIDNUM})})
 
 
 This is mine:
 
 [dnd]
 
 ;***
 ;* Do not disturb can be set via Asterisk
 ;* instead of the phones by dialing this
 ;* number.
 ;***
 
 exten = 79*,1,Set(DND=${DB(DND/${CALLERID(num)})})
 exten = 79*,n,GotoIf($[${DND} = YES]?3:100)
 
 -- 
 Ben Franklin quote:
 
 Those who would give up Essential Liberty to purchase a little Temporary 
 Safety, deserve neither Liberty nor Safety.
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 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 --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users