Re: [asterisk-users] Delay when dialing...

2021-07-23 Thread Steve Edwards

On Fri, 23 Jul 2021, Jeff LaCoursiere wrote:

Are you sure the call has been sent? Some phones have odd dialplans 
installed, and may not send the call to the SIP relay until you meet the 
dialplan reqs, press #, or otherwise wait the inter-digit timeout before the 
call is actually placed.


If you enable SIP debugging (and bump up debug and verbose), is the delay 
between when you dial and the INVITE is displayed or is the delay between 
the INVITE and subsequent steps in your dialplan.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Patch to remove numbers from the logs

2021-07-21 Thread Steve Edwards

Please don't top-post.

On Thu, 22 Jul 2021, Patrick Wakano wrote:

If you need something quick you could create a batch script with sed or 
awk to remove the log lines you want and attach it to the prerotate 
script of logrotate (in case you use any of these in your env). 
Certainly this is not a final solution but it is already something that 
doesn't depend on an asterisk patch.


On Thu, Jul 8, 2021 at 3:58 PM Dovid Bender  wrote:

We have a project where people will be making payments over the phone. I 
would like block Asterisk from logging any time the system is processing 
a card. So be it SayDigits(123456789), when the user enters DTMF or when 
I pass a card number as a variable to an AGI etc. I assume this affects 
others and I would like to have the patch created in a way that a. will 
be accepted by Sangoma and b. will work for anyone else that has this 
issue.


I suspect the concern is having credit card numbers anywhere on disk, 
anytime.


Your post suggests an alternative method that may be workable...

rsyslog has a module, 'omprog' -- "This module permits to integrate 
arbitrary external programs into rsyslog's logging"


I've never used it, but the description implies you could configure 
Asterisk to log to syslog, and then use rsyslog+omprog to pipe the 
messages through a script to filter out '16 digit numbers starting with 
456' or '15 digit numbers starting with 3.'


Way back in the day (before PCI), we used to keep the first 6 digits (the 
BIN) and the last 4 digits and replace the rest with x. We used to call 
the result a 'span.' I have no idea if this is current practice.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] HELP! AGI AUTOHANGUP does not seem to hangup the channel.

2021-05-27 Thread Steve Edwards

On Wed, 26 May 2021, Jonathan H wrote:


AGI Rx << SET AUTOHANGUP 5
AGI Tx >> 200 result=0
AGI Tx >> HANGUP   <<


This does raise a question in my mind...

The AGI protocol is: your AGI sends a request (the Rx line) and receives 
a response (the Tx line). 1 line out, 1 line in.


If the 'HANGUP' text can arrive asynchronously, how are you supposed to 
know it has arrived? Poll (or select) on the file pointer?


I cannot use other methods like setting the absolute channel timeout 
variable


I don't understand why you can't use the absolute channel timeout. 
Wherever you 'set autohangup x' just set 'TIMEOUT(absolute)=${EPOCH}+x.'


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] HELP! AGI AUTOHANGUP does not seem to hangup the channel.

2021-05-26 Thread Steve Edwards

On Wed, 26 May 2021, Jonathan H wrote:

It just causes AGI to send "HANGUP" and any audio to stop playing. It 
does NOT hangup the channel, or even send any SIP event. The line just 
goes silent.


I wouldn't expect the AGI() application to send a SIP event. The AGI()
application does not care what technology you use.

Receiving 'HANGUP' as text from Asterisk appears to be a FastAGI thing
which kind of makes sense -- if your FastAGI server is not localhost,
how could Asterisk send it a signal?

Are you supposed to close your TCP connection and exit your AGI when you 
receive the HANGUP text?


When I set autohangup in a 'normal' AGI, it looks like this:

AGI Tx >> agi_request: null-agi.php
AGI Tx >> agi_channel: SIP/poly-77a1-02a2
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1622093977.1168
AGI Tx >> agi_version: 13.14.1~dfsg-2+deb9u4
AGI Tx >> agi_callerid: 55
AGI Tx >> agi_calleridname: Steve Edwards
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: *
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: newline
AGI Tx >> agi_extension: *
AGI Tx >> agi_priority: 6
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode: 
AGI Tx >> agi_threadid: 1945654064
AGI Tx >> 
AGI Rx << set autohangup 5

AGI Tx >> 200 result=0
   > 0x73c3dba0 -- Strict RTP learning complete - Locking on source address 
192.168.0.139:2254
(and then after 5 seconds)
-- AGI Script null-agi.php completed, returning 4

--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] AGI: Why is stream file and wait for digit result ASCII, but get data is "normal"?

2021-05-24 Thread Steve Edwards

On Mon, 24 May 2021, Jonathan H wrote:


any idea why it was done like this, and why someone would ever need the
ascii result


Maybe because ABCD are valid DTMF events? Maybe because 0 means playback 
completed, not a 0 was pressed?


IIRC there are some inconsistencies in the AGI API that I stumbled across 
when I wrote my library back in '04. If you're not using a library, you 
may want to consider it.



AGI Rx << STREAM FILE "hello-world" "1,2,3,4,5,6,7,8,9,*,0,#"


'Comma' is not a valid 'digit' so this the same as '#*0123456789'

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] S3 Bucket support for playing sound files

2021-05-06 Thread Steve Edwards

On Thu, 6 May 2021, Jonathan H wrote:

"bumps up the outgoing volume to +7"

I use 'normalize --amplitude=-22dB" to adjust volume levels to consistent 
levels.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Loading Json values into asterisk as variable values

2021-02-26 Thread Steve Edwards

On Fri, 26 Feb 2021, Dovid Bender wrote:


Steve,
What language are your AGI's written in? I have been using PHP for a long time 
and every time it's launched there seems to be a run on the CPU. I wonder if I 
would be
better off using Python or something other than PHP.


C.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Loading Json values into asterisk as variable values

2021-02-25 Thread Steve Edwards

On Thu, 25 Feb 2021, Dovid Bender wrote:

Other than creating an AGI that opens a file to get a json object to set 
as variables is there any other easy way to set variables for a call 
when it starts?


Regardless of if there is a way in dialplan, I'd vote for an AGI to avoid 
what I suspect will be a bunch of fragile, difficult to maintain dialplan 
with quoting issues.


But, I am an AGI kind of guy :)

Some may argue that dialplan MAY be more performant, but I have an AGI 
that sets over 2,000 channel variables from MySQL tables and nobody has 
ever complained about call startup time.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] AGI Script Returning 4

2021-01-30 Thread Steve Edwards

On 1/30/21 1:18 PM, Alexander Perkins wrote:

the PHP-AGI script fails after it is executed and simply returns 
'returning 4'.


On Sat, 30 Jan 2021, Michal Rybarik wrote:

I think this can happen by hanging up the call by one party, when SIGHUP 
is sent to AGI script. PHP will exit on SIGHUP. It can be resolved by 
initializing signal handler in PHP script (pcntl_signal) for SIGHUP and 
doing nothing in it (return).


From res_agi.c:

enum agi_result {
AGI_RESULT_FAILURE = -1,
AGI_RESULT_SUCCESS,
AGI_RESULT_SUCCESS_FAST,
AGI_RESULT_SUCCESS_ASYNC,
AGI_RESULT_NOTFOUND,
AGI_RESULT_HANGUP,
};

so, AGI_RESULT_HANGUP == 4.

When Asterisk detects the hangup on the channel, it sends a SIGHUP to your 
AGI.


I always set a signal handler on SIGHUP and do what makes sense to my 
application: maybe some cleanup or syslog() before return() or exit(). 
Almost always exit().


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Get a SHAKEN Identity Token (Alexander Perkins)

2021-01-25 Thread Steve Edwards

On Mon, 25 Jan 2021, Jeff LaCoursiere wrote:

So how does this guy get around it?  It sounds to me like he is offering 
to sign calls for whoever, which IMO totally defeats the purpose.


IIRC, back when he first started hawking his solution, he accepted 
everything. Numbers from Vitelity, my old out of service copper number, 
555-555-.


I'm all for the discussion, but can you start a new thread so we don't 
keep associating the innocent party (the OP) with this spammer.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Get a SHAKEN Identity Token (Alexander Perkins)

2021-01-24 Thread Steve Edwards

On Sun, 24 Jan 2021, Saint Michael wrote:


Please look at this
https://issues.asterisk.org/jira/browse/ASTERISK-28924
I have a solution that works for any version of Asterisk, if interested contact 
me at venefax at the Google mail service.


"I have a commercial solution that works for any version of Asterisk, if 
interested contact me at venefax at the Google mail service."


Fixed. If you're going to post a commercial solution on a non-commercial 
forum, at least be up front about it.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] DAHDI timing

2021-01-06 Thread Steve Edwards

On Wed, 6 Jan 2021, Dovid Bender wrote:

The question is if it's using the card or the card or dahdi dummy (or 
whatever it's called) or if the card itself is being used.


Does this yield a clue?

pbx10:newline:13:47:53> module show like tim
Module Description  Use 
Count  Status  Support Level
res_timing_pthread.so  pthread Timing Interface 0   
   Running  extended
res_timing_timerfd.so  Timerfd Timing Interface 1   
   Running  core

(I don't have any boxes using cards so I can't test.)

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] DAHDI timing

2021-01-06 Thread Steve Edwards

On Wed, 6 Jan 2021, Dovid Bender wrote:

I have a box that I suspect had timing issues. I added a TE131 to see if 
that would help. Is there any way for me to verify that Dahdi is using 
the card for timing and not the kernel?


Does this yield a clue:

pbx10:newline:13:25:02> timing test
Attempting to test a timer with 50 ticks per second.
Using the 'timerfd' timing module for this test.
It has been 1000 milliseconds, and we got 50 timer ticks

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Detect if people is talking

2020-12-31 Thread Steve Edwards

On Wed, 30 Dec 2020, Valter Nogueira wrote:

We have some agents that pick calls but say nothing, letting customers 
"alone". Is there any way to detect if an agent is speaking?


I'm not sure I understand the situation. Are you saying agents are failing 
to do their job and just let the customer wait until they hang up in 
frustration?


If you record the calls, could you analyze them after the call? I don't 
use agents or queues so I don't know if it is possible, but the 
'monitor()' application records each leg in a separate file.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] faxdetect timeout configuration

2020-12-29 Thread Steve Edwards

On Wed, 30 Dec 2020, David Cunningham wrote:

Would anyone be able to tell us how to configure this option for calls 
arriving via chan_sip?


A 30,000 ft peek suggests you're out of luck unless you switch to pjsip:

-ws10::sedwards:~$ rgrep -l faxdetect_timeout /usr/src/asterisk-17.4.0/
/usr/src/asterisk-17.4.0/CHANGES
/usr/src/asterisk-17.4.0/ChangeLog
/usr/src/asterisk-17.4.0/channels/chan_dahdi.c
/usr/src/asterisk-17.4.0/channels/chan_dahdi.h
/usr/src/asterisk-17.4.0/channels/chan_misdn.c
/usr/src/asterisk-17.4.0/channels/chan_pjsip.c
/usr/src/asterisk-17.4.0/channels/misdn/chan_misdn_config.h
/usr/src/asterisk-17.4.0/channels/misdn_config.c
/usr/src/asterisk-17.4.0/configs/samples/chan_dahdi.conf.sample
/usr/src/asterisk-17.4.0/include/asterisk/res_fax.h
/usr/src/asterisk-17.4.0/include/asterisk/res_pjsip.h
/usr/src/asterisk-17.4.0/res/res_fax.c
/usr/src/asterisk-17.4.0/res/res_pjsip/pjsip_configuration.c

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] HELP! I can't get my Cisco CP-7960G IP hardphone to register on my Asterisk VoIP IP PBX SIP Server with FreePBX GUI

2020-12-23 Thread Steve Edwards

On Thu, 24 Dec 2020, Turritopsis Dohrnii Teo En Ming wrote:


3. secret is 8 char only, must be numeric


My my SIP.cnf file from 2007 contains:

image_version:  P0S3-8-12-00
line1_password: 346cc89a2526255839534c22ad7790c

and my notes say my 9760 only allowed up to 31 character passwords.

You may find it useful to use tcpdump with '-w' to write the packets to a 
file and then analyze with sngrep.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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 do I run a command on "Failed to authenticate" ?

2020-09-11 Thread Steve Edwards

On Fri, 11 Sep 2020, sean darcy wrote:


I'd like to get an alert if a call fails to authenticate:

if "Failed to authenticate" then
  mail someone the source ip
endif


How about fail2ban?

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Stir Shaken is upon us

2020-07-15 Thread Steve Edwards

On Sun, 12 Jul 2020, Steve Edwards wrote:

So this is a provider issue, not an end user issue and 'June 30, 2021' 
doesn't sound like 'soon.' If this is legit, why haven't my providers 
said squat?


Seems one of my providers, Vitelity (iax.cc to us old timers), when asked, 
is not panicking about the imminent end of the world:


"Thank you for reaching out.  We will not be doing any stir shaken changes 
until the end of the year.  If changes are necessary client side, we will 
let you know."


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Stir Shaken

2020-07-13 Thread Steve Edwards

On Mon, 13 Jul 2020, Jeff LaCoursiere wrote:

Some of us may actually be interested in what you have to offer if you 
changed the way you were presenting it. Who is going to base their 
business on some list guy with a gmail address?


And can't follow directions and honor the mailing list rules. He got 
spanked for this back in May.


I don't claim to understand much about this other than it is supposed to 
help reduce spam by making providers accountable for sending calls with 
CIDs that are not 'theirs.'


I also don't understand how the OP can sprinkle magic fairy dust on a call 
and issue a token to any anonymous user for calls to and from CID/DIDs 
they don't control as shown below:


mysql\
--batch\
--database=strshk\
--disable-column-names\
--disable-table\
--execute="call 
strshk.stir_shaken_signature('7602588003','7602588003');"\
--host=208.73.232.47\
--password=\
--user=anonymous\
| cut --characters=1-30
eyJhbGciOiJFUzI1NiIsInR5cCI6In

I have no business relationship with the OP or 7602588003 so how does this 
'token' add any value?


What am I missing?

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Stir Shaken is upon us

2020-07-12 Thread Steve Edwards

On Sun, 12 Jul 2020, Saint Michael wrote:


WORLDWIDE EMERGENCY


Again?

The code below needs to be executed before any SIP or PJSIP call 
destined to the US network, or soon no call will terminate. This is 
called Stir-Shaken, a new law from the FCC. If this is not working the 
whole Asterisk industry will crash, vanish, be gone.


Seen any little chickens lately?

According to 'https://www.fcc.gov/call-authentication':

"In March 2020, the Commission adopted new rules requiring all originating 
and terminating voice service providers to implement caller ID 
authentication using STIR/SHAKEN technological standards in the Internet 
Protocol (IP) portions of their networks by June 30, 2021."


So this is a provider issue, not an end user issue and 'June 30, 2021' 
doesn't sound like 'soon.' If this is legit, why haven't my providers said 
squat?



Server = 208.73.232.47


So why do you want everybody to send you their call metadata? What's your 
endgame? Generate leads to call to pitch your service? Poach clients?


Sorry if I sound cynical. It's 2020 and I'm fresh out of "F's."

--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Redis in place of astdb

2020-07-08 Thread Steve Edwards

On Wed, 8 Jul 2020, Dovid Bender wrote:


we need to use an AGI to connect to redis...


I can execute about 400 AGIs (written in C, only parsing the AGI 
environment) per second on a Linode Nanode:


verbose(1,${EPOCH});
agi(null-agi);
...
agi(null-agi);
verbose(1,${EPOCH});

Is the Redis startup (or script startup if you're using a scripting 
language) that expensive or are you running very high calls per second?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Redis in place of astdb

2020-07-08 Thread Steve Edwards

On Wed, 8 Jul 2020, Dovid Bender wrote:


Does anyone know of any projects that would allow you to use Redis in place of 
AstDB?


https://langiac.blogspot.com/2018/04/asterisk-dialplan-and-redis-integration.html 
covers func_redis and Perl Redis.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Forbidden call

2020-06-27 Thread Steve Edwards

On Fri, 12 Jun 2020, Jerry Geis wrote:

Any chance you can configure the speaker to syslog to your host so you may 
get a clue why the speaker is rejecting?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Any api (agi/ari/ami) equivalent of "core show calls"?

2020-06-14 Thread Steve Edwards
) not null
, mode  varchar(80) not null default ''
, directory varchar(255) not null default ''
, application   varchar(255) not null default ''
, digit char(1) not null default ''
, sort  varchar(16) not null default ''
, formatvarchar(16) not null default ''
, stamp timestamp
)
;

insert into musiconhold set
  name  = 'default'
, directory = '/var/lib/asterisk/moh'
, application   = ''
, mode  = 'files'
, digit = ''
, sort  = 'random'
, format= ''
;

insert into musiconhold set
  application   = '/usr/bin/mpg123 --mono -b 0 -f 8192 
-q -r 8000 -s -@ http://streaming.radionomy.com/80sFunkDanceMusic'
, mode  = 'custom'
, name  = 'foobar'
;

Hope this helps rather than hinders :)

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Any api (agi/ari/ami) equivalent of "core show calls"?

2020-06-13 Thread Steve Edwards

On Sat, 13 Jun 2020, Jonathan H wrote:

I need to ensure that a MusicOnHold stream is only running when there's 
a caller on hold and listening.To do that, I need to rewrite and reload 
the moh.conf file when the caller hangs up IF there are no other callers 
(ie there's just 1 active call as the caller hangs up), and then  
rewrite and reload again when there's a new caller.


How about ARA to configure MOH and then just update the database.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Forbidden call

2020-06-11 Thread Steve Edwards

On Thu, 11 Jun 2020, Jerry Geis wrote:


I have a call from a call file:


This looks a lot more like an AMI event than a call file. In any case, it 
doesn't matter.



Action: Originate
Async: yes
Channel: SIP/2012
Codecs: ulaw,alaw,gsm
Context: dialout
Exten: callprogress
Priority: 1
Timeout: 2
Variable: SIPADDHEADER="Alert-Info: Ring Answer"
ActionID: 100014
CallerID: Axis < 525 >



The SIP/2012 is a IP Speaker on the computer. The error is:
[Jun 11 15:44:45] WARNING[8132]: chan_sip.c:24191 handle_response_invite: Received 
response: "Forbidden" 

Why am I getting "Forbidden" ? Its a call file on my server


It's not a call file permissions thing. That would be a different error 
and reported by something before chan_sip.



the speaker is directly connected to my server.


How is an IP speaker 'directly connected?' Do you mean directly from the 
Ethernet on the speaker to a NIC on the computer? It doesn't matter, just 
curious :)


The only thing that will tell you what is going on is the packets. Crank 
up 'sip set debug on' and see if that yields a clue.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] problem with logger: syslog vs. file

2020-06-03 Thread Steve Edwards

On Wed, 3 Jun 2020, Fourhundred Thecat wrote:


On 2020-06-03 17:21, Steve Edwards wrote:

How about:

     syslog.local0   = error,verbose,warning

no debugging detail.

     syslog.local0   = debug,error,verbose,warning

include debugging detail.


currently, the above has no effect on logging.


Sorry. I guess I wasn't clear. I wasn't implying that the feature had 
already been implemented. I was replying to Tony's question 'should it be 
a configuration option in logger.conf whether they include or omit? if so, 
what should the default be, if not specified in logger.conf?'


I'm suggesting that if the 'debug' log level is specified, the debug 
detail (function name and line) should be included. Otherwise, not.


The 'debug' log level is 'already there' and it seems reasonable to me 
that if I'm deep enough into logging that I want debug level log messages 
that I'm probably also interested in logging debug details.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] problem with logger: syslog vs. file

2020-06-03 Thread Steve Edwards

On Wed, 3 Jun 2020, Fourhundred Thecat wrote:


On 2020-06-03 12:18, Tony Mountifield wrote:
In article <88f96e46-e6bb-a7ef-bebb-5588ef6cd...@gmx.ch>,

However, the conversation would then be: should both logging types include
line number and function? should both logging types omit them? should
it be a configuration option in logger.conf whether they include or omit?
if so, what should the default be, if not specified in logger.conf?


that's easy!

log level should be configurable in config file, not hardcoded.

Logging debugging info in production environment is madness.


How about:

syslog.local0   = error,verbose,warning

no debugging detail.

syslog.local0   = debug,error,verbose,warning

include debugging detail.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] STIR-Shaken

2020-05-28 Thread Steve Edwards

On Thu, 28 May 2020, Saint Michael wrote:


  My company is one if the six service providers approved.


Which part of 'Non-Commercial' do you not understand? The topic may be of 
general interest. Hawking your wares is not.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Stir-Shaken for asterisk

2020-05-27 Thread Steve Edwards

On Wed, 27 May 2020, Saint Michael wrote:


We are in the business of...


Then this probably should have been posted on -biz.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] rotatestrategy = none not working

2020-05-20 Thread Steve Edwards

On Wed, 20 May 2020, David Cunningham wrote:

Thanks for the answer. Since that's what we already have configured, any 
idea why it wouldn't work? As I said, when "asterisk -rx 'logger reload'" 
is run it still rotates the log file.


Sorry. No clues.


Here's a clue from asterisk-11.3.0-rc1/main/logger.c:

(line 94)
static enum rotatestrategy {
 SEQUENTIAL = 1 << 0, /* Original method - create a new file, in 
order */
 ROTATE = 1 << 1, /* Rotate all files, such that the oldest 
file has the highest suffix */
 TIMESTAMP = 1 << 2,  /* Append the epoch timestamp onto the end of 
the archived file */
} rotatestrategy = SEQUENTIAL;

So the default strategy is SEQUENTIAL.

(line 423)
 if ((s = ast_variable_retrieve(cfg, "general", "rotatestrategy"))) {
 if (strcasecmp(s, "timestamp") == 0) {
 rotatestrategy = TIMESTAMP;
 } else if (strcasecmp(s, "rotate") == 0) {
 rotatestrategy = ROTATE;
 } else if (strcasecmp(s, "sequential") == 0) {
 rotatestrategy = SEQUENTIAL;
 } else {
 fprintf(stderr, "Unknown rotatestrategy: %s\n", s);
 }

So, since 'none' is not a valid option, the default remains set.

Since the code casually appears the same in 11.17.1, I'll have to 
backtrack on my assessment that 11.17.1 doesn't rotate without a more in 
depth analysis.


I don't know when 'none' became a valid option, but 17.4.0 has these as 
the respective snippets:


static enum rotatestrategy {
 NONE = 0,/* Do not rotate log files at all, instead 
rely on external mechanisms */
 SEQUENTIAL = 1 << 0, /* Original method - create a new file, in 
order */
 ROTATE = 1 << 1, /* Rotate all files, such that the oldest 
file has the highest suffix */
 TIMESTAMP = 1 << 2,  /* Append the epoch timestamp onto the end of 
the archived file */
} rotatestrategy = SEQUENTIAL;

 if ((s = ast_variable_retrieve(cfg, "general", "rotatestrategy"))) {
 if (strcasecmp(s, "timestamp") == 0) {
 rotatestrategy = TIMESTAMP;
 } else if (strcasecmp(s, "rotate") == 0) {
 rotatestrategy = ROTATE;
 } else if (strcasecmp(s, "sequential") == 0) {
 rotatestrategy = SEQUENTIAL;
 } else if (strcasecmp(s, "none") == 0) {
 rotatestrategy = NONE;
 } else {
 fprintf(stderr, "Unknown rotatestrategy: %s\n", s);
 }

So, backport or upgrade?

Also, inquiring minds want to know why the enum is in powers of 2? It's 
not like we can set sequential AND timestamp.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 https://www.linkedin.com/in/steve-edwards-4244281

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] rotatestrategy = none not working

2020-05-20 Thread Steve Edwards

On Wed, 20 May 2020, David Cunningham wrote:

Thanks for the answer. Since that's what we already have configured, any 
idea why it wouldn't work? As I said, when "asterisk -rx 'logger 
reload'" is run it still rotates the log file.


Sorry. No clues. I always use 'syslog' for logging everything. I just did 
a quickie test to see if I could replicate the behavior.


There's about 600 lines of 'diff' between 
asterisk-11.3.0-rc1/main/logger.c and asterisk-11.17.1/main/logger.c.


Maybe 'upgrading' to 11.17 wouldn't be too painful if it would resolve 
your issue?


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] rotatestrategy = none not working

2020-05-20 Thread Steve Edwards

On Wed, 20 May 2020, David Cunningham wrote:

We have an Asterisk 11.3 server where we want log rotation handled 
purely by Linux's logrotate, and not by Asterisk. To this end we've 
configured the [general] action of /etc/asterisk/logger.conf with:


rotatestrategy = none

However, an "asterisk -rx 'logger reload'" still rotates the log files. 
Does anyone know why?


I had to hunt, but I found an 11.17.1 system :)

'none' does not rotate a log file on this host. Here's my logger.conf:

; Created by makefile on 2020-05-19 at 23:05:08
; from /source/src/obl-server/logger.conf.pre

[general]
rotatestrategy  = none

[logfiles]
/tmp/ast-log-test   = 
debug,dtmf,error,event,notice,verbose,warning

; (end of /etc/asterisk/obl/logger.conf)

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Perl AGI: read variable with quotes

2020-01-24 Thread Steve Edwards

On Fri, 24 Jan 2020, Steve Edwards wrote:


2) How about doing 'GET FULL VARIABLE' in your Perl script?


Sorry. After a couple more cups of tea I think this was a bit vague.

Try whatever call/method in your library that does 'GET FULL VARIABLE' on 
'${PJSIP_HEADER(read,P-Asserted-Identity)}' in your AGI.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Perl AGI: read variable with quotes

2020-01-24 Thread Steve Edwards

On Fri, 24 Jan 2020, Benoit Panizzon wrote:


I have stumbled of this problem.

I need the P-Asserted-Identity header in an AGI scrip.

In the Dial-Plan I do:

same => n,Set(PAI=${PJSIP_HEADER(read,P-Asserted-Identity)})

In the AGI I do:

my $pai = $AGI->get_variable(PAI);

This works fine, unless the PAI contains quotes:

P-Asserted-Identity: 

I get "" in the variable $pai.

P-Asserted-Identity: "John Doe" 

Is getting me $pai containing just "John".

Anyone a clue how I could get the whole header?


1) Does the PAI channel variable contain the full header? Try 'verbose(PAI 
= ${PAI})' or something similar.


2) How about doing 'GET FULL VARIABLE' in your Perl script? You can set 
the channel variable PAI in the AGI if needed back in the dialplan.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] USB dahdi fxo ?

2019-12-13 Thread Steve Edwards

On Fri, 13 Dec 2019, sean darcy wrote:

I'm moving asterisk to a laptop, so can't use the dahdi board. Is there any 
supported USB dahdi device ? I see the Sangoma USBfxo device, but the dahdi 
driver no longer supports it. Anything else ?


How about something like the ancient Ethernet based Sipura 3000?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Two sip extensions

2019-07-19 Thread Steve Edwards

On Fri, 19 Jul 2019, Jerry Geis wrote:

I was not aware of the (+) format... basically "add" to the general 
section.


How far back does that go? T o 1.4.X ?


I don't know, but I checked a sip.conf from 1.2 (2012ish?) and I was using 
it then.



Is there a documentation piece on that ?


I'm sure there is, I just don't know where :)

Another cool configuration file feature is templates (an exclamation mark 
instead of a plus sign). It lets you define common 'snippets' once and 
include them in each context as needed.


Here's an example from that same (1.2 based) project:

; templates
[digit-timeout](!)
exten = t,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = t,n,goto(${CONTEXT},s,1)
[h](!)
exten = h,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = h,n,goto(settle-card,s,1)
[i](!)
exten = i,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = i,n,goto(${CONTEXT},s,1)
[s](!)
exten = s,1,verbose(1,[${EXTEN}@${CONTEXT}])
[max-timeout](!)
exten = T,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = T,n,goto(max-time,s,1)
[x](!)
exten = _x.,1,  verbose(1,[${EXTEN}@${CONTEXT}])

; authorized the card
[auth-card](h,i,s,max-timeout,digit-timeout)
exten = s,2,agi(write-cdr)
exten = s,n,set(PRODUCT=${CONTEXT})
exten = s,n,set(PER-MINUTE=0)
exten = s,n,set(PREAMBLE=${CUSTOMER}/menu/m1101)
exten = s,n,
agi(auth-card,${AUTH-FLAGS},${DEBUG-MODE},${VERBOSE-MODE})
exten = s,n,goto(theme,s,1)

The templates are inserted into the auth-card context when the file is 
parsed. I don't have a 1.2 host running anymore, but a 'show dialplan 
auth-card' (1.2) would look something like:


[auth-card](h,i,s,max-timeout,digit-timeout)
exten = T,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = T,n,goto(max-time,s,1)

exten = h,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = h,n,goto(settle-card,s,1)

exten = i,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = i,n,goto(${CONTEXT},s,1)

exten = s,1,verbose(1,[${EXTEN}@${CONTEXT}])

exten = s,2,agi(write-cdr)
exten = s,n,set(PRODUCT=${CONTEXT})
exten = s,n,set(PER-MINUTE=0)
exten = s,n,set(PREAMBLE=${CUSTOMER}/menu/m1101)
exten = s,n,
agi(auth-card,${AUTH-FLAGS},${DEBUG-MODE},${VERBOSE-MODE})
exten = s,n,goto(theme,s,1)

exten = t,1,verbose(1,[${EXTEN}@${CONTEXT}])
exten = t,n,goto(${CONTEXT},s,1)

Templates are also useful in other configuration files like sip.conf to 
define 'classes' of parameters like 'dial-in-agent' or 'supervisor' that 
can be included in endpoint definitions to reduce clutter, increase 
consistency, and reduce maintenance.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Two sip extensions

2019-07-18 Thread Steve Edwards

On Thu, 18 Jul 2019, Joshua C. Colp wrote:


On Thu, Jul 18, 2019, at 10:10 AM, Jerry Geis wrote:

I have two SIP extensions defined in sip.conf

register => 4450@10.20.1.1/4450
[4450]
type=friend
username=4450
host=10.20.1.1
allow=all
dtmfmode=inband
context=incoming

register => 4451@10.20.1.1/4451
[4451]
type=friend
username=4451
host=10.20.1.1
allow=all
dtmfmode=inband
context=incoming


"register" lines have to be under the general section. They can't be within a 
friend/peer/user.


I format my entries in sip.conf like below to keep everything related to 
the endpoint together.


; 4450
[general](+)
register= 4450@10.20.1.1/4450
[4450]
allow   = all
context = incoming
dtmfmode= inband
host= 10.20.1.1
type= friend
username= 4450

; 4451
[general](+)
register= 4451@10.20.1.1/4451
[4451]
allow   = all
context = incoming
dtmfmode= inband
host= 10.20.1.1
type= friend
username= 4451

I like to keep the parameters in each stanza sorted and 'tabbed out' to 
make it easier to compare stanzas and because I'm just that kind of guy :)


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Find out which key ended recording?

2019-06-07 Thread Steve Edwards

On Fri, 7 Jun 2019, David Cunningham wrote:


We're using Perl and so far I haven't found an equivalent there.


On Thu, 6 Jun 2019, Steve Edwards wrote:


I'm not much of a Perl programmer...


But you should never turn down an opportunity to develop your skills :)

Try something like:

my $result = $AGI->record_file(
  '/tmp/foo'# filename
, 'wav' # format
, '#*0123456789'# escape digits
, '5000'# timeout
);
$AGI->verbose('result =  ' . $result, 0);

Which results in:

AGI Rx << RECORD FILE /tmp/foo wav #*0123456789 5000
AGI Tx >> 200 result=50 (dtmf) endpos=0
AGI Rx << VERBOSE "result =  50"

when '2' is pressed.

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Find out which key ended recording?

2019-06-07 Thread Steve Edwards

On Fri, 7 Jun 2019, David Cunningham wrote:


What language is that please?


C.


We're using Perl and so far I haven't found an equivalent there.


I'm not much of a Perl programmer, but I'd guess something like:

$AGI->result

or

$AGI->lastresult

might yield clues.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Find out which key ended recording?

2019-06-07 Thread Steve Edwards

On Fri, 7 Jun 2019, David Cunningham wrote:


We're using Perl and so far I haven't found an equivalent there.


On Thu, 6 Jun 2019, Steve Edwards wrote:


I'm not much of a Perl programmer...


But you should never turn down an opportunity to develop your skills :)

Try something like:

my $result = $AGI->record_file(
  '/tmp/foo'# filename
, 'wav' # format
, '#*0123456789'# escape digits
, '5000'# timeout
);
$AGI->verbose('result =  ' . $result, 0);

Which results in:

AGI Rx << RECORD FILE /tmp/foo wav #*0123456789 5000
AGI Tx >> 200 result=50 (dtmf) endpos=0
AGI Rx << VERBOSE "result =  50"

when '2' is pressed.

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Find out which key ended recording?

2019-06-06 Thread Steve Edwards

On Fri, 7 Jun 2019, David Cunningham wrote:

We have a need to record audio and allow the user to press any DTMF key 
to end the recording. Currently we're using the AGI command "record 
file" which does allow us to specify which DTMF keys can end the 
recording.


However we also need to know which key actually ended the recording. 
Note that only allowing # or * to end the recording won't work for us.


Does anyone know how we can tell which key ended the recording? Thanks 
in advance for any help.


Here's a snippet from one of my AGIs:

// record the voice
exec_agi("RECORD FILE"
  " %s" // filename
  " wav"// format
  " #*1234567890"
// escape digits
  " %d000"  // timeout in ms
  " BEEP"   // BEEP
, recorded_path
, recording_limit
);

// should we abort?
if  ('*' == agi_environment.result)
{
agi_set_variable("STATUS", "*");
exit(EXIT_SUCCESS);
}

// are we finished?
if  ('#' == agi_environment.result)
{
break;
}

Looks like agi_environment.result is your Huckleberry.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Play Music While Processing AGI Script

2019-05-14 Thread Steve Edwards

On Tue, 14 May 2019, Alexander Perkins wrote:


Hi All.  I have a question - I have an AGI script that may run for 10 seconds, 
or it may run for 60 seconds while an agent becomes available (agents are 
geographically
dispersed).  Is there a way to have the music play in the background while the 
AGI scripts executes?  When the AGI script finishes, then the music should also 
finish. 
I tried this, but the music needs to finish before moving on to step 4 and 
execute the script.

exten => _NXZNXX,1,Answer()
exten => _NXZNXX,2,MusicOnHold()
exten => _NXZNXX,3,AGI(SetRecordingID.php,${UNIQUEID})


Create a separate thread in your AGI to play a small segment (5 to 10 
seconds) of music in a loop. At the end of each 'play' check to see if the 
AGI is ready to exit.


Off topic, but you can make maintenance of your dialplan easier if you 
write it like:


exten = _nxznxx,1,  answer()
same = n,   musiconhold()
same = n,   agi(SetRecordingID.php,${UNIQUEID})

The 'whitespace' and 'lowcasing' is just my personal preference. I would 
also use 'getopt/longopts' to parse the command line so you can have 
meaningful (long) options and are not dependent upon passing arguments in 
a particular order.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Sending SMS and SIM card

2019-04-23 Thread Steve Edwards

On Tue, 23 Apr 2019, bilal ghayyad wrote:

Is it possible to send SMS from asterisk? Using DAHDI or using what is 
possible?


You can use an SMS provider like Twillio.

And, is there a card that can be fixed in the machine and insert the SIM 
card in this card to be used for GSM calls and sending SMS through 
asterisk? Through which channel? Is it DAHDI or something else?


I've never used an internal card, but what you're looking for is a GSM 
gateway.


I used a Goip32 (32 SIMs, 32 channels) a couple of years ago. It is an 
external box you hang on your network via Ethernet.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Forking AGI or GoSub

2019-04-10 Thread Steve Edwards

On Wed, 10 Apr 2019, Dovid Bender wrote:

I have an AGI that can sometimes take time complete. I don't want the 
dialplan to be held up by the agi. Is there any way to call it and have 
Asterisk continue with the dialplan?


On Wed, 10 Apr 2019, Dovid Bender wrote:

I have an AGI that can sometimes take time complete. I don't want the 
dialplan to be held up by the agi. Is there any way to call it and have 
Asterisk continue with the dialplan?


I had a situation that required this functionality -- processing a credit 
card could take a second or two and we didn't want 'dead air' for our user 
experience.


I created a pthread to play 'Please hold on while we process your card and 
get ready for a good time...' while the main program continued with the 
card authorization.


Most of the time the auth completed before the audio finished so it 
appeared to be instantaneous to the caller.


The only caveat is to not interact (stdin/stdout) with Asterisk until 
'stream file' in the thread completed.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] AMI mulitple calls quickly

2019-03-12 Thread Steve Edwards

On Mon, 11 Mar 2019, Jerry Geis wrote:

If I use the AMI interface to originate a call, close the connection, 
open another connection etc...This works. but is slow...


Would opening multiple AMI connections be an option?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Outbound caller ID ignored

2019-01-13 Thread Steve Edwards

On Sun, 13 Jan 2019, Mitch Claborn wrote:

Setting the outbound caller ID works fine on our PRI (T1) lines, but 
does not work on our local POTS lines. No errors in the logs, the new 
caller ID just seems to be ignored. Should I expect it to work on the 
analog lines?


Nope. Setting caller ID is not a POTS feature.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Custom langagues

2019-01-01 Thread Steve Edwards

On Tue, 1 Jan 2019, Dovid Bender wrote:


Hi,
I am working on writing my own custom language (Yiddish) which resembles de. I 
found de to be mainly in main/say.c. I am a novice when it comes to c. Would 
changing:
} else if (!strncasecmp(lang, "de", 2)) {
to:
} else if (!strncasecmp(lang, "de", 2) ||!strncasecmp(lang, "yiddish", 2)) {
do the trick or am I better of adding where ever I see:
       } else if (!strncasecmp(lang, "de", 2)) { /* German syntax */
                return ast_say_date_de(chan, t, ints, lang);
 

to add:
       } else if (!strncasecmp(lang, "yiddish", 2)) { /* Yiddish syntax (like 
German) */
                return ast_say_date_de(chan, t, ints, lang);


(The 3rd parameter of strncasecmp is the number of bytes to compare. Thus, 
'yippie ki-yay' will match 'yiddish.')


As I interpret your question, is it better to 'piggy-back' on 'de' or 
replicate code for 'yi[ddish]?'


I have no experience with this code and I don't know the magnitude of the 
changes, but if the changes don't involve large blocks of code, my 
personal preference would be to replicate.


It will establish a precedence for future additions. Trying to accommodate 
a multitude of languages with 'if a or b but not c or d...' can lead to 
difficult to comprehend and maintain code.


If you do find some subtle differences, it will be easier to handle.

While 'piggy-backing' may be slightly more efficient (in run time and 
memory), ease of comprehension and maintenance are more important.


As an aside, why is strncasecmp() being used instead of strncmp()? 
Wouldn't it be better to 'down-case' lang once instead of every time it is 
used? (Or is this the only time it is used?)


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Capture SIP all the time

2018-12-05 Thread Steve Edwards

On Wed, 5 Dec 2018, Saint Michael wrote:

Is there a way to configure the old SIP channel to stay in sip set debug 
all the time, without human intervention and also at boot time, by 
default?


If your goal is capture all SIP traffic, there may be other tools better 
suited.


For example, tcpdump, dumpcap, or pcapsipdump can capture SIP packets. 
pcapsipdump can even capture the RTP along with the SIP so you can listen 
to the call if that doesn't make your bosses and coworkers freak out.


I like to capture all of the SIP traffic in a pool of files that
expire after 30 days. Then, when somebody says 'hey, my call didn't 
connect yesterday' I have something to work with.


sngrep is a great tool for searching for calls and displaying decoded 
dialogs.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Best way to update ever changing dialplans

2018-06-25 Thread Steve Edwards

On Mon, 25 Jun 2018, Dovid Bender wrote:

I am working on a system where I connect to an external API and based on 
what it gives me I generate the Asterisk dial plan accordingly. I am 
thinking about my different options and wanted feedback from others on 
how to best do it.1) Generate conf files for Asterisk - This seems the 
easiest but then I will be doing a dial plan reload on all of my dial 
plan for handful of lines of code. The plus side is once reload is don 
the dial plan is in memory.


2) Using real time + mysql - Seems like an overkill to have mysql 
running taking resources for a few lines.


3) Using real time + sqlite3 - This seems like the best option but then 
we go to disk every time there is a call.



Any other options that I am not thinking of?


I think that you have enumerated the reasonable options. I'd vote for #1.

1) Easier to implement and debug.

2) Easier to 'snapshot' for backup and restore.

Other factors that may bias my choice would be the size of the dialplan 
and the frequency of the updates.


Maybe another option would be to use the CLI 'dialplan add' and 'dialplan 
remove' commands.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Decoding SIP register hack

2018-05-17 Thread Steve Edwards

On Thu, 17 May 2018, Daniel Tryba wrote:

You can do nothing to stop this kind of traffic. The only thing you can 
do is block it, either using only a whitelist (cumbersome) or generate a 
blacklist with for example fail2ban or a more elaborate honeypot setup. 
Or setup a proxy that will filter patterns you discover from


Keep in mind that since this is UDP, source addresses can be spoofed so 
any automated solution will need a whitelist so you don't get tricked into 
blocking legitimate traffic.


And since you 'need a whitelist' why not just use that and block 
everything else?


A clever solution to a mobile user base is to use knockd to allow remote 
access.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP Codec negotiation

2018-05-17 Thread Steve Edwards

On Fri, May 11, 2018, at 10:36 AM, Steve Edwards wrote:


So, Asterisk will defer it's choice of codec to match the codec it detects
in the incoming stream?


On Fri, 11 May 2018, Joshua Colp wrote:


It depends on the channel driver and configuration. The chan_sip module 
always matching outgoing codec to the incoming codec. The chan_pjsip 
module has an option to do that (which is on by default).


Is this why I see occasional notices in my log file like:

Dropping incompatible voice frame on SIP/xxx of format ulaw since our 
native format has changed to (gsm)


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP Codec negotiation

2018-05-11 Thread Steve Edwards

On Fri, 11 May 2018, Joshua Colp wrote:

In the above example, even though the INVITE/SDP says they prefer gsm 
over ulaw and the OK/SDP says I prefer ulaw over gsm, they can choose 
to use gsm or ulaw?


Yes.


Can it be asymmetrical? They send gsm and I send ulaw?


Technically, yes. In practice it's a bit iffy - specifically because 
some DSPs in devices won't allow it - they require a single codec be in 
use for each direction.


So, Asterisk will defer it's choice of codec to match the codec it detects 
in the incoming stream?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP Codec negotiation

2018-05-11 Thread Steve Edwards

On Thu, May 10, 2018 at 11:44:14AM -0700, Steve Edwards wrote:



I receive an INVITE/SDP containing:

m=audio 11310 RTP/AVP 3 0 101

which I interpret as gsm, ulaw, rfc2833.

and I reply with an OK/SDP containing:

m=audio 15884 RTP/AVP 0 3 101

which I interpret as ulaw, gsm, rfc2833.

How can I tell which codec was actually used for the call?


On Fri, 11 May 2018, Daniel Tryba wrote:


AFAIK this is undetermined. The callee can send either ulaw or gsm,
unless the caller wants to narrow it down to 1 codec, see
https://tools.ietf.org/html/rfc4317#section-2.2

Most of the time the callee will pick the first (so in this case ulaw).
But there are media gateways out there that choose g711[au] above "more
complex" codecs regardless order in SDP. My prefer PSTN provider will
always prefer alaw if offered since that will prevent transcoding on
their side if the call goes to ISDN/POTS, but AMR if the call goes to
VoLTE.


So, without examining the RTP, you cannot tell which codec was actually 
used?


In the above example, even though the INVITE/SDP says they prefer gsm over 
ulaw and the OK/SDP says I prefer ulaw over gsm, they can choose to use 
gsm or ulaw?


Can it be asymmetrical? They send gsm and I send ulaw?

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP Codec negotiation

2018-05-10 Thread Steve Edwards

I receive an INVITE/SDP containing:

m=audio 11310 RTP/AVP 3 0 101

which I interpret as gsm, ulaw, rfc2833.

and I reply with an OK/SDP containing:

m=audio 15884 RTP/AVP 0 3 101

which I interpret as ulaw, gsm, rfc2833.

How can I tell which codec was actually used for the call?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] AGI fails bad permission

2018-02-23 Thread Steve Edwards

On Fri, 23 Feb 2018, Saint Michael wrote:


Launched AGI Script /var/lib/asterisk/agi-bin/adddnc.php
 adddnc.php: Failed to execute '/var/lib/asterisk/agi-bin/adddnc.php': 
Permission denied



The file is of course chmod +x /var/lib/asterisk/agi-bin/*.php


This is how a sysadmin opened up a web server to compromise a decade or 2 
ago. The CGI directory contained some flawed SGI CGIs that had been 
disabled by fiddling with the permissions.


More information may yield a clue.

1) ps -aef | grep asterisk | grep --invert-match grep

2) sudo grep 'astagidir' /etc/asterisk/asterisk.conf

3) grep adddnc /etc/asterisk/extensions.{ael,conf}

4) head --lines=1 /var/lib/asterisk/agi-bin/adddnc.php

5) ls -l $(head --lines=1 /var/lib/asterisk/agi-bin/adddnc.php\
| awk '{print substr($1, 3, 255)}')

6) sudo /usr/bin/php (or wherever you keep php) \
/var/lib/asterisk/agi-bin/adddnc.php 7) Check the 'r' and 'x' bits on /var/, /var/lib/, /var/lib/asterisk/, 
/var/lib/asterisk/agi-bin/.


8) cat /var/lib/asterisk/agi-bin/adddnc.php

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] [OT] How to use audio files with SIPp

2018-02-09 Thread Steve Edwards

On Fri, 9 Feb 2018, Olivier wrote:


3. How do you capture an RTP flux with thark or tcpdump ?


Take a look at 'pcapsipdump.'

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Answered time on channel

2018-01-02 Thread Steve Edwards

  On Tue, 26 Dec 2017, Eric Wieling wrote:

Don't use an 'h' extension, use a hangup handler.  



On 12/26/2017 04:43 PM, Steve Edwards wrote:

  Why?


On Tue, 2 Jan 2018, Eric Wieling wrote:


From the hangup handler specification:


Hangup handlers are an alternative to the h extension. They can be used 
in addition to the h extension. The idea is to attach a Gosub routine to 
a channel that will execute when the call hangs up. Whereas which h 
extension gets executed depends on the location of dialplan execution 
when the call hangs up, hangup handlers are attached to the call 
channel. You can attach multiple handlers that will execute in the order 
of most recently added first.


Cool. So in my case where every context has:

exten = h,1,goto(finish-call,h,1)

a hangup handler established at the start of the call makes perfect sense 
and prevents stupid errors like forgetting to list the template in the 
context declaration.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Answered time on channel

2017-12-26 Thread Steve Edwards

On Tue, 26 Dec 2017, Eric Wieling wrote:


Don't use an 'h' extension, use a hangup handler.  


Why?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Chan Local, Originate and slin

2017-11-22 Thread Steve Edwards

On Wed, 22 Nov 2017, Kseniya Blashchuk wrote:

Hmm thanks, I guess I should try the latest version just to check. 
Unfortunately Ubuntu asterisk is not so frequently updated, just 
backports on security updates


Lubuntu 17.10 installed Asterisk 13.17.2.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Chan Local, Originate and slin

2017-11-22 Thread Steve Edwards

On Wed, 22 Nov 2017, Dmitriy Serov wrote:


 same => n,System(printf "Action: Originate\nActionID: 1\nChannel: 
Local/${number}@mycontext\nApplication: Confbridge\nData: ${confnum}\n" >
/var/spool/asterisk/outgoing/${number}-${confnum})


I get:

Unknown keyword 'Action' at line 1 of /var/spool/asterisk/outgoing/...
Unknown keyword 'ActionID' at line 2 of /var/spool/asterisk/outgoing/...

These are 'AMI' commands, not call file commands.

Also, just in case you're not aware, 'best practice' is to create the call 
file in a 'temp' directory on the same partition as 
${astspooldir}/outgoing/ and then 'mv' the file to that directory.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Call preemption

2017-11-08 Thread Steve Edwards

Please don't top-post.

On Wed, 8 Nov 2017, Markus wrote:

The task itself sounds like a job for an AGI script to me... check for amount 
of calls, if 10, hangup one.


But how do you determine the priority of a call?


Am 07.11.2017 um 12:21 schrieb Jean Aunis:

Hello,

Has anyone already implemented some sort of call preemption in Asterisk ? I 
am trying to achieve something like this :

[...]

Does anyone have an idea ?


An AGI using AMI to do 'core show channels concise', parse the output, 
pick your victim, AMI to do 'channel request hangup x'


Note that there are 'race condition' opportunities.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] A bit OT - Configure GoIP for Asterisk

2017-10-03 Thread Steve Edwards

On Mon, 2 Oct 2017, Antony Stone wrote:


On Monday 02 October 2017 at 20:58:33, Steve Edwards wrote:


I recently received a GoIP-32 for a client project -- primarily outbound
calling.

How should a GoIP be configured for Asterisk?


Have you tried http://www.hybertone.com/en/solutionsClass.asp?Id=78


Thanks, but no joy.

When I first power up the box, 'sip show peers' shows:

Name/username Host  Dyn Forcerport Comedia ACL Port Status
Description
goip/goip (Unspecified) D  YesYes  0OK (5 ms)

But then a few seconds later it shows:

Name/username Host  Dyn Forcerport Comedia ACL Port Status
Description
goip/goip (Unspecified) D  YesYes  0UNKNOWN

Every few seconds I get 'empty' SIP debug messages on the console like:

<--- SIP read from UDP:192.168.0.51:5087 --->

<->

Wireshark says they're only 3 bytes long and contain 'SIP'.

When I dial, I get:

-- Executing [*@newline:6] Dial("SIP/poly-e637-00cb", 
"sip/goip/xx") in new stack
  == Everyone is busy/congested at this time (1:0/0/1)

No SIP messages are displayed -- I'm guessing that's a result of the 'status 
UNKNOWN'.

--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] A bit OT - Configure GoIP for Asterisk

2017-10-02 Thread Steve Edwards
I recently received a GoIP-32 for a client project -- primarily outbound 
calling.


How should a GoIP be configured for Asterisk? No fancy shmancy Elastix or 
FPBX GUI -- just using the configuration files.


Single Server Mode, Config By Line, and Trunk Gateway Mode all seem likely 
suspects.


How did you configure your GoIP and why?

What do your relevant sip.conf section(s) look like?

What does your dial command look like?

So far, all I've got out of it is a 503 Declined.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Looking for Kristian Kielhofner document

2017-09-14 Thread Steve Edwards
I'm looking for a document Kristian Kielhofner wrote a couple of years ago 
walking you through his experiences with the SIP protocol. Kind of a 
"here's the answers to the questions you were afraid to ask."


If you have a link, please share.

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] ERROR during high volume MoH dialplan

2017-08-31 Thread Steve Edwards

On Thu, 31 Aug 2017, Joseph Smith wrote:

So I am looking for a better way to allow several thousand callers to 
listen to this IVR menu at the same time.


I'm thinking multiple hosts.

I'm not a fan of 4,000 eggs in one basket.

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] What version of Linux?

2017-08-28 Thread Steve Edwards

On Mon, 28 Aug 2017, Ira wrote:


The machine is an Intel Atom board...

I believe the board is limited to a 32 bit OS.


My Intel(R) Atom(TM) CPU D525 seems to be quite happy running CentOS 
release 6.9 (Final) in 64 bit mode:


sedwards:~$ uname --hardware-platform --machine --processor
x86_64 x86_64 x86_64

sedwards:~$ getconf LONG_BIT
64

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] AMI column widths

2017-07-07 Thread Steve Edwards

On Fri, 7 Jul 2017, Antony Stone wrote:

I'm trying to get a list of the channels currently in use on an Asterisk 
server (1.8.32.1 if it matters) over AMI.


Would the AMI 'CoreShowChannel' or the CLI 'core show channels concise' 
commands help?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Extensions of sip trunk

2017-06-05 Thread Steve Edwards

On Tue, 6 Jun 2017, Hans-Peter Jansen wrote:


I wonder, if I really need to grab the extension with
Set(DN=${SIP_HEADER(TO):5}) or something similar?


Yes, something like if they can't fix the R-URI:
exten => X_.,n,Set(TO=${CUT(SIP_HEADER(To),@,1)})
exten => X_.,n,Set(TO=${CUT(TO,:,2)})
exten => X_.,n,Goto(somewhereelsetopreventloops${TO},1)


Sorry for the silly question, but how do I feed the TO variable back to the
usual pattern matching? Assign to $EXTEN?


same = n,   goto(${CONTEXT},${TO},1)

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Thu, 1 Jun 2017, Pete Mundy wrote:


Heya Steve

I use the same Jeff recommended.

Eg this command would capture SIP traffic in capture files up to 
100Mbytes each, with a maximum of 10 files in play and overwriting the 
oldest automatically:


tcpdump -i eth0 -w rollingSIPtrace. -C 100 -W 10 port 5060

Eventually you'd end up with files called 'rollingSIPtrace.00' through 
to 'rollingSIPtrace.09', and when rollingSIPtrace.09 reaches 100MB, 
overwriting of rollingSIPtrace.00 (then rollingSIPtrace.01 etc) would 
commence.


Does that achieve your goal?

Or was the problem that if your server restarts and the command 
auto-executes at boot time then the first file overwritten will be 
rollingSIPtrace.00, not necessarily whichever file was the last 
modified?


I'd like it to only overwrite the oldest, but server restarts are rare 
enough that I think this will be acceptable.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Wed, 31 May 2017, Matt Riddell wrote:


Easier just to use logrotate no?


Neither dumpcap or tcpdump know what to do with a HUP (I suspect I could 
configure logrotate to kill dumpcap and then start another instance) but 
I'm still in a position to have to enable/disable the logrotate script as 
I change which hosts need monitoring.


I know... First world problems :)

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Wed, 31 May 2017, Barry Flanagan wrote:


sngrep 


Isn't sngrep a great tool? Since discovering it my use of 
tcpdump/wireshark has cratered.


Being able to compare an INVITE that worked with one that didn't (with 
color highlighting) rocks.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Wed, 31 May 2017, Daniel Tryba wrote:


On Wed, May 31, 2017 at 01:39:25PM -0700, Steve Edwards wrote:

What bugs you about the output format?


It's been a while, but as I recollect, it included the date/timestamp in the
file name of the 'ring buffer' which meant that each time the host was
rebooted, dumpcap didn't know the files from the previous run should be
deleted when they 'aged out.'


Solvable by by writing a cleanup script that deletes files over a
specific age, just a basic find in the daily crontab:
find /path/to/captures -type f -name 'pattern*' -mtime +X -exec rm {} \;


Been there, done that. Just 1 more thing for me to maintain :)

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Wed, 31 May 2017, Steve Edwards wrote:


I want to capture all SIP messages.

I have about 30 hosts in about 6 colos.

My first thought was dumpcap, but the output file name format bugs me.

What do you use for long term SIP capture?


A little more specificity...

I'd like the capture to be in a series of files that can be 'rotated' or 
'aged out' so that I can always have x days of traffic on hand but not 
have to prune the files to keep the storage requirements reasonable.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

On Wed, May 31, 2017 at 12:36:47PM -0700, Steve Edwards wrote:

I want to capture all SIP messages.

I have about 30 hosts in about 6 colos.

My first thought was dumpcap, but the output file name format bugs me.

What do you use for long term SIP capture?


On Wed, 31 May 2017, Daniel Tryba wrote:


What bugs you about the output format?


It's been a while, but as I recollect, it included the date/timestamp in 
the file name of the 'ring buffer' which meant that each time the host was 
rebooted, dumpcap didn't know the files from the previous run should be 
deleted when they 'aged out.'


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] OT: Want to capture all SIP messages

2017-05-31 Thread Steve Edwards

I want to capture all SIP messages.

I have about 30 hosts in about 6 colos.

My first thought was dumpcap, but the output file name format bugs me.

What do you use for long term SIP capture?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] cmd AGI(), maximum script time.

2017-05-26 Thread Steve Edwards

On Fri, 26 May 2017, Dmitry Melekhov wrote:


It there way to limit script execution time ?


Set a handler and an alarm:

// trap SIGALRM -- the process is taking too long
signal(SIGALRM, (void (*)(int))(int)hung_process);

// set an alarm
alarm(900);

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

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

On Wed, 10 May 2017, J Montoya or A J Stiles wrote:

Presumably your staff carry mobile phones.  What about an app that gets 
the ID of the cell tower to which it is connected, and passes it and the 
SIM number in a HTTP request to a server you control?


The problem is that they are supposed to use the 'site landline' to 
confirm presence -- not their cell phone with the spoofed CID.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

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

2017-05-10 Thread Steve Edwards
I have a 'time and attendance' application. Think janitorial or security 
kind of thing where an employee goes from location to location.


They're supposed to 'clock in' when they get to a site using a phone at 
that site to prove they're there.


Some employees have discovered 'fake caller ID' services can be used to 
say they're on site when they are not.


How can I detect a fake CallerID? The INVITE looks the same to me.

If I have the employees call an 8xx number, can I ask my SIP provider to 
include more headers to show the real ANI? What would that service be 
called?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] ** in extensions.conf

2017-04-26 Thread Steve Edwards

On Wed, 26 Apr 2017, Jerry Geis wrote:


dialplan show testing-sip
  '**' =>           1. Noop(Testing)                              [pbx_config]
                    2. Playback(demo-congrats)                    [pbx_config]

Looks like its there.

if I do ** "Dial" it works, but if I do "New Call" ** then "Dial" it 
does not work. Weird. How do I get it to work for both cases. (glad I 
tried the other)


I never use 'New Call' -- just 'Dial' and 'Redial,'

I suspect you'll need to fiddle with the Polycom dialplan. As soon as I 
press the first '*' my Poly sends the INVITE.


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
    https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] ** in extensions.conf

2017-04-26 Thread Steve Edwards

On Wed, 26 Apr 2017, Jerry Geis wrote:


I just tried this in my extensions.conf

exten => **,1,Noop(Testing)
exten => **,n,Playback(demo-congrats)

Did a reload... and the above does not happen.
I created as 12 instead of the ** and that works fine.

Is there anyway to get the ** to work?  I also am using a polycom phone 
if that affects things. I'm using asterisk 13.15.0


Coincidentally, this is exactly how I exercise test code:

; test something
; (changes frequently)
exten = **,1,   verbose(1,[${EXTEN}@${CONTEXT}!${ANI}])
same = n,   answer()

I use an ancient Polycom IP 501 just fine.

Does 'dialplan show **@' yield any clues?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] "Your call is not allowed. P U A M I"

2017-04-20 Thread Steve Edwards

Not an Asterisk question, but...

A bunch of our 8xx numbers started playing this recording when dialed. Our 
provider (Inteliquent) says it's not them.


Does anybody know who is playing it and what it means?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Commit dialplan & other config. in memory to disk?

2017-04-07 Thread Steve Edwards

On Thu, 6 Apr 2017, Steve Edwards wrote:


You're welcome to the script at:

http://www.sedwards.com/recover-show-dialplan.php


Sorry about that...

Try:

http://www.sedwards.com/recover-show-dialplan.txt

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] restart system from extension

2017-04-06 Thread Steve Edwards

Please don't top post.


On Thu, Apr 06, 2017 at 08:16:34PM +0300, Atux Atux wrote:


hi. i would like to be able to reboot the system from my extension. is 
that possible? if yes, how?


Στις 6 Απρ 2017 8:25 μ.μ., ο χρήστης "Tzafrir Cohen" 
<tzafrir.co...@xorcom.com> έγραψε:



System('sudo /sbin/reboot')


On Thu, 6 Apr 2017, Atux Atux wrote:


Could you give some more details please?


While there may be many ways, sudo is the most obvious. I'd suggest 
sticking with it and learning it before researching other methods if you 
find a use case that sudo can't handle.


Sudo allows a user to run specific (or any) commands as another user. For 
example, allow the asterisk user to run a command as apache or root. This 
ability can be configured to run with or without a password.


If you're running Asterisk as root, which you shouldn't do, you don't need 
sudo since root can do almost everything.


If you're running Asterisk as asterisk, you can create a file named 
asterisk in /etc/sudoers.d/ that tells sudo what commands you want sudo to 
allow the user named asterisk, what user that command will be executed as, 
and if a password is needed. And more -- wade through 'man sudoers' for 
all the gory details.


In it's simplest form, which is not the most secure, this file would look 
like:


asterisk ALL=(ALL) NOPASSWD: ALL

This means the user asterisk can run all commands as any user on any host 
without needing a password. Kind of scary, right?


The best way to edit this file is with the 'visudo' command because it 
will help prevent you from creating an invalid file. This can be very 
important when you are editing your file (for your login) remotely.


You should take the time to create a 'sudoers' file for the asterisk user 
that allows the single '/sbin/reboot' command. Do as I say, not as I've 
done :)


--
Thanks in advance,
---------
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Commit dialplan & other config. in memory to disk?

2017-04-06 Thread Steve Edwards

On Thu, 6 Apr 2017, Nathan Anderson wrote:

In the future, if I were to ever run into a similar situation, is there 
any way to request or instruct Asterisk to write the current dialplan 
that is in memory and other important config files (e.g., users.conf) to 
disk in a *different* location than where it originally read them from 
when it started up?  I could have saved myself a crap-ton of work if 
this were possible...


On Thu, 6 Apr 2017, John Novack wrote:

I run a cron job every early morning to do just that as well as the 
MySql data files so if need be I can recreate a machine and have call 
records and whatever not more than a day stale.


Ditto.

Each host emails all of it's configuration files and database dumps in a 
tarball every day. This has saved mine and my client's bacon on more than 
1 occasion.


It also comes in handy when a client says 'I liked it better the way it 
was last Monday' or when a client says 'why am I being charged for x hours 
work last Tuesday.' I can restore the tarballs and a quick diff shows 
everything I did -- down to the time-stamped commands in my .bash_history.


Back to your specific problem...

No. There is no easy way to recover configurations from a running 
Asterisk. The misleadingly named 'dialplan save' will not save you. It 
will trash any file in it's way with a useless rendition of your dialplan. 
It will show your globals and your application calls, but without any of 
the parameters.


Seriously, was this some disgruntled developer's middle finger as they 
stormed out of the office?


I've found myself in your position, not by hardware failure, but by a 
fat-fingered 'rm' and had the better part of a days work at stake.


I used the 'script' shell command and the Asterisk 'dialplan show' command 
and then ran that through a PHP script that recovered enough.


You're welcome to the script at:

http://www.sedwards.com/recover-show-dialplan.php

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Any way to clear ALL gosub stacks without knowing what they are?

2017-04-01 Thread Steve Edwards

On Sat, 1 Apr 2017, Jonathan H wrote:


Any way of clearing ALL gosub stacks in dialplan?


1) rm -f /etc/asterisk/extensions.conf?

2) hangup()?

(It is April fools...)

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP reload not changing codecs

2017-02-27 Thread Steve Edwards

Asterisk 13.3.2

I change the allowed codec from ulaw to g729 in sip.conf and enter 'sip 
reload' on the console, but calls continue to use ulaw until restart.


Before reload:

lc10*CLI> sip show settings
Global Signalling Settings:
---
  Codecs: (ulaw)

lc10*CLI> core show channel SIP/poly-e637-
  NativeFormats: (ulaw)
WriteFormat: slin
 ReadFormat: ulaw

After reload:

lc10*CLI> sip show settings
Global Signalling Settings:
---
  Codecs: (g729)

lc10*CLI> core show channel SIP/poly-e637-0001
  NativeFormats: (ulaw)
WriteFormat: slin
 ReadFormat: ulaw

After restart:

lc10*CLI> sip show settings
Global Signalling Settings:
---
  Codecs: (g729)

lc10*CLI> core show channel SIP/poly-e637-
  NativeFormats: (g729)
WriteFormat: slin
 ReadFormat: g729

Why do I need to restart to get calls to actually use the new codec?

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] How to show codec packetization?

2017-02-27 Thread Steve Edwards

Asterisk 13.3.2

The console command 'sip show settings' shows the allowed codecs in the 
'Global Signalling Settings' but does not include the packetization 
setting.


Similarly, both 'core show channel' and 'sip show channel' will show the 
codec(s), but not the packetization.


How can I show the the configured and the actual (in use) packetization?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Turn on SIP debugging from DialPlan

2017-02-17 Thread Steve Edwards

On Fri, 17 Feb 2017, Derek Andrew wrote:

I have some troublesome numbers that I would like to capture the SIP 
dialogue when I am calling them. When I am about to dial the number, is 
there any way to turn on SIP debugging in the dial plan before I make 
the call? (and turn it off after the call is completed?)


You could use the system() application as suggested before.

You could also just start a console packet logger and just leave it 
running:


sudo ngrep -O ngrep.pcap -W byline -d any  port 5060

This will only capture packets containing your ANI which includes INVITE, 
Trying, OK, ACK, and BYE -- basically, the entire SIP dialog for the call.


This will only take about 4kB per call, so you can log over 250 calls per 
mega-byte so I'm guessing that should be possible.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Using g729 now that patents have expired

2017-02-07 Thread Steve Edwards

On Tue, Feb 7, 2017 at 4:47 PM, Steve Edwards <asterisk@sedwards.com> wrote:


  Now that the g729 patents have expired, how do we use g729 in 
	Asterisk?


  Will Digium be releasing a g729 codec for 'free' use or do we
  download the 'free' codec off the Internet now that we can use it
  without moral or legal restrictions?


On Tue, 7 Feb 2017, Carlos Rojas wrote:


You can uses:

http://asterisk.hosting.lv/


I'm hoping Digium will do something so we can have an 'out of the box' 
experience rather than downloading code from a lesser known web site.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Using g729 now that patents have expired

2017-02-07 Thread Steve Edwards

Now that the g729 patents have expired, how do we use g729 in Asterisk?

Will Digium be releasing a g729 codec for 'free' use or do we download the 
'free' codec off the Internet now that we can use it without moral or 
legal restrictions?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Call List Campaign to an IVR

2017-02-06 Thread Steve Edwards



On Mon, 6 Feb 2017, Tech Support wrote:

  We were able to develop a feature to send the call to voicemail about 90% 
of the time. That way, an end user could (1) not be bothered by having to 
answer the call, (2)
  delete the message without listening to it, or (3) listen to the message 
when it was most convenient for them. That way, they were in control and things 
were done on
  their terms.


On 6/02/2017, at 11:34 AM, Steve Edwards <asterisk@sedwards.com> 
wrote:


Love the idea. How?


On Mon, 6 Feb 2017, Matt Riddell wrote:


exten => _X.,1,Dial(SIP/0111${EXTEN}@myprovider/1${EXTEN}@myprovider,3)


Amazing. Who knew?

So how/why does this work?

I see 2 calls going out to my cell. Does the first 'busy out' my number at 
my cell provider so the second goes straight to VM? What part does the 
'0111' play?


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Call List Campaign to an IVR

2017-02-06 Thread Steve Edwards

On Mon, 6 Feb 2017, Tech Support wrote:

We were able to develop a feature to send the call to voicemail about 
90% of the time. That way, an end user could (1) not be bothered by 
having to answer the call, (2) delete the message without listening to 
it, or (3) listen to the message when it was most convenient for them. 
That way, they were in control and things were done on their terms.


Love the idea. How?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] SIP host name resolution

2017-02-03 Thread Steve Edwards
If I have a SIP endpoint defined in sip.conf using a host name instead of 
an IP address, do I have to reload sip to get Asterisk to 're-resolve' the 
host name if I change the IP address in my DNS?


Does the answer change if the host name in sip.conf resolves to a CNAME 
and I change the CNAME in my DNS?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Callback on busy

2017-01-27 Thread Steve Edwards

On Fri, 27 Jan 2017, Michele Pinassi wrote:


i'm using Asterisk as a media box for a VoIP network based on OpenSIPS.
When an user phone is busy, call was forwarded to an asterisk ext:

; ===
; Voicemail on NOT AVAILABLE
; ===
exten => _VMR_.,1,Noop("from-voip: ${CALLERID(num)} ${EXTEN}")
exten => _VMR_.,n,Set(DID=${EXTEN:4})
exten => _VMR_.,n,Answer()
exten => _VMR_.,n,Wait(1)
exten => _VMR_.,n,GotoIf(${VM_INFO(${DID},exists)}?avail:unavail)
exten => _VMR_.,n(avail),Voicemail(${DID},u)
exten => _VMR_.,n,Hangup()
exten => _VMR_.,n(unavail),Playback(vm-theperson)
exten => _VMR_.,n,SayDigits(${DID});
exten => _VMR_.,n,Playback(vm-isunavail)
exten => _VMR_.,n,Read(digit,vm-tocallback,1,,1,5)
exten => _VMR_.,n,Gotoif($["${digit}" = "2"]?:skip,1,5)
exten => _VMR_.,n,Noop("Add callback for ${DID} from ${CALLERID(num)}")
exten => _VMR_.,n,AGI(callback,${DID},${CALLERID(num)})
exten => _VMR_.,n,Playback(goodbye)
exten => _VMR_.(skip),n,Hangup()

when a vocal message asks to press "2" to add a callback when called
users return free, using an AGI script that create a .call file:



#!/usr/bin/php -q
\n");
fputs($cf,"MaxRetries: 100\n");
fputs($cf,"RetryTime: 30\n");
fputs($cf,"Archive: Yes\n");
fputs($cf,"SetVar: CALLER=$caller\n");
fputs($cf,"SetVar: CALLED=$called\n");
fclose($cf);

?>


0) This is not an AGI script. It does not read the AGI environment from 
STDIN and does not make any AGI requests. You could execute it using the 
system() application and it should execute the same -- maybe a couple of 
nanoseconds faster because Asterisk does not need to create the AGI 
environment or fiddle with file descriptors.


1) You should not create the call file in the spool directory. Doing so 
introduces a 'race condition' where Asterisk could start to read the file 
before your script is finished writing it. You should create the call file 
in another directory on the same file system and 'mv' it to the spool 
directory. /tmp/ or /var/tmp/ are usually suitable. ('mv' is 'atomic' -- 
it happens all at once.)


2) Visit http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out to 
learn more about the call file format.


Think of call files in terms of legs. The first leg uses the 'channel' 
argument to originate the call. If that call is answered, 'leg 2' 
execution continues either in the dialplan at 'context:extension:priority' 
or the 'application:data' is executed.


Visit http://www.voip-info.org/wiki/view/Asterisk+local+channels to learn 
more about local channels. I think the syntax section will be most 
helpful.


I need that Asterisk call CALLED user and, when answered, start calling 
CALLER.


Yes, but the concept of 'answered' is vague if you are using analog 
channels.


Visit http://www.voip-info.org and search for 'asterisk call back' for 
examples of how others have approached this problem.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Kernel/Asterisk/DAHDI/Libpri version matrix?

2017-01-16 Thread Steve Edwards

On Mon, 16 Jan 2017, Richard Mudgett wrote:

Only DAHDI would really care about the kernel version and I cannot say 
if that kernel is supported with the latest DAHDI.


Can I interpret this as 'any Asterisk 11+ can use a current DAHDI if it 
compiles.'


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] Kernel/Asterisk/DAHDI/Libpri version matrix?

2017-01-16 Thread Steve Edwards

On Mon, 16 Jan 2017, Richard Mudgett wrote:

Any Asterisk v11 version should be able to use all of the current libpri 
features.


OK. So I should be good with the current libpri.

Only DAHDI would really care about the kernel version and I cannot say 
if that kernel is supported with the latest DAHDI.  The easiest way 
would be to try compiling it.


Is 'DAHDI compiles without errors' the litmus test for acceptability?

Is the same true for Asterisk? If it compiles, it should work?

--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281-- 
_
-- 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] Kernel/Asterisk/DAHDI/Libpri version matrix?

2017-01-16 Thread Steve Edwards

I googled about a bit without success, so...

Is there a version matrix available?

Something that would say: for kernel version w, you can run up to version 
x of Asterisk, DAHDI version y, and libpri version z?


For example, I have a bunch of remote hosts running kernel 2.6.26, 
Asterisk 11.6.0, and DAHDI 2.7.0.1.


We experience occasional Asterisk crashes, so I'd like to get as up to 
date as possible to see if that resolves the crashes before diving deeper.


1) What is the 'highest' versions of DAHDI and libpri that I can run with 
kernel 2.6.26 and Asterisk 11.6.0?


2) What is the highest version of Asterisk I can run with kernel 2.6.26 
and what would be the appropriate versions of DAHDI and libpri?


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- 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] RS485 Audio device

2016-11-02 Thread Steve Edwards

On Wed, 2 Nov 2016, Jerry Geis wrote:


"AOR" or Area of refuge


I have one of those. I call it my 'man cave.'

--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

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

2016-10-19 Thread Steve Edwards

Jerry Geis wrote:



I am playing with tcpenable... on 13.11.2

but when I "telnet localhost 5070" I get no connect.


On Wed, 19 Oct 2016, Joshua Colp wrote:

You are explicitly binding to 192.168.1.8 port 5070. Trying to connect 
to localhost won't work. You will either have to bind to 0.0.0.0 or 
connect to 192.168.1.8 instead.


Or bind to 127.0.0.1 - aka localhost :)

0.0.0.0 means 'bind to all addresses on the host.'

The 'bind' and the 'telnet' need to match. You probably mean to bind to 
the host's IP address (slightly more secure) so the 'telnet' needs to 
match that IP address.


--
Thanks in advance,
-----
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
 http://www.asterisk.org/community/astricon-user-conference

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


  1   2   3   4   5   6   7   8   9   10   >