[asterisk-users] Database re-connect issue

2018-03-07 Thread D';Arcy Cain
I had a problem inserting CDR records into my PostgreSQL database.
According to the log it failed to open the database at startup.  I
searched and found the following report.

https://issues.asterisk.org/jira/browse/ASTERISK-15820

However, it looks like it was closed after 14 months and nothing was
done about the problem.  Is there any point to opening another report?
How do we make sure that the issue doesn't get forgotten?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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


[asterisk-users] Looking for better fax handling

2018-05-21 Thread D';Arcy Cain
I am having troubles with sending faxes.  I hope someone can help me
work out a better method.

Basically we have a special address that our users can send to.  It
winds up on our Asterisk server which runs a Python script that parses
the message for attachments and the phone number from the recipient
address.  The attachments are converted to TIFF and stored in a folder
with various information encoded into the file name such as phone number
and retry information.  That all works fine.

A separate process picks up the files and sends them using an AMI script
like this:

Action: Originate
Channel: SIP/provider/%(destination)s
Context: LocalSets
CallerID: Vybe Consulting Inc Fax Service <6475551212>
Exten: sendfax
Priority: 1
Timeout: 3
Variable: faxfile=%(faxfile)s
Variable: uid=%(uid)s
Variable: destination=%(destination)s
Variable: sender_name=Vybe Consulting Inc Fax Service
Variable: sender_num=6475551212

It then renames the file encoding the next retry time and incrementing
the number of retries.

The same script checks for files in a success folder and sends the users
a confirmation message that the fax was sent.  The files are moved into
the success folder by Asterisk using this dialplan:

sendfax,1,Verbose(0,FAX ${faxfile} to ${destination})
  same => n,Set(FAXOPT(headerinfo)=${sender_name})
  same => n,Set(FAXOPT(localstationid)=${sender_num})
  same => n,SendFax(${faxfile},d)
  same => n,Set(STATUS=Status: ${FAXOPT(status)})
  same => n,Set(STATUS=${STATUS}\nRemote ID: ${FAXOPT(remotestationid)})
  same => n,Set(STATUS=${STATUS}\nMaxrate: ${FAXOPT(maxrate)})
  same => n,Set(STATUS=${STATUS}\nMinrate: ${FAXOPT(minrate)})
  same => n,Set(STATUS=${STATUS}\nECM: ${FAXOPT(ecm)})
  same => n,Set(STATUS=${STATUS}\nnumber of pages: ${FAXOPT(pages)})
  same => n,Set(STATUS=${STATUS}\nRate: ${FAXOPT(rate)})
  same => n,Set(STATUS=${STATUS}\nResolution: ${FAXOPT(resolution)})
  same => n,GotoIf($["${FAXOPT(status)}" = "SUCCESS"]?faxok)
  same => n,Set(STATUS=${STATUS}\nError: ${FAXOPT(error)})
  same => n(faxok),Verbose(0,FAX ${destination} Status (S): ${STATUS})
  same => n,Set(FAXNAME=${CUT(faxfile,/,6)})
  same => n,Set(FILE(/fax_status/${FAXNAME})=${STATUS})
  same => n,GotoIf($["${FAXOPT(status)}" != "SUCCESS"]?faxfail)
  same => n,System(/bin/mv '${faxfile}' '/fax_success/${FAXNAME}')

  same => n,Set(CDR(userfield)=${destination})
  same => n,Verbose(0,FAX to ${destination} charged to ${uid})
  same => n(faxfail),Verbose(0,FAX ${destination} Status (F): ${STATUS})
  same => n,Hangup()

My problem is that if the faxes get too big it starts sending it again
before the previous one has finished.  I can't raise the retry limit too
far because sometimes the receiver is busy and we have to retry in a
reasonable time.

Is there a way to get a token from the AMI script that I can use to
determine later if Asterisk is still busy with the fax before I try
sending it again?

Or, am I approaching this all wrong?  Is there a better method of doing
this?

I am running Asterisk 13.19.0 on NetBSD/amd64 7.1.0.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com





-- 
_
-- 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] Looking for better fax handling

2018-05-22 Thread D';Arcy Cain
On 2018-05-21 08:04 PM, John Kiniston wrote:
> Lock files.
> 
> Create one when you start sending the fax, on your retry process check
> for a lock file and if one exists don't retry.

Your suggestion is to create a lock file for each fax (there could be
many concurrent ones) and have the dialplan remove it on either success
or failure?  That sounds doable.  I will give that some thought.

Other than that, does my method seem like a reasonable approach?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Looking for better fax handling

2018-05-22 Thread D';Arcy Cain
On 2018-05-22 02:17 AM, Yves wrote:
> you could
> 
> - use "global variables"
> - use the asterisk built in database

Both of those seem difficult as the process is split between Asterisk
and an external script.

> - mv the file to temporary folder _before_ faxing (would be the most
> easy solution as you already
> know how to mv a file via asterisk...)

True.  This or John Kiniston's idea of lock files could work.  I guess I
would need to have some process to move it back if it is still there
after an hour or so in case something went wrong.  The same sort of
thing would be needed for John's solution as well.

It sure would be nice if I could query Asterisk to see if the fax
process was still running.

Thanks.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Looking for better fax handling

2018-06-08 Thread D';Arcy Cain
On 2018-05-24 02:32 AM, Yves wrote:
> of course you can query asterisk asterisk and look, if your fax is still
> running...:
> 
> asterisk -rx "fax show sessions" lists you all acive fax sessions...
Well, yes but how do I know which channel I am looking for?  When I say
"I" I mean my program.  I am sure that my brain can figure it out but my
brain needs to be off doing other things.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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

[asterisk-users] T-38 re-invite issue

2018-06-08 Thread D';Arcy Cain
I have an error sending to a specific fax number.  It may be more than
one but this is the one I investigated.  It seems the delay for the SIP
negotiation in T.38 was initiated after 6 seconds, however, our system
sent the BYE after only 4 seconds, possibly cutting the call before all
the communication necessary for the negotiation was completed.  Here is
the trace from our provider showing their successful call to the number
and our failure.

FAIL:
2018-06-01 08:34:16.475 - Detected CED modem tone   ***
Universal Media Gateway MGW02-EDTMTDS
2018-06-01 08:34:16.911 - Detected CEDPR modem tone
Universal Media Gateway MGW02-EDTMTDS
2018-06-01 08:34:20.692 - Incoming SIP message received : BYE From:
551...@tor.trk.tprm.ca To: 55@206.80.250.100
55@209.197.130.80:5060**
MetaSphere CFS Distributel-Western-CFS
555-555-: Vybe Networks Inc. 98.158.139.74

SUCCESS:
2018-06-01 08:30:56.959 - Detected CED modem tone   ***
Universal Media Gateway MGW02-EDTMTDS
2018-06-01 08:30:57.388 - Detected CEDPR modem tone
Universal Media Gateway MGW02-EDTMTDS
2018-06-01 08:31:03.187 - Detected V.21 flag fax tone *
Universal Media Gateway MGW02-EDTMTDS
2018-06-01 08:31:03.188 - SIP media renegotiation has commenced.
MetaSphere CFS Distributel-Western-CFS
555-555- NxGen Networks Inc. 192.243.214.73
2018-06-01 08:31:03.188 - Outgoing SIP message sent : INVITE (SDP) From:
55@208.68.17.52 To: 55@10.0.5.61 192.243.214.73:5060
  *
MetaSphere CFS Distributel-Western-CFS
555-555- NxGen Networks Inc. 192.243.214.73

I tried increasing the t38timeout but it did not seem to have any
effect.  Is there another variable to adjust somewhere?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] T-38 re-invite issue

2018-06-12 Thread D';Arcy Cain
On 2018-06-08 06:45 AM, D'Arcy Cain wrote:
> I tried increasing the t38timeout but it did not seem to have any
> effect.  Is there another variable to adjust somewhere?

Pinging the list to see if anyone has any thoughts.  Perhaps someone can
explain what t38timeout is supposed to do as it seems to have no effect
at all.  It certainly doesn't seem to increase the time that it waits
for a T38 re-invite.


-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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

[asterisk-users] T-38 re-invite issue

2018-06-12 Thread D';Arcy Cain
On 2018-06-08 06:45 AM, D'Arcy Cain wrote:
> I tried increasing the t38timeout but it did not seem to have any
> effect.  Is there another variable to adjust somewhere?

Pinging the list to see if anyone has any thoughts.  Perhaps someone can
explain what t38timeout is supposed to do as it seems to have no effect
at all.  It certainly doesn't seem to increase the time that it waits
for a T38 re-invite.


-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com



-- 
_
-- 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] T-38 re-invite issue

2018-06-12 Thread D';Arcy Cain
On 2018-06-12 07:10 PM, James Cloos wrote:
>>>>>> "DC" == D'Arcy Cain  writes:
> 
> DC> Perhaps someone can explain what t38timeout is supposed to do
> 
> A 'git grep t38timeout' on the src leads one to res/res_fax.c, where one
> case see that it is the number of miliseconds to permit for t38 negotiation
> to complete once it starts.
> 
> Ie after both sides select t38, until they agree on the t38 terms.

OK, so does that mean that setting it to 25000 should leave time for the
re-invite or does the timeout start after that.  If so is there another
control for waiting for the re-invite?

Note, a test by my provider shows that this particular number gives the
re-invite after 6 seconds.  I hang up at 4.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] T-38 re-invite issue

2018-06-13 Thread D';Arcy Cain
On 2018-06-13 07:20 AM, James Cloos wrote:
>>>>>> D'Arcy Cain  writes:
> 
>>> Ie after both sides select t38, until they agree on the t38 terms.
> 
>> OK, so does that mean that setting it to 25000 should leave time for the
>> re-invite or does the timeout start after that.
> 
> As I wrote above, after that.  After the sip/sdp.

So, how do I increase the timeout before the re-invite then?  Source?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] T-38 re-invite issue

2018-07-03 Thread D';Arcy Cain
On 2018-06-13 07:45 AM, D'Arcy Cain wrote:
> On 2018-06-13 07:20 AM, James Cloos wrote:
>>>>>>> D'Arcy Cain  writes:
>>
>>>> Ie after both sides select t38, until they agree on the t38 terms.
>>
>>> OK, so does that mean that setting it to 25000 should leave time for the
>>> re-invite or does the timeout start after that.
>>
>> As I wrote above, after that.  After the sip/sdp.
> 
> So, how do I increase the timeout before the re-invite then?  Source?

Does anyone have any ideas on this?  We now have another number that is
failing the same way.  If someone can point me to the area in the source
where this other timeout is I will try to make the change there.
Perhaps I can even send a patch to control it.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] T-38 re-invite issue

2019-01-31 Thread D';Arcy Cain
On 7/3/18 3:57 PM, D'Arcy Cain wrote:
> On 2018-06-13 07:45 AM, D'Arcy Cain wrote:
>> On 2018-06-13 07:20 AM, James Cloos wrote:
>>>>>>>> D'Arcy Cain  writes:
>>>
>>>>> Ie after both sides select t38, until they agree on the t38 terms.
>>>
>>>> OK, so does that mean that setting it to 25000 should leave time for the
>>>> re-invite or does the timeout start after that.
>>>
>>> As I wrote above, after that.  After the sip/sdp.
>>
>> So, how do I increase the timeout before the re-invite then?  Source?
> 
> Does anyone have any ideas on this?  We now have another number that is
> failing the same way.  If someone can point me to the area in the source
> where this other timeout is I will try to make the change there.
> Perhaps I can even send a patch to control it.

I don't want to be a total pest but I can't be the only one who has been
tripped up by this.  Please, does anyone have any clue about this?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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

[asterisk-users] Splitting origination and termination

2019-10-20 Thread D';Arcy Cain
Up to now I have been using one remote server for both incoming and 
outgoing.  The SIP entry looks like this:


[combined]
disallow=all
allow=ulaw
allow=gsm
allow=ilbc
dtmfmode=rfc2833
host=206.380.260.100
defaultuser=6477957868
secret=xx
insecure=invite,port
type=friend
context=unauthenticated

Now I am switching to a provider that uses one server for origination 
and two different ones for termination.  This is my new config.


[incoming01]
disallow=all
allow=ulaw
allow=gsm
allow=ilbc
dtmfmode=rfc2833
host=205.265.36.100
insecure=invite,port
type=peer
context=unauthenticated

[incoming02]
disallow=all
allow=ulaw
allow=gsm
allow=ilbc
dtmfmode=rfc2833
host=205.265.133.100
insecure=invite,port
type=peer
context=unauthenticated

[outgoing]
allow=ulaw
allow=gsm
allow=ilbc
dtmfmode=rfc2833
host=205.265.22.100
type=peer

Does this seem correct?  Is there any way to combine the two incoming 
ones?  Do I have more than I need?  Am I missing anything?


TIA.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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

[asterisk-users] Faxes stopped working - AMI issue?

2019-11-27 Thread D';Arcy Cain
I recently upgraded from Asterisk 13.19 to 16.6.1.  Everything is
working fine with a few minor tweaks except outgoinf fax.  Incoming
works fine.

I do outgoing faxing through an AMI call.  Here is the output from the
security log:

[Nov 27 06:16:05] SECURITY[101222] res_security_log.c:
SecurityEvent="ChallengeSent",EventTV="2019-11-27T06:16:05.566-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="alex",SessionID="0x80ba54820",LocalAddress="IPV4/UDP/98.158.139.74/5060",RemoteAddress="IPV4/UDP/72.143.94.110/5060",Challenge="215351b4"
[Nov 27 06:16:05] SECURITY[101222] res_security_log.c:
SecurityEvent="SuccessfulAuth",EventTV="2019-11-27T06:16:05.591-0500",Severity="Informational",Service="SIP",EventVersion="1",AccountID="alex",SessionID="0x80ba54820",LocalAddress="IPV4/UDP/98.158.139.74/5060",RemoteAddress="IPV4/UDP/72.143.94.110/5060",UsingPassword="1"

So I know that AMI is listening and I can talk to it.  Here is the main log"

[Nov 27 06:16:00] VERBOSE[101155] asterisk.c: Remote UNIX connection
[Nov 27 06:16:00] VERBOSE[101245] asterisk.c: Remote UNIX connection
disconnected
[Nov 27 06:16:01] VERBOSE[101244] manager.c: Manager 'asterisk' logged
on from 127.0.0.1

The AMI command, after the login, looks like this:

Action: Originate
Channel: SIP/outgoing/%%(destination)s
Context: LocalSets
CallerID: Vybe Consulting Inc Fax Service <551212>
Exten: sendfax
Priority: 1
Timeout: 3
Variable: faxfile=%%(faxfile)s
Variable: uid=%%(uid)s
Variable: destination=%%(destination)s
Variable: sender_name=Vybe Consulting Inc Fax Service
Variable: sender_num=551212

Those "%%" strings get replaced by real data.  My sendfax extension has
a bunch of stuff but the very first line is this:

exten => sendfax,1,Verbose(0,FAX ${faxfile} to ${destination})

So, regardless of what follows, shouldn't I be seeing that message in my
logs?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Faxes stopped working - AMI issue?

2019-12-03 Thread D';Arcy Cain

On 12/2/19 11:52 AM, Joshua C. Colp wrote:

So I know that AMI is listening and I can talk to it.  Here is the
main log"

[Nov 27 06:16:00] VERBOSE[101155] asterisk.c: Remote UNIX connection
[Nov 27 06:16:00] VERBOSE[101245] asterisk.c: Remote UNIX connection
disconnected
[Nov 27 06:16:01] VERBOSE[101244] manager.c: Manager 'asterisk' logged
on from 127.0.0.1

The AMI command, after the login, looks like this:

Action: Originate
Channel: SIP/outgoing/%%(destination)s
Context: LocalSets
CallerID: Vybe Consulting Inc Fax Service <551212>
Exten: sendfax
Priority: 1
Timeout: 3
Variable: faxfile=%%(faxfile)s
Variable: uid=%%(uid)s
Variable: destination=%%(destination)s
Variable: sender_name=Vybe Consulting Inc Fax Service
Variable: sender_num=551212

Those "%%" strings get replaced by real data.  My sendfax extension has
a bunch of stuff but the very first line is this:

exten => sendfax,1,Verbose(0,FAX ${faxfile} to ${destination})

So, regardless of what follows, shouldn't I be seeing that message in my
logs?

Only if it was actually answered. You'd need to dig deeper by looking at 
the SIP trace itself (sip set debug on) to see if an attempt was made 
and what occurred.


OK, so I did that and my logs are really busy now.  However, a search 
through them doesn't find the phone number that I am faxing to.


Are you sure that it needs to be answered before it starts logging? 
Logging only when something works isn't much of a debugging tool.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Faxes stopped working - AMI issue?

2019-12-03 Thread D';Arcy Cain

On 12/3/19 3:04 PM, Joshua C. Colp wrote:

 >     The AMI command, after the login, looks like this:
 >
 >     Action: Originate
 >     Channel: SIP/outgoing/%%(destination)s
 >     Context: LocalSets
 >     CallerID: Vybe Consulting Inc Fax Service <551212>
 >     Exten: sendfax
 >     Priority: 1
 >     Timeout: 3
 >     Variable: faxfile=%%(faxfile)s
 >     Variable: uid=%%(uid)s
 >     Variable: destination=%%(destination)s
 >     Variable: sender_name=Vybe Consulting Inc Fax Service
 >     Variable: sender_num=55121 > Have you tried narrowing it down at 
all? Using the CLI to do a test
"channel originate" using the same dial string? Have you looked at what 
comes back from AMI as a result of the Originate to see if it shows 
anything?


First of all, I really appreciate the help.

So I tried this in the CLI: (everything is on one line)

channel originate SIP/outgoing/555666 extension=sendfax@LocalSets 
faxfile=/path/to/tiff/file priority=1


But I got "SendFAX requires an argument".  I tried various things but I 
am poking around in the dark.  Can you suggest an actual CLI command 
based on those options that I can try?


Also, is there some way to have the AMI interface send back the same 
errors?  All I get from the socket now is "Asterisk Call Manager/5.0.1".


Thanks again.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Faxes stopped working - AMI issue?

2019-12-05 Thread D';Arcy Cain
On 12/3/19 4:21 PM, Joshua C. Colp wrote:
> You'd be getting more from AMI than just that. A message comes back when
> you login, another when you actually do the originate, as well as events
> most likely before then. The Asterisk testsuite uses AMI heavily, as do
> others, so I'm confident that AMI itself is working in that regard.
> You'd need to look at your own AMI usage and ensure you are reading from
> the socket and logging out. You could even connect over telnet and do
> the same AMI action for Originate and test that way.

I stumbled upon a message that mentioned that the interface needs two
line feeds before it acts on the commands.  I added that and now I can
connect.  I am still having some issues related to T.38 but at least the
commands are making it to the server now.

Thanks for all the help.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Block Spam Calls

2019-12-12 Thread D';Arcy Cain
On 12/12/19 5:33 PM, Greg Woods wrote:
> Most spam calls are robocalls these days. At my house, I can block
> pretty much all of the robocalls by requiring the caller to take some
> action before ringing the phones. In our case, the action is just to
> dial 1 for my wife or 2 for me. The only difference it makes in the end
> is which voice mailbox the caller gets transferred to if no one answers,
> but since asterisk so programmable, there are a lot of ways to
> accomplish the basic concept. I can see tons of calls in my log
> that never get through to bother us.

Not bad.  I was toying with another idea.  I find that if I don't answer
a robot fast enough it just hangs up.  How about ring two or three times
before passing to the actual extension?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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

[asterisk-users] Can't block intrusion

2020-04-01 Thread D';Arcy Cain
I am running Asterisk 16.9 on FreeBSD 12.1-RELEASE-p1.  I keep seeing
lines like this in my logs.

[Apr  1 13:30:33] NOTICE[101155][C-4526] chan_sip.c: Call from ''
(45.143.220.235:5356) to extension '2037' rejected because extension not
found in context 'unauthenticated'.

I have a script that checks for things like this and adds them to my
packet filter (pf).  Everything seems to work up to a point.  The IP
address gets added to my AUTOBLOCK table.  The second rule, right after
the friends whitelist, blocks any IP in that table.  If I try to ping or
traceroute to it I can't get through.  I ran netstat -a and sockstat -c
and the IP address does not show up in the connections.  Every test
suggests that the system is doing exactly what I want it to do.

The weird thing is that the attempts don't stop.  That IP continues to
try different numbers.  There are two ways that I have found so far to
actually stop the attack.  One is to completely stop Asterisk and then
restart it.  Obviously not a good option on a production switch.

The other way is to null route the IP.  That stops it cold.  That's
better but it needs me to manually intervene.  However, it does make it
clear that the IP address is not being faked somehow.

I also tried doing "pfctl -k 45.143.220.235" but that says that no
connections were dropped.  It looks like pf is convinced that the
connection is gone.

So, can anyone suggest why the attack keeps happening?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Can't block intrusion

2020-04-01 Thread D';Arcy Cain
On 2020-04-01 15:12, Greg Troxel wrote:
> D'Arcy Cain  writes:
> But yet, new packets from that IP address reach asterisk.   It seems
> almost entirely clear to me that you have a firewall problem, not an
> asterisk problem.

This could well be but Asterisk is the only thing that continues to
communicate.

> I would test this out with a remote machine under your control, and
> packet trace.  I would check for a buggy firewall rule that is somehow
> accepting packets from new tcp or udp packets as matching an old
> connection state object.  I would check for the new attempts as coming
> from something that matches the original "connection", even if UDP.

Here is the first four lines from "pfctl -sr":

pass in quick on bge0 from  to any flags S/SA keep state
block drop in log quick on bge0 from  to any
block drop in log quick on bge0 from  to any
block drop out log quick on bge0 from any to 

Unless pf is broken I can't see how anything besides my "friends" can be
getting through.

>> The weird thing is that the attempts don't stop.  That IP continues to
>> try different numbers.  There are two ways that I have found so far to
> 
> You say "continues to try", but surely you are not surprised that
> packets arrive at your computer.  I think you are surprised that they
> make it to asterisk.  But your language doesn't quite line up with
> that.  Am I misinterpreting?

Maybe.  By "try" I don't mean "try to get through".  I mean "try to
access my switch".  They aren't actually breaking in.  My passwords are
strong enough to frustrate them.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Can't block intrusion

2020-04-01 Thread D';Arcy Cain
On 2020-04-01 16:39, Larry Moore wrote:
> Or the stateful entry still exists when the table entry is updated.
> 
> Does your script also issue a command to kill existing states from that
> host after it has updated the table, e.g.  pfctl -k 45.143.220.235

Yes, as I said in my OP that's the actual command that I used.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Can't block intrusion

2020-04-01 Thread D';Arcy Cain
On 2020-04-01 16:28, Mark Boyce wrote:
> On 1 Apr 2020, at 22:14, Greg Troxel  > wrote:
>>
>> I think you need to use tcpdump and turn up firewall debugging.
> 
> sngrep is your friend …My bet is UDP vs TCP on firewall rules :-)

block drop in log quick on bge0 from  to any
block drop out log quick on bge0 from any to 

Am I misunderstanding pf?  I thought that that would block TCP, UDP,
ICMP and anything else trying to get through.

Since I started looking at this closer I did find that only some
connections have this problem.  Most get blocked as soon as the IP is
passed to the AUTOBLOCK table.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Can't block intrusion

2020-04-02 Thread D';Arcy Cain
On 2020-04-02 08:01, Larry Moore wrote:
> I suspect you have a good understanding of pf.

Pretty good I think.  As with everything I am always willing to learn more.

> Have you included in your script running 'pfctl -k ' to kill
> any states that may exists after you update your  table?

I haven't yet because I want to watch the effect of doing it.  When I
see the problem happening I run that manually and watch to see if it
stops the attack in its tracks or if I still have to null-route it.
Once I know that it is working I will add it to the script.

> In pf, like IP Filter, the last matching rule wins.

Subject to the "quick" keyword of course.

> What can't be determined from the information provided is whether any
> connections that have been established from networks you have listed in
> the table , also appear in the  table.

Absolutely positive.  FRIENDS is a static table with exactly eight
entries.  It is mainly for protection against our office and a few
special hosts such as our VoIP provider being locked out.  I can
guarantee that the IP that I showed in the OP was not a friend.

> Removing the 'quick' parameter from the rule for  will allow
> packets to fall through to the next rules. Alternatively, moving the
> 'pass' rule to below your 'block' rules will allow any connections
> originating from networks listed in your  table and also exists
> in the  table, will be blocked.

It's a safety thing.  Even if someone in the office makes a mistake I
don't want them blocked.  Same for other friends.

I haven't seen the issue today.  One thing that I did was to move the
anti spoof line further up.  I thought that anti-spoof would block
wherever it was.  Could the location be important?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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] Can't block intrusion

2020-04-02 Thread D';Arcy Cain
> I haven't seen the issue today.  One thing that I did was to move the
> anti spoof line further up.  I thought that anti-spoof would block
> wherever it was.  Could the location be important?

Didn't matter.  It happened again.

I did do something though.  I added a bunch of netblocks to my ENEMIES
table.  In case anyone wants to use them here they are:

45.143.220.0/24  # 1,547,018 attempts
77.247.109.0/24  # 629,717 attempts
185.53.88.0/24   # 302,581 attempts
88.80.148.0/24   # 89,271 attempts
185.36.81.0/24   # 78,886 attempts
37.49.230.0/24   # 69,700 attempts
116.202.203.0/24 # 39,838 attempts
185.4.224.0/24   # 30,I845 attempts
103.145.12.0/24  # 26,746 attempts
103.145.13.0/24  # 19,203 attempts

Note that the comments are stripped from the actual file used by pf.

The attempts are over a period of just under two weeks.  As you can see,
the worst offender was the block that included the IP that I showed in
my OP.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com

-- 
_
-- 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

[asterisk-users] Touch tone stutter

2016-11-22 Thread D';Arcy Cain
I am hoping someone else has seen this and can offer a solution or at 
least a direction to investigate.  I am running 11.23.  Most of my 
clients are fine but one has a strange behaviour.  He has a Grandstream 
HT701 like most of my clients who use an ATA.  He can make call and they 
are crystal clear.  However, when he tries to use phone menus ("dial 234 
for John Doe" for example) it doesn't work.  At first I thought that the 
tones were not being delivered but I had him play them to me and the 
issue is that each tone stutters.  As a result, entering "234" becomes 
"223344" which is not understood as a valid input.


He has a recent phone and, in fact, is almost the same model I have at 
home.  His is a Panasonix TX-TGD220 and mine is a TX-TGD-212.  The 
difference is mainly that his has a built in answering machine.


As I said, no one else is having the issue.  One person has a horrible 
connection with voice drops all the time but the touch tones still work.


I have made two files available.  http://darcy.vex.net/Bishop.ogg  is an 
OGG file of the sound that it makes at the receiving end and the other 
at http://darcy.vex.net/Bishop.png is a picture of the wave form.  I had 
the user think "one Mississippi" etc. and alternately press and release 
three different buttons.  I recorded off my SIP phone which is going 
through the same Asterisk server as the user.


The only thing I can see in my configs that might apply is in sip.conf 
"dtmfmode=rfc2833" which I don't want to change unless I am absolutely 
sure.  No one else is having the problem so I don't want to risk it. 
Would I be safe if I set it to "auto"?  Is there any chance that it 
would help?  Is there some place else I should be looking?


Thanks in advance for any help.

--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net


--
_
-- 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] Touch tone stutter

2016-11-23 Thread D';Arcy Cain

On 2016-11-22 07:49 PM, Pete Mundy wrote:


One direction that may be worth exploring further is his ATA's config (or 
perhaps swapping it for a different model). Eg adjusting echo cancellation or 
line impedance settings.


I have to be careful here as I auto-provison these devices and changes 
would propogate to every user.  Echo cancellation is off.  Do you think 
it should be on?



Is the ATA he is using the same as the ATA you use?


No but it is the same as other users who do not have the problem.  I use 
a SIP phone and a Cisco ATA.



Failure to correctly recognise and decode DTMF is just one of many reasons why 
I never use them (ATAs). Like faxing over VoIP, they're just too much trouble :(


I understand but some use cases just need it.


Genuine IP phones are pretty good value these days. Could you drop one of those 
on-site as a temporary measure to prove that it's phone and/or ATA related?


He does want to have an extension so that won't work.


Ps, you might also want to consider joining VoiceOps (if you're not already 
subscribed) and posting there. https://puck.nether.net/mailman/listinfo/voiceops


I have subscribed.  Thanks.

--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

--
_
-- 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] Touch tone stutter

2016-11-30 Thread D';Arcy Cain

On 2016-11-27 06:46 AM, Max Grobecker wrote:

Hi,

you could try switching the DTMF mode of the ATA's SIP peer (and also in the 
ATA itself) to INBAND transmission.
In this mode, the ATA doesn't need to recognise DTMF tones and your Asterisk 
can interpret it.
For this to work, the ATA needs to use a G.711 codec. Inband DTMF needs an 
uncompressed codec to work properly.

Another way is (if the ATA supports it) to switch DMTF mode to SIP INFO.
In this mode, DTMF is not interpreted out of the audio stream. For external 
peers which are not supporting this mode
Asterisk then generates the proper RTP messages or tones.

With SIP INFO mode I made my best results with all devices, sadly it's not very 
common used.


I have tried all of these ideas and it still does that stutter.  Can 
anyone suggest any other things to try?



--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

--
_
-- 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] PBX selection

2017-04-17 Thread D';Arcy Cain

On 2017-04-17 12:41 PM, Victor Villarreal wrote:

* Asterisk is build to work on Linux. So your team needs some skills
like setting up a basic Linux server (Debian, Centos, etc), donwload
software from Internet, compile and install software manually.


It may be that the developers mostly use Linux but Unix (i.e. BSD) works 
perfectly fine as well.  I run it on NetBSD and it is rock solid.


As for Asterisk vs. FreeSwitch, as a data point I started out with the 
latter but converted to Asterisk before going live.  FS really was more 
Linux oriented and I had many problems getting it working on NetBSD.  I 
also find the support here better.


If you run NetBSD (and probably any other BSD) you can install from 
their package system.  I compile from source using the package but you 
can also install a pre-compiled version just as easily.


Cheers.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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


[asterisk-users] Voicemail asking for login

2017-04-17 Thread D';Arcy Cain

We have a template for extensions and voicmail.  They look like this:

exten => %ACCOUNT%,1,Verbose(0,Entering extension %ACCOUNT%)
same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN})
same => n,Dial(SIP/%ACCOUNT%,30)

same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
same => n,Verbose(0,${CALLERID(all)} going into voice mail for 
%ACCOUNT%)

same => n,Set(_ACCOUNT=%ACCOUNT%)
same => n,VoiceMail(%ACCOUNT%@VoiceMail,u)
same => n,Hangup()

And for voicemail.conf:

%ACCOUNT% => %VM_PASSWORD%,%NAME%,%log...@vex.net

Here is the sip.conf template:

[%ACCOUNT%](client-phone)
secret=%PASSWORD%
callerid=%NAME% <%CLID%>
mailbox=%ACCOUNT%@VoiceMail
context=%CONTEXT%

Every user gets set up using these templates so I know that everyone is 
identical other than the '%' variables above.  I have looked and I don't 
see any significant differences.  The ACCOUNTs are strings with most 
having digits appended.  Obviously NAME, PASSWORD and LOGIN are 
different but not in kind.


My issue is with users picking up their VM from an external phone.  They 
call themselves and press '*' during the playback message.  Normally 
they are asked for their password and then get dropped into the proper menu.


One user (that we know of so far) has a different experience.  In that 
case they are asked for a mailbox number first.  I can't seem to find 
any significant difference in their configuration to account for that. 
Every other user that we have tested works as expected.  Some of them 
have extension that are all letters, some have trailing digits.  Some 
have associated cell phones and some don't.


I have tried searching for this issue but nothing seems to apply.  Most 
discussions are about "*97" vs. "*98".  Can anyone suggest another field 
of enquiry?


TIA.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-18 Thread D';Arcy Cain

On 2017-04-18 02:42 AM, Pete Mundy wrote:

Try this:

asterisk -r
core set verbose 10
[get user to trigger fault]
[examine console output, and post to list if still unclear]

If you don't solve it yourself, then we'll be able to help further once
we've seen the output.


I can't see much more than at my previous debug level but here it is 
anyway.  Due to line wrapping I added "<<<" to the end of each line in 
case it is not clear where the actual line endings are.


"Alex Chernyshev" <4164251212> going into voice mail for stocktrans2<<<
-- Executing [stocktrans2@LocalSets:19] Set("SIP/alex-0175", 
"_ACCOUNT=stocktrans2") in new stack<<<
-- Executing [stocktrans2@LocalSets:20] 
VoiceMail("SIP/alex-0175", "stocktrans2@VoiceMail,u") in new stack<<<
   > 0x7f7fea5dc000 -- Probation passed - setting RTP source 
address to 72.143.94.110:28503<<<
--  Playing 
'/var/spool/asterisk/voicemail/VoiceMail/stocktrans2/unavail.gsm' 
(language 'en')<<<
   > 0x7f7fea5dc000 -- Probation passed - setting RTP source 
address to 72.143.94.110:28503<<<
[Apr 18 11:45:38] DTMF[-1][C-0004c47b]: channel.c:4215 __ast_read: DTMF 
begin '*' received on SIP/alex-0175<<<
[Apr 18 11:45:38] DTMF[-1][C-0004c47b]: channel.c:4219 __ast_read: DTMF 
begin ignored '*' on SIP/alex-0175<<<
[Apr 18 11:45:38] DTMF[-1][C-0004c47b]: channel.c:4129 __ast_read: DTMF 
end '*' received on SIP/alex-0175, duration 160 ms<<<
[Apr 18 11:45:38] DTMF[-1][C-0004c47b]: channel.c:4199 __ast_read: DTMF 
end passthrough '*' on SIP/alex-0175<<<
-- Executing [a@LocalSets:1] Verbose("SIP/alex-0175", 
"stocktrans2 entering mailbox") in new stack<<<

stocktrans2 entering mailbox<<<
-- Executing [a@LocalSets:2] Set("SIP/alex-0175", 
"CDR(userfield)=stocktrans2") in new stack<<<
-- Executing [a@LocalSets:3] VoiceMailMain("SIP/alex-0175", 
"stocktrans2@VoiceMail") in new stack<<<

--  Playing 'vm-login.gsm' (language 'en')<<<
[Apr 18 11:45:49] WARNING[-1][C-0004c47b]: app_voicemail.c:10627 
vm_authenticate: Couldn't read username<<<


Everything looks the same as another one that works except for two 
things.  The one that works doesn't have the "Probation passed" lines. I 
am not sure if that is even part of this call.  The other is the line 
with "Playing 'vm-login.gsm'" in it.  at that point the working one has 
this:


--  Playing 'vm-password.gsm' (language 'en')

Not sure if that's useful information since it just describes the 
original issue - that it asks for a login instead of a password.



--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:da...@vex.net
VoIP: sip:da...@vex.net

--
_
-- 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] Voicemail asking for login

2017-04-18 Thread D';Arcy Cain

On 2017-04-18 08:31 PM, Victor Villarreal wrote:

Maybe excecuting the following command at Asterisk console, will help you:

asterisk> voicemail show users

And you will get a list of all mailbox configured in your system. Search
for the user with problems.


VoiceMail  stocktrans2 Angelica Douglas 12

Definitely there.  In fact, I generate all the configs from a database 
with a script so I would be very surprised if one user was different 
from another.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-18 Thread D';Arcy Cain

On 2017-04-18 08:17 PM, Pete Mundy wrote:

On 19/04/2017, at 7:58 am, D'Arcy Cain mailto:da...@vybenetworks.com>> wrote:


Everything looks the same as another one that works except for two
things.  The one that works doesn't have the "Probation passed" lines.
I am not sure if that is even part of this call.  The other is the
line with "Playing 'vm-login.gsm'" in it.  at that point the working
one has this:



Presumably also the line containing 'vm_authenticate: Couldn't read
username' also doesn't appear in the output on a working mailbox either?


Exactly.  Since it is not all digits it can't be entered.


I think that's the place to concentrate your efforts.

It shows shortly after the attempt by VoiceMailMain to enter mailbox
'stocktrans2' in context 'VoiceMail'. Does this mailbox exist?


Yes.


Can you show the equivalent line from a working mailbox (so we can see
if it also uses the context 'VoiceMail', or maybe something else
instead, like 'default'?).


"" <6477190146> going into voice mail for alex<<<
-- Executing [alex@LocalSets:19] Set("SIP/thinktel-0181", 
"_ACCOUNT=alex") in new stack<<<
-- Executing [alex@LocalSets:20] VoiceMail("SIP/thinktel-0181", 
"alex@VoiceMail,u") in new stack<<<
--  Playing 
'/var/spool/asterisk/voicemail/VoiceMail/alex/unavail.gsm' (language 
'en')<<<
[Apr 18 11:56:47] DTMF[-1][C-0004c485]: channel.c:4215 __ast_read: DTMF 
begin '*' received on SIP/thinktel-0181<<<
[Apr 18 11:56:47] DTMF[-1][C-0004c485]: channel.c:4219 __ast_read: DTMF 
begin ignored '*' on SIP/thinktel-0181<<<
[Apr 18 11:56:48] DTMF[-1][C-0004c485]: channel.c:4129 __ast_read: DTMF 
end '*' received on SIP/thinktel-0181, duration 280 ms<<<
[Apr 18 11:56:48] DTMF[-1][C-0004c485]: channel.c:4199 __ast_read: DTMF 
end passthrough '*' on SIP/thinktel-0181<<<
-- Executing [a@LocalSets:1] Verbose("SIP/thinktel-0181", "alex 
entering mailbox") in new stack<<<

alex entering mailbox<<<
-- Executing [a@LocalSets:2] Set("SIP/thinktel-0181", 
"CDR(userfield)=alex") in new stack<<<
-- Executing [a@LocalSets:3] VoiceMailMain("SIP/thinktel-0181", 
"alex@VoiceMail") in new stack<<<

--  Playing 'vm-password.gsm' (language 'en')<<<
[Apr 18 11:56:53] WARNING[-1][C-0004c485]: app_voicemail.c:10671 
vm_authenticate: Unable to read password<<<


I hung up before entering the password but it does work when the user 
does it.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-19 Thread D';Arcy Cain

On 2017-04-19 02:39 AM, Pete Mundy wrote:

Hmm... Above my pay grade I'm afraid! Looking at your 'voicemail

> show users' I can't see why the vm_authenticate function is
> failing to read the username :(

I can answer that one.  It's because we can't enter 'stocktrans2' from a 
telephone so we just hang up.  The question is, why does it ask for the 
mailbox in the first place>



If I were any good at coding in C, I'd probably look inside

> app_voicemail.c around line number 10671 and see if I could
> determine how it reads the username and maybe throw some hacky
? debug output in there to try and determine at which point of
> that process it's failing. But I'm no good at coding in that
> language, so will have to defer to others to help.

I guess that's my next stop.  Luckily I have kept my C skills somewhat 
active as the chief maintainer for PyGreSQL.  :-)


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-19 Thread D';Arcy Cain

On 2017-04-19 11:57 AM, J Montoya or A J Stiles wrote:

I fished this out of an old extensions.conf from a defunct project.  It might
be relevant to your use case:

exten => 1571,1,NoOp(Call to 1571: voicemail retrieval)
exten => 1571,n,AGI(lookup_caller_id.agi,${CALLERID(num)})
exten => 1571,n,NoOp(CLID is ${clid})
exten => 1571,n,VoiceMailMain(${clid},s)


I do something similar using *98.


The upshot of this was, if you dialled 1571 from your own phone, then you got
put straight through to your own voicemail, without logging in.


Yes and that works just fine for us.  The problem is that we are trying 
to deal with the situation where someone calls themselves from another 
phone (internal or external) to pick up their messages.  In every other 
case it asks for their password (which is always numeric) and goes into 
the VM.  This one extension asks for a mailbox.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-20 Thread D';Arcy Cain

On 2017-04-20 05:14 AM, J Montoya or A J Stiles wrote:

This is just screaming "configuration mismatch" -- or, possibly, "latent bug
whereby things parsed in separate places should be treated the same, but are
actually getting treated differently".


I really don't want to be the "my system isn't working so there must be 
a bug in Asterisk" guy but I am certainly starting to suspect it.



I think we are going to need to see your dialplan logic, and maybe your
voicemail.conf, in order to work out what is different between this one user
and all the others.  You might even need to use `hd` to examine the files, just
in case there is a stray non-printing character spoiling things.


Non-printing characters show up in vi so I would have seen that by now.

Every extension is build by a script that takes information from the 
database and does substitutions which is what makes this so baffling. 
Every extension is built exactly the same way.  Here are two voicemail 
entries, the failing one and mine that works.  The only sanitation I did 
was for the password.


stocktrans2 => ,Angelica Douglas,stocktra...@vex.net
darcy => ,Vybe Networks - D'Arcy,da...@vex.net

Here is the full dialplan for stocktrans2.

exten => stocktrans2,1,Verbose(0,Entering extension stocktrans2)
same => n,Goto(DialCell)
same => n,GotoIf($["x" = "x"]?DialAlt)

same => n(DialAll),Verbose(0,${CALLERID(all)} Calling ${EXTEN} and ALL)
same => n,Dial(SIP/stocktrans2&SIP/thinktel/&SIP/907084,30)
same => n,Goto(VoiceMail)

same => n(DialAlt),Verbose(0, ${CALLERID(all)} Calling ${EXTEN} and 
SoftPhone)

same => n,Dial(SIP/stocktrans2&SIP/907084,30)
same => n,Goto(VoiceMail)

same => n(DialCell),GotoIf($["x" = "x"]?DialDesk)
same => n,GotoIf($["${CALLERID(ani)}" = ""]?DialDesk)
same => n,Verbose(0,${CALLERID(all)} Calling "${EXTEN}" and cell "")
same => n,Dial(SIP/stocktrans2&SIP/thinktel/,30)
same => n,Goto(VoiceMail)

same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN})
same => n,Dial(SIP/stocktrans2,30)

same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
same => n,Verbose(0,${CALLERID(all)} going into voice mail for 
stocktrans2)

same => n,Set(_ACCOUNT=stocktrans2)
same => n,VoiceMail(stocktrans2@VoiceMail,u)
same => n,Hangup()

Here is mine.

exten => darcy,1,Verbose(0,Entering extension darcy)
same => n,GotoIf($["${DEVICE_STATE(SIP/901001)}" = 
"UNAVAILABLE"]?DialCell)

same => n,GotoIf($["x4168035991" = "x"]?DialAlt)

same => n(DialAll),Verbose(0,${CALLERID(all)} Calling ${EXTEN} and ALL)
same => n,Dial(SIP/darcy&SIP/thinktel/4168035991&SIP/901001,30)
same => n,Goto(VoiceMail)

same => n(DialAlt),Verbose(0, ${CALLERID(all)} Calling ${EXTEN} and 
SoftPhone)

same => n,Dial(SIP/darcy&SIP/901001,30)
same => n,Goto(VoiceMail)

same => n(DialCell),GotoIf($["x4168035991" = "x"]?DialDesk)
same => n,GotoIf($["${CALLERID(ani)}" = "4168035991"]?DialDesk)
same => n,Verbose(0,${CALLERID(all)} Calling "${EXTEN}" and cell 
"4168035991")

same => n,Dial(SIP/darcy&SIP/thinktel/4168035991,30)
same => n,Goto(VoiceMail)

same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN})
same => n,Dial(SIP/darcy,30)

same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
same => n,Verbose(0,${CALLERID(all)} going into voice mail for darcy)
same => n,Set(_ACCOUNT=darcy)
same => n,VoiceMail(darcy@VoiceMail,u)
same => n,Hangup()

There are some minor differences based on whether they have set up an 
alternate phone but either way it gets to the line that set the CDR 
userfield.  They both ultimately hit one or the other of these lines.


same => n,VoiceMail(stocktrans2@VoiceMail,u)
same => n,VoiceMail(darcy@VoiceMail,u)

The only "Set" command that might change the environment is the setting 
of "_ACCOUNT" which they both do.  Not sure why I even do that.  Perhaps 
I was planning some other feature that I never finished.  Or does 
VoiceMail() use it?


Someone (in private email for some reason so I won't give his name) 
suggested DumpChan() but I can't seem to make that work, even if I load 
app_dumpchan.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-20 Thread D';Arcy Cain

On 2017-04-20 12:23 PM, D'Arcy Cain wrote:


Here is the full dialplan for stocktrans2.


I reduced this to the following and I still have the error.

exten => stocktrans2,1,Verbose(0,Entering extension stocktrans2)
same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
same => n,Verbose(0,${CALLERID(all)} going into voice mail for 
stocktrans2)

same => n,VoiceMail(stocktrans2@VoiceMail,u)
same => n,Hangup()

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-20 Thread D';Arcy Cain

On 2017-04-20 12:52 PM, J Montoya wrote:

On Thursday 20 Apr 2017, D'Arcy Cain wrote:

On 2017-04-20 12:23 PM, D'Arcy Cain wrote:

Here is the full dialplan for stocktrans2.


I reduced this to the following and I still have the error.

exten => stocktrans2,1,Verbose(0,Entering extension stocktrans2)
 same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
 same => n,Verbose(0,${CALLERID(all)} going into voice mail for
stocktrans2)
 same => n,VoiceMail(stocktrans2@VoiceMail,u)
 same => n,Hangup()


O.K., so -- assuming that extension "darcy" behaves properly if you simplify
it similarly -- nothing before there can be causing the problem.


Actually, it also failed too when I reduced it.  Turns out that that's 
why I needed to set "_ACCOUNT".  Here is the actual reduced version for 
stocktrans2.  It still fails but substituting "darcy" for "stocktrans2 
works OK.


exten => stocktrans2,1,Verbose(0,Entering extension stocktrans2)
same => n(VoiceMail),Set(CDR(userfield)=VoiceMail)
same => n,Verbose(0,${CALLERID(all)} going into voice mail for 
stocktrans2)

same => n,Set(_ACCOUNT=stocktrans2)
same => n,VoiceMail(stocktrans2@VoiceMail,u)
same => n,Hangup()


What is in your [VoiceMail] context?  Are "stocktrans2" and "darcy" separate
extensions, or is there a catch-all?  What is in the "a" extension  (which
gets called when the * key is pressed) ?


Nothing in [VoiceMail] context except the mailboxes but this precedes 
the context:


[general]
attach=yes
maxsilence=10
maxlogins=3
serveremail=n...@vex.net
format=wav49
fromstring=Vybe Networks Voice Mail
nextaftercmd=yes
forcename=yes
pollmailboxes=yes
pollfreq=5

emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were 
just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox 
${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to 
check it when you get a chance.  Thanks!\n\n\t\t\t\t-- Vybe Networks\n


They are separate extensions.  I do not do catch-alls if I can help it. 
Since I generate the configs it is no big deal to expand everything in 
each extension.


; voice mail
  exten => a,1,Verbose(${ACCOUNT} entering mailbox)
same => n,Set(CDR(userfield)=${ACCOUNT})
same => n,VoicemailMain(${ACCOUNT}@VoiceMail)
same => n,Hangup

The VoiceMail extension, as are all the extensions, is in the 
[LocalSets] context.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] Voicemail asking for login

2017-04-20 Thread D';Arcy Cain

On 2017-04-20 04:07 PM, James Cloos wrote:

I enable full log and run 'core set debug 9' before doing a pair of
tests.

(The full log is easier to grep than the console output.)

Then compare a working vs stocktrans2 side by side.


I did debug 10 and saved the console output into files which I compared 
side by side.  No material difference.


--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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] How to detect fake CallerID? (8xx?)

2017-05-10 Thread D';Arcy Cain

On 2017-05-10 04:15 PM, Sebastian Nielsen wrote:

The thing is then to be able to record which IP is the client, but if your
services are ordered by the client via some web form, you could have that IP
be recorded as "client IP" and the employee must check in/check out from
that IP.


IPs change.  Also, the client may not have ordered the service from the 
office.  They may have bought the service for multiple locations from 
head office.  Too many variables.


You may have to think about hardware.  Some sort of RF device installed 
at the client with a unique ID.  The employee waves his keychain at the 
device, it connects to your office and sends the employee's ID and its 
own.  A card reader is another possibility or bar code reader.


Of course that's not a phone solution so I guess it is off topic here.

--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

--
_
-- 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