Re: [asterisk-users] Notifying missed calls

2021-11-07 Thread Luca Bertoncello
Am 06.11.2021 um 21:15 schrieb Łukasz Grzywański:

Hi Łukasz,

Dziękuję

> two legs in this same context
> ( exten => _03529123456,n,Dial(local/123456@main_incoming,,xX) )
> 
> PJSIP/pbxmichael_in-0418
> and 
> Local/123456@main_incoming-0268
> 
> [main_incoming]
> exten => _+49X.,1,goto(${EXTEN:3},1)
> exten => _0049X.,1,goto(${EXTEN:4},1)
> exten => _03529X.,1,goto(${EXTEN:1},1)
> exten => _3529X.,1,goto(${EXTEN:4},1)
> 
> exten => _123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
> exten => _123456,n,Set(CALLERID(num)=${IF($[ "${CALLERID(num):0:3}" =
> "+49" ]?0${CALLERID(num):3}:${CALLERID(num)})})
> exten => _123456,n,Set(CHANNEL(musicclass)=default)
> exten => _123456,n,Dial(SIP/74,39,RcxX)
> exten => _123456,n,Verbose(2,Voicemail for Main)
> exten => _123456,n,Set(CALLERID(name)=)
> exten => _123456,n,VoiceMail(74,us)
> exten => _123456,n,Hangup

You are my hero!
It works as expected!

Thank you very very much!
Luca

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Łukasz Grzywański
Hi ;-)
now I see 

Luca
two legs in this same context
( exten => _03529123456,n,Dial(local/123456@main_incoming,,xX) )

PJSIP/pbxmichael_in-0418
and
Local/123456@main_incoming-0268

[main_incoming]
exten => _+49X.,1,goto(${EXTEN:3},1)
exten => _0049X.,1,goto(${EXTEN:4},1)
exten => _03529X.,1,goto(${EXTEN:1},1)
exten => _3529X.,1,goto(${EXTEN:4},1)

exten => _123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
exten => _123456,n,Set(CALLERID(num)=${IF($[ "${CALLERID(num):0:3}" = "+49"
]?0${CALLERID(num):3}:${CALLERID(num)})})
exten => _123456,n,Set(CHANNEL(musicclass)=default)
exten => _123456,n,Dial(SIP/74,39,RcxX)
exten => _123456,n,Verbose(2,Voicemail for Main)
exten => _123456,n,Set(CALLERID(name)=)
exten => _123456,n,VoiceMail(74,us)
exten => _123456,n,Hangup

LG
Lukasz


On Sat, 6 Nov 2021 at 21:02, Łukasz Grzywański 
wrote:

> Hi,
> strange
>
>   -- Goto (noanswer,s,1)
>   -- Executing [s@noanswer:2] System("PJSIP/pbxmichael_in-0418",
> "echo "Verpasster Anruf vom +4935 um 19:13" | mail -s "Verpasster
> Anruf" i...@mydomain.de") in new stack
>   -- Executing [s@noanswer:1] NoOp("Local/123456@main_incoming-0268;2",
> "UID CALL: 1636222382.6032/ DATE: 20211106-191306)") in new stack
>   -- Executing [s@noanswer:2] System("Local/123456@main_incoming-0268;2",
> "echo "Verpasster Anrufvom 035 um 19:13" | mail -s "Verpasster
> Anruf" i...@mydomain.de") in new stack
>
> pls run
>
> asterisk -rx "dialplan show noanswer"
>
> and please check:
>
> [noanswer]
> exten => s,1,NoOp(UID CALL: ${UNIQUEID} /
> DATE:${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}))
> exten => s,n,System(echo "Verpasster Anruf vom ${CALLERID(NUM)} um
> ${STRFTIME(${EPOCH},,%H:%M)}" | mail -s "Verpasster Anruf" i...@.de)
> exten => s,n,Hangup()
>
>
>  LG
> Lukasz
>
> On Sat, 6 Nov 2021 at 19:20, Luca Bertoncello 
> wrote:
>
>> Am 06.11.2021 um 15:06 schrieb Frank Vanoni:
>>
>> Hi Frank
>>
>> > The "h" extension is executed whenever a call is hang up in that
>> > contexts.
>> >
>> > In your configuration it executes first the "s" extension (where you
>> > GoTo h,1) and once that is executed, the "h" extension is executed
>> > again.
>>
>> OK, I modified my configuration so:
>>
>> [main_incoming]
>> exten => _00493529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
>> exten => _00493529123456,n,Dial(local/123456@main_incoming,,xX)
>> exten => _03529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
>> exten => _03529123456,n,Dial(local/123456@main_incoming,,xX)
>> exten => _123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
>> exten => _123456,n,Set(CALLERID(num)=${IF($[ "${CALLERID(num):0:3}" =
>> "+49" ]?0${CALLERID(num):3}:${CALLERID(num)})})
>> exten => _123456,n,Set(CHANNEL(musicclass)=default)
>> exten => _123456,n,Dial(SIP/74,39,RcxX)
>> exten => _123456,n,Verbose(2,Voicemail for Main)
>> exten => _123456,n,Set(CALLERID(name)=)
>> exten => _123456,n,VoiceMail(74,us)
>> exten => _123456,n,Hangup
>> include => fax_incoming
>> include => michael_incoming
>> include => internal_calls
>>
>> exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
>> exten => h,n,Goto(noanswer,s,1)
>> exten => h,n(done),NoOp()
>>
>> Unfortunately two E-Mails are sent anyway...
>> This is the Asterisk log:
>>
>> -- Executing [00493529123456@michael_incoming:1]
>> Verbose("PJSIP/pbxmichael_in-0418", "2,Call for Main -
>> [+4935]") in new stack
>>   == Call for Main - [+4935]
>> -- Executing [00493529123456@michael_incoming:2]
>> Dial("PJSIP/pbxmichael_in-0418", "local/123456@main_incoming,,xX")
>> in new stack
>> -- Called local/123456@main_incoming
>> -- Executing [123456@main_incoming:1]
>> Verbose("Local/123456@main_incoming-0268;2", "2,Call for Main -
>> [+4935]") in new stack
>>   == Call for Main - [+4935]
>> -- Executing [123456@main_incoming:2]
>> Set("Local/123456@main_incoming-0268;2",
>> "CALLERID(num)=035") in new stack
>> -- Executing [123456@main_incoming:3]
>> Set("Local/123456@main_incoming-0268;2",
>> "CHANNEL(musicclass)=default") in new stack
>> -- Executing [123456@main_incoming:4]
>> Dial("Local/123456@main_incoming-0268;2", "SIP/74,39,RcxX") in new
>> stack
>>   == Using SIP RTP CoS mark 5
>> -- Called SIP/74
>> -- Local/123456@main_incoming-0268;1 is ringing
>> -- SIP/74-0462 is ringing
>> -- Local/123456@main_incoming-0268;1 is ringing
>> -- SIP/74-0462 is ringing
>> -- SIP/74-0462 is ringing
>> -- SIP/74-0462 is ringing
>>   == Spawn extension (michael_incoming, 00493529123456, 2) exited
>> non-zero on 'PJSIP/pbxmichael_in-0418'
>> -- Executing [h@michael_incoming:1]
>> GotoIf("PJSIP/pbxmichael_in-0418", "0?done") in new stack
>> -- Executing [h@michael_incoming:2]
>> Goto("PJSIP/pbxmichael_in-0418", "noanswer,s,1") in new stack
>> -- Goto (noanswer,s,1)
>>   == Spawn extension (main_incoming, 123456, 4) exited 

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Łukasz Grzywański
Hi,
strange

  -- Goto (noanswer,s,1)
  -- Executing [s@noanswer:2] System("PJSIP/pbxmichael_in-0418", "echo
"Verpasster Anruf vom +4935 um 19:13" | mail -s "Verpasster Anruf"
i...@mydomain.de") in new stack
  -- Executing [s@noanswer:1] NoOp("Local/123456@main_incoming-0268;2",
"UID CALL: 1636222382.6032/ DATE: 20211106-191306)") in new stack
  -- Executing [s@noanswer:2] System("Local/123456@main_incoming-0268;2",
"echo "Verpasster Anrufvom 035 um 19:13" | mail -s "Verpasster
Anruf" i...@mydomain.de") in new stack

pls run

asterisk -rx "dialplan show noanswer"

and please check:

[noanswer]
exten => s,1,NoOp(UID CALL: ${UNIQUEID} /
DATE:${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}))
exten => s,n,System(echo "Verpasster Anruf vom ${CALLERID(NUM)} um
${STRFTIME(${EPOCH},,%H:%M)}" | mail -s "Verpasster Anruf" i...@.de)
exten => s,n,Hangup()


 LG
Lukasz

On Sat, 6 Nov 2021 at 19:20, Luca Bertoncello  wrote:

> Am 06.11.2021 um 15:06 schrieb Frank Vanoni:
>
> Hi Frank
>
> > The "h" extension is executed whenever a call is hang up in that
> > contexts.
> >
> > In your configuration it executes first the "s" extension (where you
> > GoTo h,1) and once that is executed, the "h" extension is executed
> > again.
>
> OK, I modified my configuration so:
>
> [main_incoming]
> exten => _00493529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
> exten => _00493529123456,n,Dial(local/123456@main_incoming,,xX)
> exten => _03529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
> exten => _03529123456,n,Dial(local/123456@main_incoming,,xX)
> exten => _123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
> exten => _123456,n,Set(CALLERID(num)=${IF($[ "${CALLERID(num):0:3}" =
> "+49" ]?0${CALLERID(num):3}:${CALLERID(num)})})
> exten => _123456,n,Set(CHANNEL(musicclass)=default)
> exten => _123456,n,Dial(SIP/74,39,RcxX)
> exten => _123456,n,Verbose(2,Voicemail for Main)
> exten => _123456,n,Set(CALLERID(name)=)
> exten => _123456,n,VoiceMail(74,us)
> exten => _123456,n,Hangup
> include => fax_incoming
> include => michael_incoming
> include => internal_calls
>
> exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
> exten => h,n,Goto(noanswer,s,1)
> exten => h,n(done),NoOp()
>
> Unfortunately two E-Mails are sent anyway...
> This is the Asterisk log:
>
> -- Executing [00493529123456@michael_incoming:1]
> Verbose("PJSIP/pbxmichael_in-0418", "2,Call for Main -
> [+4935]") in new stack
>   == Call for Main - [+4935]
> -- Executing [00493529123456@michael_incoming:2]
> Dial("PJSIP/pbxmichael_in-0418", "local/123456@main_incoming,,xX")
> in new stack
> -- Called local/123456@main_incoming
> -- Executing [123456@main_incoming:1]
> Verbose("Local/123456@main_incoming-0268;2", "2,Call for Main -
> [+4935]") in new stack
>   == Call for Main - [+4935]
> -- Executing [123456@main_incoming:2]
> Set("Local/123456@main_incoming-0268;2",
> "CALLERID(num)=035") in new stack
> -- Executing [123456@main_incoming:3]
> Set("Local/123456@main_incoming-0268;2",
> "CHANNEL(musicclass)=default") in new stack
> -- Executing [123456@main_incoming:4]
> Dial("Local/123456@main_incoming-0268;2", "SIP/74,39,RcxX") in new
> stack
>   == Using SIP RTP CoS mark 5
> -- Called SIP/74
> -- Local/123456@main_incoming-0268;1 is ringing
> -- SIP/74-0462 is ringing
> -- Local/123456@main_incoming-0268;1 is ringing
> -- SIP/74-0462 is ringing
> -- SIP/74-0462 is ringing
> -- SIP/74-0462 is ringing
>   == Spawn extension (michael_incoming, 00493529123456, 2) exited
> non-zero on 'PJSIP/pbxmichael_in-0418'
> -- Executing [h@michael_incoming:1]
> GotoIf("PJSIP/pbxmichael_in-0418", "0?done") in new stack
> -- Executing [h@michael_incoming:2]
> Goto("PJSIP/pbxmichael_in-0418", "noanswer,s,1") in new stack
> -- Goto (noanswer,s,1)
>   == Spawn extension (main_incoming, 123456, 4) exited non-zero on
> 'Local/123456@main_incoming-0268;2'
> -- Executing [h@main_incoming:1]
> GotoIf("Local/123456@main_incoming-0268;2", "0?done") in new stack
> -- Executing [s@noanswer:1] NoOp("PJSIP/pbxmichael_in-0418",
> "UID CALL: 1636222382.6030 / DATE: 20211106-191306)") in new stack
> -- Executing [h@main_incoming:2]
> Goto("Local/123456@main_incoming-0268;2", "noanswer,s,1") in new stack
> -- Goto (noanswer,s,1)
> -- Executing [s@noanswer:2] System("PJSIP/pbxmichael_in-0418",
> "echo "Verpasster Anruf vom +4935 um 19:13" | mail -s
> "Verpasster Anruf" i...@mydomain.de") in new stack
> -- Executing [s@noanswer:1]
> NoOp("Local/123456@main_incoming-0268;2", "UID CALL: 1636222382.6032
> / DATE: 20211106-191306)") in new stack
> -- Executing [s@noanswer:2]
> System("Local/123456@main_incoming-0268;2", "echo "Verpasster Anruf
> vom 035 um 19:13" | mail -s "Verpasster Anruf"
> i...@mydomain.de") in new stack
>

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Luca Bertoncello
Am 06.11.2021 um 15:06 schrieb Frank Vanoni:

Hi Frank

> The "h" extension is executed whenever a call is hang up in that
> contexts. 
> 
> In your configuration it executes first the "s" extension (where you
> GoTo h,1) and once that is executed, the "h" extension is executed
> again.

OK, I modified my configuration so:

[main_incoming]
exten => _00493529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
exten => _00493529123456,n,Dial(local/123456@main_incoming,,xX)
exten => _03529123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
exten => _03529123456,n,Dial(local/123456@main_incoming,,xX)
exten => _123456,1,Verbose(2,Call for Main - [${CALLERID(num)}])
exten => _123456,n,Set(CALLERID(num)=${IF($[ "${CALLERID(num):0:3}" =
"+49" ]?0${CALLERID(num):3}:${CALLERID(num)})})
exten => _123456,n,Set(CHANNEL(musicclass)=default)
exten => _123456,n,Dial(SIP/74,39,RcxX)
exten => _123456,n,Verbose(2,Voicemail for Main)
exten => _123456,n,Set(CALLERID(name)=)
exten => _123456,n,VoiceMail(74,us)
exten => _123456,n,Hangup
include => fax_incoming
include => michael_incoming
include => internal_calls

exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
exten => h,n,Goto(noanswer,s,1)
exten => h,n(done),NoOp()

Unfortunately two E-Mails are sent anyway...
This is the Asterisk log:

-- Executing [00493529123456@michael_incoming:1]
Verbose("PJSIP/pbxmichael_in-0418", "2,Call for Main -
[+4935]") in new stack
  == Call for Main - [+4935]
-- Executing [00493529123456@michael_incoming:2]
Dial("PJSIP/pbxmichael_in-0418", "local/123456@main_incoming,,xX")
in new stack
-- Called local/123456@main_incoming
-- Executing [123456@main_incoming:1]
Verbose("Local/123456@main_incoming-0268;2", "2,Call for Main -
[+4935]") in new stack
  == Call for Main - [+4935]
-- Executing [123456@main_incoming:2]
Set("Local/123456@main_incoming-0268;2",
"CALLERID(num)=035") in new stack
-- Executing [123456@main_incoming:3]
Set("Local/123456@main_incoming-0268;2",
"CHANNEL(musicclass)=default") in new stack
-- Executing [123456@main_incoming:4]
Dial("Local/123456@main_incoming-0268;2", "SIP/74,39,RcxX") in new stack
  == Using SIP RTP CoS mark 5
-- Called SIP/74
-- Local/123456@main_incoming-0268;1 is ringing
-- SIP/74-0462 is ringing
-- Local/123456@main_incoming-0268;1 is ringing
-- SIP/74-0462 is ringing
-- SIP/74-0462 is ringing
-- SIP/74-0462 is ringing
  == Spawn extension (michael_incoming, 00493529123456, 2) exited
non-zero on 'PJSIP/pbxmichael_in-0418'
-- Executing [h@michael_incoming:1]
GotoIf("PJSIP/pbxmichael_in-0418", "0?done") in new stack
-- Executing [h@michael_incoming:2]
Goto("PJSIP/pbxmichael_in-0418", "noanswer,s,1") in new stack
-- Goto (noanswer,s,1)
  == Spawn extension (main_incoming, 123456, 4) exited non-zero on
'Local/123456@main_incoming-0268;2'
-- Executing [h@main_incoming:1]
GotoIf("Local/123456@main_incoming-0268;2", "0?done") in new stack
-- Executing [s@noanswer:1] NoOp("PJSIP/pbxmichael_in-0418",
"UID CALL: 1636222382.6030 / DATE: 20211106-191306)") in new stack
-- Executing [h@main_incoming:2]
Goto("Local/123456@main_incoming-0268;2", "noanswer,s,1") in new stack
-- Goto (noanswer,s,1)
-- Executing [s@noanswer:2] System("PJSIP/pbxmichael_in-0418",
"echo "Verpasster Anruf vom +4935 um 19:13" | mail -s
"Verpasster Anruf" i...@mydomain.de") in new stack
-- Executing [s@noanswer:1]
NoOp("Local/123456@main_incoming-0268;2", "UID CALL: 1636222382.6032
/ DATE: 20211106-191306)") in new stack
-- Executing [s@noanswer:2]
System("Local/123456@main_incoming-0268;2", "echo "Verpasster Anruf
vom 035 um 19:13" | mail -s "Verpasster Anruf"
i...@mydomain.de") in new stack

Any other idea?

Thanks
Luca Bertoncello
(lucab...@lucabert.de)

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Frank Vanoni
On Sat, 2021-11-06 at 14:46 +0100, Luca Bertoncello wrote:

> Really, I can't understand what you mean... I'm feeling really
> dumb...


No need to feel dumb. I'm not an expert and when I look to my
extensions.conf... well... countless pulling my hairs out, head banging
on the keyboard,,, :-)

The "h" extension is executed whenever a call is hang up in that
contexts. 

In your configuration it executes first the "s" extension (where you
GoTo h,1) and once that is executed, the "h" extension is executed
again.

Take a look to the example I posted. It's very basic, but it does the
job.




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Luca Bertoncello
Am 06.11.2021 um 14:43 schrieb Frank Vanoni:

Hi Frank

> On Fri, 2021-11-05 at 10:50 +0100, Luca Bertoncello wrote:
> 
>> 1) The E-Mails will be sent "double"
> 
> It sends the first mail by executing "noanswer,2" and a second mail
> because because of "main-incoming,h,2" 

Really, I can't understand what you mean... I'm feeling really dumb...

>> 2) The E-Mails will be sent for outgoing unanswered calls, too.
> 
> Use the "h" extension only in the context for incoming calls

I have just one "h" extension:

[main_incoming]
exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
exten => h,n,Goto(noanswer,s,1)
exten => h,n(done),NoOp()

Could you explain what you mean?

Thanks
Luca Bertoncello
(lucab...@lucabert.de)

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Frank Vanoni
On Fri, 2021-11-05 at 10:50 +0100, Luca Bertoncello wrote:

> 1) The E-Mails will be sent "double"

It sends the first mail by executing "noanswer,2" and a second mail
because because of "main-incoming,h,2" 

> 2) The E-Mails will be sent for outgoing unanswered calls, too.

Use the "h" extension only in the context for incoming calls


> 



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-06 Thread Frank Vanoni
Here my configuration:

[incoming]
; Incoming from Swisscom
exten => +4191xxx,1,NoOp(Call from ${CALLERID(num)})
   same => n,Dial(SIP/deskphone,120)
   same => n,Hangup()

exten => h,1,GotoIf($["${DIALSTATUS}" = "ANSWER"]?done)
exten => h,n,System(echo "Missed Call from ${CALLERID(num)}" | mail -s
"Missed Call from ${CALLERID(num)}" my-em...@address.here)
exten => h,n(done),NoOp()





-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-05 Thread Łukasz Grzywański
Hallo Luca,
Please show logs ( full )


On Fri, 5 Nov 2021 at 11:04, Luca Bertoncello  wrote:

> Am 03.11.2021 21:34, schrieb Antony Stone:
>
> Hi again
>
> > The n there should be 1, surely?
> >
> >> exten => h,n,Hangup
> >
> > I would say "remove that line".  The call has already been hung up, so
> > calling
> > Hangup is at best going to go into a recursive loop - it certainly
> > isn't going
> > to help.
>
> This is my current configuration:
>
> [cch]
> exten => _X.,1,Verbose(2,DEFAULT)
> include => internal_calls
> include => main_incoming
> include => fax_incoming
> include => michael_incoming
> include => myproxy
>
> [noanswer]
> exten => s,1,NoOp(UID CALL: ${UNIQUEID} / DATE:
> ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}))
> exten => s,n,System(echo "Verpasster Anruf vom ${CALLERID(NUM)} um
> ${STRFTIME(${EPOCH},,%H:%M)}" | mail -s "Verpasster Anruf" i...@.de)
>
> 
>
> [main_incoming]
> exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
> exten => h,n,Goto(noanswer,s,1)
> exten => h,n(done),NoOp()
> exten => h,n,HangUp()
> ...
>
> It works, but I have two problems:
>
> 1) The E-Mails will be sent "double"
> 2) The E-Mails will be sent for outgoing unanswered calls, too.
>
> Do someone has an idea what is wrong in my configuration?
>
> Thanks a lot
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users



-- 

Pozdrawiam,

Łukasz Grzywański
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-05 Thread Luca Bertoncello

Am 03.11.2021 21:34, schrieb Antony Stone:

Hi again


The n there should be 1, surely?


exten => h,n,Hangup


I would say "remove that line".  The call has already been hung up, so 
calling
Hangup is at best going to go into a recursive loop - it certainly 
isn't going

to help.


This is my current configuration:

[cch]
exten => _X.,1,Verbose(2,DEFAULT)
include => internal_calls
include => main_incoming
include => fax_incoming
include => michael_incoming
include => myproxy

[noanswer]
exten => s,1,NoOp(UID CALL: ${UNIQUEID} / DATE: 
${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}))
exten => s,n,System(echo "Verpasster Anruf vom ${CALLERID(NUM)} um 
${STRFTIME(${EPOCH},,%H:%M)}" | mail -s "Verpasster Anruf" i...@.de)




[main_incoming]
exten => h,1,GotoIf($[“${DIALSTATUS}” = “ANSWER”]?done)
exten => h,n,Goto(noanswer,s,1)
exten => h,n(done),NoOp()
exten => h,n,HangUp()
...

It works, but I have two problems:

1) The E-Mails will be sent "double"
2) The E-Mails will be sent for outgoing unanswered calls, too.

Do someone has an idea what is wrong in my configuration?

Thanks a lot
Luca Bertoncello
(lucab...@lucabert.de)

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Gerardo Barajas
Hi Luca.

You can use the ${DIALSTATUS} channel variable.

https://www.voip-info.org/asterisk-variable-dialstatus/

GERARDO B

On Wed, Nov 3, 2021 at 2:52 PM Luca Bertoncello 
wrote:

> Hi list!
>
> I have this problem: I'd like to notify the user about missed calls.
> With "missed call" I mean: the caller calls, wait a while and hangup
> _before_ the voicemail starts.
>
> I got it call a script just before the voicemail starts, so:
>
> exten => s,1,Verbose(2,Call for Main - [${CALLERID(num)}])
> exten => s,n,Set(CHANNEL(musicclass)=default)
> exten => s,n,Dial(SIP/74,39,RcxX)
> exten => s,n,Verbose(2,Voicemail for Main)
> exten => s,n,Set(CALLERID(name)=)
> exten => s,n,Gosub(noanswer,s,1)
> exten => s,n,VoiceMail(74,us)
> exten => s,n,Hangup
>
> [noanswer]
> exten => s,1,NoOp(UID CALL: ${UNIQUEID} / DATE:
> ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}))
> exten => s,n,System(echo "Verpasster Anruf vom ${CALLERID(NUM)} um
> ${STRFTIME(${EPOCH},,%H:%M)}" > /tmp/calllog.txt)
> exten => s,n,Return()
>
> but if the called hangs up prior the timeout for the voicemail, the
> Subrouting "noanswer" will not called...
>
> Any ideas?
>
> Thanks
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Saludos/Regards
--
Ing. Gerardo Barajas Puente

Proyectos Especiales/Preventa | www.neocenter.com
T:+52 (55)  8590-9000 x 7003
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Carlos Rojas
g: *When the called party hangs up*, continue to execute commands in the
current context at the next priority

On Wed, Nov 3, 2021 at 4:39 PM Luca Bertoncello 
wrote:

> Am 03.11.2021 um 21:34 schrieb Antony Stone:
> > On Wednesday 03 November 2021 at 21:29:46, Luca Bertoncello wrote:
> >
> >> I tried so:
> >>
> >> exten => h,n(hang),Gosub(noanswer,s,1)
> >
> > The n there should be 1, surely?
>
> Ach, you're right!
>
> Now it works!
>
> Thanks a lot
> Luca Bertoncello
> (lucab...@lucabert.de)
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Luca Bertoncello
Am 03.11.2021 um 21:34 schrieb Antony Stone:
> On Wednesday 03 November 2021 at 21:29:46, Luca Bertoncello wrote:
> 
>> I tried so:
>>
>> exten => h,n(hang),Gosub(noanswer,s,1)
> 
> The n there should be 1, surely?

Ach, you're right!

Now it works!

Thanks a lot
Luca Bertoncello
(lucab...@lucabert.de)

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Antony Stone
On Wednesday 03 November 2021 at 21:29:46, Luca Bertoncello wrote:

> I tried so:
> 
> exten => h,n(hang),Gosub(noanswer,s,1)

The n there should be 1, surely?

> exten => h,n,Hangup

I would say "remove that line".  The call has already been hung up, so calling 
Hangup is at best going to go into a recursive loop - it certainly isn't going 
to help.


Antony.

-- 
"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Luca Bertoncello
Am 03.11.2021 um 21:24 schrieb Doug Lytle:
 but if the called hangs up prior the timeout for the voicemail, the
 Subrouting "noanswer" will not called...
> 
> You can use the h priority for that.
> 
> https://wiki.asterisk.org/wiki/display/AST/Special+Dialplan+Extensions

Hi Doug,

could you send me an example?

I tried so:


exten => h,n(hang),Gosub(noanswer,s,1)
exten => h,n,Hangup
exten => _xx,1,Verbose(2,Call for Main - [${CALLERID(num)}])
exten => _xx,n,Set(CHANNEL(musicclass)=default)
exten => _xx,n,Dial(SIP/74,39,RcxX)
exten => _xx,n,Verbose(2,Voicemail for Main)
exten => _xx,n,Set(CALLERID(name)=)
exten => _xx,n,Gosub(noanswer,s,1)
exten => _xx,n,VoiceMail(74,us)
exten => _xx,n,Hangup

But it does not work...

Thanks
Luca Bertoncello
(lucab...@lucabert.de)

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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

Re: [asterisk-users] Notifying missed calls

2021-11-03 Thread Doug Lytle
>>> but if the called hangs up prior the timeout for the voicemail, the
>>> Subrouting "noanswer" will not called...

You can use the h priority for that.

https://wiki.asterisk.org/wiki/display/AST/Special+Dialplan+Extensions

Doug

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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