Re: [asterisk-users] Alternative to Local channel

2023-08-17 Thread Eric Wieling
You can't set the variable in globals?  I don't know if functions work 
in globals, but it is worth a try.


[globals]
LSESSION=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}

On 8/16/23 20:39, Federico wrote:

I used to use the local channel to create a global variable

(dialplan)

[default]

exten => s,1,Set(GLOBAL(LSESSION)=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)})

to that end, I modified cli.conf

[startup_commands]

originate local/s extension s@default = yes

But now I upgraded to Asterisk18 and there is no longer a local channels

Does anybody have any idea of a workaround?




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Setting codec on originating (calling) channel with chan_pjsip (SIP_CODEC_INBOUND equivalent)

2023-07-06 Thread Eric Wieling
I suspect most people simply don't care.   Transcoding between ulaw and 
g722 is not CPU intensive and Direct Media doesn't work when NAT is 
involved (which would the case for most people).


On 7/5/23 17:22, Michael Ulitskiy wrote:

Well, I'm trying to migrate to chan_pjsip so that I don't have to do that.

It's so surprising that the issue so seemingly obvious and trivial 
hasn't been addressed yet that I wanted to query the collective wisdom 
of this list to verify my observations.


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

2023-06-30 Thread Eric Wieling
You have to read stdin to accept the data Asterisk sends when the AGI 
starts before you can send any AGI commands to Asterisk.   Also, "agi 
set debug on".


On 6/30/23 21:52, TTT wrote:
I have an AGI script written in PHP that worked great with Asterisk 13.  
I’m porting it to an Asterisk 20 site and have a strange problem.  I 
tried running the script from the command line and it works fine; I see 
the script commands written to stdout like


VERBOSE “SmartScreen v1”

But when run from asterisk the CLI shows:

[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] pbx.c: Executing 
[s@function-smartscreen:2] EAGI("PJSIP/Twilio-NA-W-3-In-0068", 
"smartscreen/smartscreen.php,"GEORGE SMITH" <+1234567890>") in new stack


[2023-06-30 15:50:47] VERBOSE[1264031][C-0025] res_agi.c: Launched 
AGI Script /var/lib/asterisk/agi-bin/smartscreen/smartscreen.php


[2023-06-30 15:50:48] VERBOSE[1264031][C-0025] res_agi.c: 
AGI Script smartscreen/smartscreen.php 
completed, returning 0


I never see any messages or commands sent from the script to stdout (to 
asterisk)  Has the way EAGI operates changed?  This script doesn’t use 
any AGI libraries…just simply read/write to stdin/stdout.





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Get channel variables via ARI/AMI

2023-06-26 Thread Eric Wieling


If you want to do more than just get headers from the INVITE, then 
you'll need to use an actual SIP Proxy like Kamailio.


On 6/26/23 15:03, TTT wrote:
It looks like if I call Getvar and pass PJSIP_HEADERS() I can get the 
entire SIP header for a channel.  I also read (on stackoverflow) that 
the PJSIP_HEADER function will only return the headers from the INVITE 
of the _inbound_ channel.


If that’s correct, how would I get the headers from the outbound channel 
(second leg of the bridged call) INVITE ?  Or will PJSIP_HEADERS() in 
fact return the header from either inbound out outbound legs?


Thanks

Brian

*From:*asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] 
*On Behalf Of *Joshua C. Colp

*Sent:* Monday, June 26, 2023 10:00 AM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion 


*Subject:* Re: [asterisk-users] Get channel variables via ARI/AMI

On Mon, Jun 26, 2023 at 10:57 AM TTT > wrote:


I am connecting to the ARI with subscribe all, so I can see channels
being created.  I now want to extract a variety of header variables
(at the moment the from and to tag).  I tried to read them from the
ARI but Asterisk refuses since the channel is not in a  stasis app.

Is there a way to read these from either the ARI or AMI ?  I’m
trying not to modify the dialplan.

ARI, No.

AMI, Yes[1].

[1] 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Getvar 


--

Joshua C. Colp

Asterisk Project Lead

Sangoma Technologies

Check us out at www.sangoma.com  and 
www.asterisk.org 





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Asterisk not replacing private FROM ip with public IP in INVITE

2023-06-21 Thread Eric Wieling

type=endpoint
rewrite_contact=yes
force_rport=yes
rtp_symmetric=yes


On 6/21/23 14:36, TTT wrote:

I've split this thread off from another (PJSIP authentication) because I think 
the root cause is something different.I think the problem is the following 
FROM line in my SIP INVITE transaction:

From: "MYNAME" 
;tag=773a3e6a-a677-4fb1-95fc-54b379b650a4

The IP address above is an internal/non-routable IP, so Twilio is rejecting it. 
 For some reason Asterisk is not replacing the private IP with my public IP 
address.  My pjsip.transport.conf contains a stanza for this transport with:

local_net=172.31.0.0/16

Is that all that's needed for Asterisk to replace the from IP with the external 
IP?  I'm not clear on why Asterisk is not substituting the private FROM ip with 
a public one...





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Confbridge for 80 devices

2022-10-20 Thread Eric Wieling


https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces

On 10/20/22 17:35, Jerry Geis wrote:


[modules]
autoload = yes
noload = res_timing_pthread
noload = res_timing_timerfd

SO I "dont" want to load res_timing_anything ???

I have preload on res_timing_dahdi, then res_timing_pthread and not 
res_timing_timerfd at all.




confbridge.conf is below

[general]
; The general section of this config
; is not currently used, but reserved
; for future use.

;
; --- Default Information ---
; The default_user and default_bridge sections are applied
; automatically to all ConfBridge instances invoked without
; a user, or bridge argument.  No menu is applied by default.
;

; --- ConfBridge User Profile Options ---
[default_user]
type=user
;admin=yes     ; Sets if the user is an admin or not. Off by default.
;marked=yes    ; Sets if this is a marked user or not. Off by default.
;startmuted=yes; Sets if all users should start out muted. Off by default
;music_on_hold_when_empty=yes  ; Sets whether MOH should be played when only
                                ; one person is in the conference or 
when the
                                ; the user is waiting on a marked user 
to enter

                                ; the conference. Off by default.
;music_on_hold_class=default   ; The MOH class to use for this user.
;quiet=yes     ; When enabled enter/leave prompts and user intros are 
not played.
                ; There are some prompts, such as the prompt to enter a 
PIN number,
                ; that must be played regardless of what this option is 
set to.

                ; Off by default
;announce_user_count=yes  ; Sets if the number of users should be 
announced to the

                           ; caller.  Off by default.
;announce_user_count_all=yes ; Sets if the number of users should be 
announced to
                              ; all the other users in the conference 
when someone joins.
                              ; This option can be either set to 'yes' 
or a number.
                              ; When set to a number, the announcement 
will only occur
                              ; once the user count is above the 
specified number.
;announce_only_user=yes   ; Sets if the only user announcement should be 
played
                           ; when a channel enters a empty conference.  
On by default.
;wait_marked=yes   ; Sets if the user must wait for a marked user to 
enter before

                    ; joining the conference. Off by default.
;end_marked=yes ; This option will kick every user with this option set 
in their
                 ; user profile after the last Marked user exists the 
conference.


;dsp_drop_silence=yes  ; This option drops what Asterisk detects as 
silence from
                        ; entering into the bridge.  Enabling this 
option will drastically
                        ; improve performance and help remove the 
buildup of background
                        ; noise from the conference. Highly recommended 
for large conferences

                        ; due to its performance enhancements.

;dsp_talking_threshold=128  ; The time in milliseconds of sound above 
what the dsp has
                             ; established as base line silence for a 
user before a user
                             ; is considered to be talking.  This value 
affects several
                             ; operations and should not be changed 
unless the impact on

                             ; call quality is fully understood.
                             ;
                             ; What this value affects internally:
                             ;
                             ; 1. Audio is only mixed out of a user's 
incoming audio stream
                             ;    if talking is detected.  If this value 
is set too
                             ;    loose the user will hear themselves 
briefly each
                             ;    time they begin talking until the dsp 
has time to

                             ;    establish that they are in fact talking.
                             ; 2. When talk detection AMI events are 
enabled, this value
                             ;    determines when talking has begun 
which results in
                             ;    an AMI event to fire.  If this value 
is set too tight
                             ;    AMI events may be falsely triggered by 
variants in

                             ;    room noise.
                             ; 3. The drop_silence option depends on 
this value to determine
                             ;    when the user's audio should be mixed 
into the bridge
                             ;    after periods of silence.  If this 
value is too loose
                             ;    the beginning of a user's speech will 
get cut off as they

                             ;    transition from silence to talking.
                             ;
                             ; By default this value is 160 ms. 

Re: [asterisk-users] Muliticast not connecting

2022-10-13 Thread Eric Wieling



On 10/13/22 13:25, Joshua C. Colp wrote:
On Thu, Oct 13, 2022 at 2:16 PM Jerry Geis > wrote:


I have a simple dialplan with asterisk 18.14.0

exten => 141,1,Answer
exten => 141,n,Noop(MC)
exten => 141,n,Playback(beep)
exten => 141,n,Dial(MulticastRTP/basic/239.168.4.90:30410//t(15)
)
exten => 141,n,Hangup

Most times this works just fine ... Once in a while the person hears
the beep - but nothing connects on the multicast.

What might this be? How can I tell what is happening and why it does
not connect?

is it valid to put :
exten => 141,n,Dial(MulticastRTP/basic/239.168.4.90:30410//t(15)
)
exten => 141,n,Dial(MulticastRTP/basic/239.168.4.90:30410//t(15)
)

So if the first one doesnt connect perhaps the second one will ???
Thanks


Multicast doesn't connect. There is no session. RTP is thrown out onto 
the network using multicast, and then devices pick it up. Asterisk has 
no idea what (if anything) is receiving it. You'd want to do a packet 
capture to see what is being multicast.




Does this mean things like DIALSTATUS won't work as expected?

--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] externnotify script not running

2022-03-16 Thread Eric Wieling

If you are using systemd /tmp might be a private /tmp

On 3/16/22 16:10, Mike Diehl wrote:

Hi all,

I'm trying to build a custom voicemail delivery system using externnotify in
voicemail.conf.  But, the configured script doesn't seem to run.

I have:

externnotify=/home/phones/commands/deliver_vm.pl ${VM_NAME} ${VM_DUR} $
{VM_MSGNUM} ${VM_MAILBOX} ${VM_CALLERID} ${VM_DATE}

The deliver_vm.pl has read and execute permissions.

Here is the file I have:

===
#!/usr/bin/perl

$a = join("\t", @ARGV);
open FILE, ">>/tmp/test.txt";
print FILE "$a\n";
close FILE;
===

After I leave a voicemail message, I expect to find something in /tmp/test.txt,
but I don't.

What am I missing?

Thanks in advance.

Mike.






--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Get context with hangup handler

2022-01-05 Thread Eric Wieling
This might not help, but you don't have to use different contexts when 
using GoSub, here is an example:  https://pastebin.com/ftwWwpKt


On 1/5/22 22:22, Dovid Bender wrote:

Steve,

I thought of this but that would mean I would need to add this to the 
beginning of every context which I can do, but I was trying to avoid.



On Wed, Jan 5, 2022 at 10:06 PM Steve Edwards > wrote:


On Wed, 5 Jan 2022, Steve Edwards wrote:

 >       same = n,                       set(LAST-CONTEXT=${context}

Double damn. I munged the case on ${CONTEXT}. I give up for today :)

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





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Exec two commands with ExecIf

2021-12-23 Thread Eric Wieling
The dialplan is a very complicated config file.  It is often repetitive 
and ugly.  Don't expect it to work like an actual programming language. 
 If you want that, use an AGI.


In this case, just call it an "Asterisk-ism" and move on.  You'll find 
plenty more of them.


On 12/23/21 01:37, Dovid Bender wrote:

Hi,

I didn't see any documentation for this so I assume it can't be done but 
I figured I would check here first. Is there any way of using ExecIf to 
run two commands instead of 1? e.g. instead of


Exten 123,1,ExecIf($["FOO" == "BAR"]?BackGround(you-owe))
Exten 123,1,ExecIf($["FOO" == "BAR"]?SayNUmber(100"))

I would ideally like to do it in one line.


TIA.

Dovid




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Dial() after the h extension has been invoked?

2021-11-12 Thread Eric Wieling

Create a spool file from the 'h' extension to generate the call.

On 11/12/21 11:56, Antony Stone wrote:

Hi.

I have a setup which comprises some "front-end" Asterisk servers which have
SIP trunks to external providers, and very simple dial plans, and some "back-
end" servers which only talk to the front-end machines, and have the majority
of my dialplan logic on them.

I use Dial() commands with custom SIP headers to pass information (eg: about
the current state of a call) between the front-end and back-end machines, and
this works very well.

However, I can't use a Dial() command in the h extension to notify the other
machines that a call has ended and they can now delete their state information
about that call.  If I try to, I get the error:

app_dial.c:2245 in dial_exec_full: Caller hung up before dial.

I guess i can see why Asterisk complains about being asked to Dial() after the
inbound call leg has ended, but in this case I have a reason for doing so.

Can anyone suggest how I might be able to do this?  I need to perform a Dial()
command after an inbound channel has hung up.  I do not expect the Dial() to
bridge to anything (the context being dialled simply does some database
manipulation and then hangs up without even bothering to answer).


Any suggestions welcome :)


Antony.



--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Between a dumb client and a capable server...

2021-08-20 Thread Eric Wieling



On 8/20/21 4:24 PM, Antony Stone wrote:

On Friday 20 August 2021 at 19:06:09, George Joseph wrote:


On Fri, Aug 20, 2021 at 8:33 AM Antony Stone wrote:


So, if I have Asterisk registered as a SIP client to some remote server,
how can I get Asterisk to tell that remote server to put the call on hold
(which a standard SIP telephone would normally do by sending a ReINVITE
with the SDP parameter 'sendonly')?


On the outgoing pjsip endpoint, set "moh_passthrough = yes".   If you then
put incoming call on hold, a reinvite with sendonly will be sent to the
upstream server.


So... how do I put the incoming call on hold, when the dumb client I'm
starting from cannot do that bit?

I already know (from this list) that Asterisk as a SIP client cannot do ore
than (a) place a call, (b) answer a call, and (c) hang up a call.

So, I'm still intrigued as to how you think this might be possible.

If it *is* possible, I'd be really interested, but all my researches so far
suggest that Asterisk, acting in the middle like this, just cannot add the
necessary "put call on hold" which the original client cannot do.



With Asterisk, keep Asterisk in the media path with direct_media=yes and 
use DTMF to hold, transfer, and other features using features.conf. 
Asterisk has to stay in the media path when NAT is involved anyway.


I doubt anything except Asterisk or other B2BUA software can do what you 
want.


--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Failed to authenticate

2021-08-09 Thread Eric Wieling

You could switch to PJSIP and avoid most of this silliness.

I love Asterisk, but the peer/user/friend model in chan_sip is simply 
terrible.


PJSIP is different so there is a learning curve, of course.

On 8/9/21 11:05 AM, Jerry Geis wrote:



On Mon, Aug 9, 2021 at 8:32 AM Jerry Geis > wrote:




On Mon, Aug 9, 2021 at 8:11 AM Jerry Geis mailto:jerry.g...@gmail.com>> wrote:



On Mon, Aug 9, 2021 at 7:57 AM Jerry Geis mailto:jerry.g...@gmail.com>> wrote:



On Sun, Aug 8, 2021 at 3:18 PM Jerry Geis
mailto:jerry.g...@gmail.com>> wrote:

I am not using a SIP trunk as I normally do.

I have an extensions 3382 setup that my server registers
to the other SIP system.
When the other system calls 3381 on my system I am
getting this error:

[Jul 27 10:08:50] WARNING[89791][C-0068] chan_sip.c:
username mismatch, have <3381>, digest has <8124>
[Jul 27 10:08:50] NOTICE[89791][C-0068] chan_sip.c:
Failed to authenticate device "USCOL TEST"
;tag=1c1947164290 for INVITE, code = -2

How I allow this ?   I want to allow any SIP call to 3381.
Using Astering 18.4.0

Thanks,

Jerry


Sure here it is:
[general](+)
register => 3382:XX@IP/3382

; Description: Connection to PBX
[3382]
type=friend
defaultname=3382
defaultuser=3382
secret=XX
dtmfmode=RFC2833
host=IP
description=Connection to PBX
context=incoming
rtptimeout=60
rtpholdtimeout=60
rtpkeepalive=60
callerid=3382
qualify=no
canreinvite=no
nat=never
disallow=all
allow=ulaw
allow=alaw
allow=gsm

Thanks
Jerry


> What's the association between 3381 and 3382?

3381 is the number they want to dial into my asterisk.   3382 is
the registered extension to their system.

Jerry



 >You register as 3382. That means that if someone on their system
dials 3382,
>your Asterisk server gets the call.


I think at first I was only using 3381. That was the extension I
registered. There was no 3382.  Something was going wrong there
also. (Might have been a similar error),
and I could not get that to work either.

Jerry



Well my issue has changed now.  I have dropped the 3382. Changed back to 
3381.   So I am registering 3381 to the other server.

The other server is 10.35.229.5.  My IP is 10.35.229.11.
I have two network cards.

10.35.229.11 is Eth0
192.168.1.60 is Eth1

route looks OK
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface

0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
10.35.229.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

The issue is that the call comes in but the user hears no audio.
There is any crazy networking going on - why would the user not hear audio ?
Thanks

Jerry



--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] SIP Source Port

2021-07-10 Thread Eric Wieling
Kamailio is useful when you want to do weird, non-standard, or unusual 
stuff with SIP.   You could send your outgoing connections to Kamailio, 
which could then send the connection out with the required source port.


Have you considered using a not stupid provider?

On 7/10/21 3:44 PM, Joshua C. Colp wrote:
On Sat, Jul 10, 2021 at 2:39 PM Alexander Perkins 
> wrote:


Hi All.  We have a provider that requires us to SOURCE the SIP
connection on TCP 5061.  I honestly have no clue how to force
Asterisk to always SOURCE the SIP connection on a certain port.

Can anybody point me in the right direction?  I am using PJSIP.


If you are referring to an outgoing connection, it's not possible to 
configure PJSIP to do this. For an outgoing connection the system uses 
an ephemeral port as the source.


--
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com  and 
www.asterisk.org 




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Loading Json values into asterisk as variable values

2021-02-26 Thread Eric Wieling
You can set variables in pjsip.conf on specific endpoints.   See 
pjsip.conf.sample


On 2/26/21 9:56 AM, 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.




On Thu, Feb 25, 2021 at 4:58 PM Steve Edwards > wrote:


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





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] upgrade asterisk 11 to 13 or 11-16

2020-12-07 Thread Eric Wieling

I'm sure you can, but I've never done it.

On 12/7/20 2:18 PM, the...@sys-concept.com wrote:

Sound reasonable.  I know it take time to debug the dial-plan after upgrade.

Can I use sipp, from command line to call my local asterisk specific
extension and to observe in another terminal via "asterisk -vvr"
what it is doing?


On 12/07/2020 11:50 AM, Eric Wieling wrote:

Read UPGRADE.TXT in v13 and v16.  Then read it again.

I upgraded from Asterisk v11 to Asterisk v13.  Once all issues were
resolved, then I switched to PJSIP.   Once all the issues with PJSIP
were resolved, then I upgraded from v13 to Asterisk v16.   This was done
over the course of about a year, but I was not in any hurry.

PJSIP configuration is fundamentally different chan_sip configuration. I
don't recommend switching to PJSIP and upgrade Asterisk at the same time.

On 12/6/20 3:38 PM, the...@sys-concept.com wrote:

I'm planning to upgrade my asterisk-11.25 to ver. 13
or should I go to 11 to 16

Is there any official documentation how to upgrade, what to watch for
during upgrade?








--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] upgrade asterisk 11 to 13 or 11-16

2020-12-07 Thread Eric Wieling

Read UPGRADE.TXT in v13 and v16.  Then read it again.

I upgraded from Asterisk v11 to Asterisk v13.  Once all issues were 
resolved, then I switched to PJSIP.   Once all the issues with PJSIP 
were resolved, then I upgraded from v13 to Asterisk v16.   This was done 
over the course of about a year, but I was not in any hurry.


PJSIP configuration is fundamentally different chan_sip configuration. 
I don't recommend switching to PJSIP and upgrade Asterisk at the same 
time.


On 12/6/20 3:38 PM, the...@sys-concept.com wrote:

I'm planning to upgrade my asterisk-11.25 to ver. 13
or should I go to 11 to 16

Is there any official documentation how to upgrade, what to watch for
during upgrade?




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Digium TE134 compatibility issues with new Dell server - Zero interrupts

2020-10-22 Thread Eric Wieling

Make sure selinux is set to permissive or disabled.

On 10/22/20 11:44 AM, Richard Reina wrote:

Dell T40


--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Stir Shaken

2020-07-13 Thread Eric Wieling


I used their scam checking service.  Below is part of the dialplan I 
used.   I don't know how their STIR/SHAKEN service works the same.



 same = n,GosubIf($[${LEN(${CALLERID(num)})} == 11]?scam-check,${EXTEN},1)
 same = n,Goto(from-pstn,${EXTEN},1)

[scam-check]
exten = _XX.,1,Noop
 same = n,Set(pres=${CALLERID(pres)})
 same = n,ExecIf($["${pres:0:7}" != 
"allowed"]?Set(CALLERID(pres)=allowed_not_screened))

 same = n,Dial(SIP/${EXTEN}@clearip,,);
 same = n,ExecIf($["${pres:0:7}" != "allowed"]?Set(CALLERID(pres)=${pres}))
 same = n,Set(tech=${HANGUPCAUSE(${clearip_chan},tech)})
 same = n,ExecIf($["${tech:4:3}" == "603"]?Set(CALLERID(name)=Scam Likely))
 same = n,Return


On 7/13/20 3:58 PM, John Covici wrote:

On Mon, 13 Jul 2020 15:44:12 -0400,
Matthew Fredrickson wrote:


On Mon, Jul 13, 2020 at 2:34 PM Saint Michael  wrote:


There is a big confusion here about Stir Shaken. It is NOT a provider issue. Un fact, all 
providers are whasing their hands and modifying their swihtches to pass-through the 
Signature. They cannot sign the call because then the become the responsible party for 
the call before the FCC, and liable for any illegal call. Every owner of a PBX that sends 
calls to the network, except if you use a trunk for the likes of Vonage, needs to sign 
their calls. So if you send calls with any kind of dialer and use DIDs, real or 
"borrowed", you need to get the signature service urgently or your business 
will stop terminating calls. You cannot self-sign, you cannot get around it, the calls 
will either go to straight to voicemail or fail. Even worse, the carries wil play a fake 
voicemail and charge you a fee, something that some already a are doing when they detect 
robocallig.


Don't even think about Transnexus, because they use 302 Redirect with a  
header, and no version of Asterisk supports it.  I am the only game in the 
world for Stir-Shaken and Asterisk. I know it sounds arrogant but it is 
literally true. If you need to sign your calls to get through, with Asterisk, 
you need to connect to my service. I am an approved Service Provider from the 
FCC. If you keep thinking this is not happening, it is, and your business will 
disappear overnight.
The issue is that Vicidial, for example, does not provide res_odbc and 
func_odbc, so you need to solve that first with Vicidial. Then you can apply 
the code I provided earlier and your calls with have a legal, binding 
signature. The carriers verify each signature and discard the ones that fail 
the cryptography test.


Sounds like you're trying to sell/direct people towards a service that
you've created.  Feel free to do so on the -biz list but the -users
list isn't the right place for that sort of thing.


But the question is, are his statements correct that we need some
service -- not necessarily his -- to sign the call before sending it
to our normal carrier, or will the normal carrier -- whoever -- sign
the call if they know the number?



--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Codec question

2020-06-17 Thread Eric Wieling

turn off g726.

On 6/17/20 4:34 PM, Jerry Geis wrote:

Ok - updating the firmware on teh device - factory reset, re-config.
Capabilities: us - (g726|slin16|ulaw|alaw|gsm), peer - 
audio=(ulaw|alaw|g726|slin16)/video=(nothing)/text=(nothing), combined - 
(g726|slin16|ulaw|alaw)

Looking much better.

Jerry

On Wed, Jun 17, 2020 at 4:01 PM Jerry Geis > wrote:


I thought - what about the software - maybe it needs updated.
After doing so I get a list:

Audio codecs
PCMU (8000 Hz)
PCMA (8000 Hz)
opus (48000 Hz)
L16/16000 (16000 Hz)
G.726-32 (8000 Hz)
L16/8000 (8000 Hz)
speex/16000 (16000 Hz)
speex/8000 (8000 Hz)




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Stir-Shaken for asterisk

2020-05-27 Thread Eric Wieling

Transnexus has some STIR/SHAKEN related features.
https://transnexus.com/clearip/

We are evaluating them for robocall blocking.

On 5/28/20 12:10 AM, Jeff LaCoursiere wrote:

A few weeks... like in a year and a few weeks:

https://transnexus.com/blog/2020/fcc-mandates-stir-shaken/

Some interesting bits in there as well, like:

"These rules do not apply to providers that lack control of the network 
infrastructure necessary to implement STIR/SHAKEN."


See also:

https://wiki.asterisk.org/wiki/display/AST/STIR+and+SHAKEN


*Jeff LaCoursiere*
STRATUSTALK, INC. / CTO

Phone:  *+1 703.496.4990 x108*
Mobile: *+1 815.546.6599*
Email:  *j...@stratustalk.com* 
Website:*https://www.stratustalk.com*
Address:*One Freedom Square
13th Floor
Reston, VA 20190*

 
 



On 5/27/20 10:51 PM, Saint Michael wrote:
In a few weeks, no SIP call is going to terminate unless they 
are signed properly, as mandated by law.  We are in the business of 
Stir-Shaken, signing calls, as an FCC-approved provider. A big 
differentiator between our service and the rest: we are the only ones 
who don't need to receive the calls in our servers to sign them. We do 
this over a MySQL call, easily connectable to Asterisk via res_odbc, 
so you never have to send us your calls. This is a sample of how we do 
this so you may test now:
mysql -u anonymous -h 208.73.232.47 -e "call 
strshk.stir_shaken_signature('7274433019','1957408')".
If your caller-ID is a valid US number and not a wireless number (that 
is a NO-NO for the FCC), we sign the call as 'C', if you use your own 
DIDs, something we can verify as legit, then we sign as 'B', and if 
you use our DID as caller ID, we sign as 'A', full attestation.
Please email to venefax at g mail if you have any questions. Do not 
think you can do business as usual. The wild west of VOIP is coming to 
an end. But we can keep you in business if you follow the rules.






--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Troubleshooting load issues

2020-04-22 Thread Eric Wieling
Try setting transcode_via_sln=no in /etc/asterisk/asterisk.conf and 
restart Asterisk.  A reload will NOT apply the new value.  Setting it to 
no seems to smooth out CPU usage on one of my servers.



On 4/22/20 2:01 PM, Dovid Bender wrote:

Hi,

I have an Asterisk box which has an IVR that plays random gsm files. The 
box has SSD's and two CPU E5-2695 v2 cpus with 64GB ram. The Asterisk 
CPU usage along with the load seems to jump around. With about 500 
callers it hovers between 250-400% CPU (so 2.5 to 4 cores) which seems 
reasonable. Every so often the load average spikes. The idle never drops 
below 85%. When the load average spikes I see a lot of kworker threads 
and the CPU usage tends to (not not always) go up as well. How would I 
go about seeing what in Asterisk is causing the spike? The box is locked 
down and only takes calls from an OpenSiPS box. There is nothing else 
running on the box.


TIA.

Dovid




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] DAHDI not loading

2020-03-16 Thread Eric Wieling
If the kernel changes, then DAHDI needs to be recompiled.  It sounds 
like the kernel did not change, but you might want to check.


On 3/16/20 12:58 PM, Jerry Geis wrote:

Just a guess,
Recompile Dadhi.



I'd rather not have to do that step.  I "desire" to make the image and copy to the 
physical disk with dd and have everything set to go.  Not take further time and 
"recompile" things.

How do I do that?

Jerry




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] USB dahdi fxo ?

2019-12-14 Thread Eric Wieling

People make it overly complicated.

Things which provide dialtone are plugged into FXO ports.
   Phone lines
   PBX analog extensions

Things which expect to be provided with dialtone are plugged into FXS ports.
   Analog Phones
   Fax Machines

FXO ports can handle the 90 volt ring singnal
FXS ports often get destroyed by a 90 volt ring signal


--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] clarification on gosub, macros and AEL

2019-10-15 Thread Eric Wieling

For all new dialplan, I recommend using Gosub.

From https://www.voip-info.org/asterisk-ael2/ :
This will complement the fact that Macros will be implemented with 
Gosub() calls instead of Macro() calls from now on, to avoid restricted 
memory issues. [I think this started in Asterisk 1.4)


On 10/15/19 12:07 PM, Doug Lytle wrote:

Nobody has any information or opinions on any of this?


Personally, I don't think MACROS are going anywhere any time soon, so I have 
not bothered looking into a substitution.

As for ael; I've never used it.

Doug



--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Increasing variables - Changes v13 vs v16

2019-10-01 Thread Eric Wieling

Verify ${myCpt} is not empty.

On 10/1/19 10:24 AM, Administrator TOOTAI wrote:

Hi list,

on asterisk 13 I use

same => n,Set(__myCpt=$[${myCpt} + 1])

which is working well. On an Asterisk 16 I get, for this same command

[2019-10-01 16:15:01] WARNING[28197][C-0008]: ast_expr2.fl:470 
ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '+', 
expecting $end; Input:


  + 1

  ^

What changes in 16 version creates this behavior and how to get it work ?

Thanks for any hint



--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Lightweight ODBC DB

2019-08-01 Thread Eric Wieling
It is not tough to run multiple instances of MySQL using different data 
directories and different ports/sockets.Google for mysqld_multi.


I have an MySQL instance which holds call routing information and is 
replicated to the Asterisk servers.  I have a second MySQL instance on 
the same server which holds CDRs and other data which doesn't need to be 
 replicated to the Asterisk servers.


On 8/1/19 5:08 PM, Dovid Bender wrote:

Glenn,

I can't use MySQL as each node currently has MySQL however there is a 
lot of data that is stored locally on each box. I may have to take this 
route if I can't find something else but that would mean syncing all 
sorts of data that does not need to be synced.




On Tue, Jul 30, 2019 at 10:03 PM Glenn Geller (VDOPh) 
mailto:ggel...@vdo-ph.com>> wrote:


Hi Dovid,

Totally possible... We're currently doing what you suggest with
standard mySQL configured in Master-Master replication mode, across
many nodes geo-distributed, with no (or few, like environment
related) errors... for a few years now.

This allows for fast updates at any node, and synchronizes via
replication across other nodes as necessary.

There are other replication solutions out there, but nothing as
free, and "light" as this, that we've found so far.

Hope this helps.

*Glenn Geller

*

*VDOTel*


On Tue, Jul 30, 2019 at 6:56 PM Dovid Bender mailto:do...@telecurve.com>> wrote:

Hi,

I am running several Asterisk boxes with realtime around the
world. Does anyone have a recommendation for a "light" db that
would work with Asterisk that would also allow replication
between all sites (so if I add an entry to one box it will work
with the rest)?

TIA.

Dovid

-- 
_

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

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

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

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

-- 
_

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

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

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

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




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Eric Wieling

In PHP something like:

$pid = pcntl_fork();
if ($pid != 0) {
// we are the parent
// do parent stuff
exit;
}

// we are the child, detatch from terminal
$sid = posix_setsid();
if ($sid < 0) {
die;
}
// do child stuff

On 04/19/2019 02:00 PM, Mark Wiater wrote:

On 4/19/2019 1:49 PM, Dovid Bender wrote:

Mark,

I am using PHP agi and when forking the call does not continue util 
the forked process is done. Am I doing it wrong?



On Wed, Apr 10, 2019 at 4:27 PM Mark Wiater > wrote:


On 4/10/2019 3:54 PM, 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?



Is there a reason you can't fork in the AGI and just return to the
dialplan in the parent?


Dovid,

I'm not much of a PHP person, but in perl, i check the process id that's 
returned from fork() and exit if it's 1 (parent) and keep processing if 
it's the child (greater than 1).


I think php uses pcntl_fork().

Is that how you're doing it?





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] why doesn't extension "s" work ?

2019-03-29 Thread Eric Wieling
Think of "s" as meaning "stupid" because calls from devices too stupid 
to send the dialed number are routed to the "s" extension.


Any incoming calls which includes the dialed number would NOT be sent to 
extension "s", those calls will match whatever the dialed number is.


On 03/28/2019 08:32 PM, sean darcy wrote:

I'm using "s" extension in my dialplan:

[gv-voice]
exten => s,1,Verbose(callerid is "${CALLERID(all)}" or 
"${CALLERID(num)}") ;Set(Var_TO=${SIP_HEADER(TO)})  ; PJSIP_HEADER(read,To)

    same=>n,

But when a call comes in to the gv-voice context, "s" doesn't match the 
extension:


res_pjsip_session.c:2991 new_invite: Call from 'gv-voice' 
(UDP:10.10.10.80:5062) to extension '' rejected because 
extension not found in context 'gv-voice'.


I thought "s" (as in start ?) would match any extension sent to that 
context.


sean




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Paging systems?

2019-03-21 Thread Eric Wieling
These seem to work well: 
http://www.vikingelectronics.com/product_docs/product_manuals/VE__PA-15__15_Watt_Paging_Amplifier_with_Background_Music_and_Loud_Ringing_486.pdf



On 03/21/2019 02:53 PM, Michael Munger wrote:
Does anyone have an (overhead) paging system that they like that works 
with SIP?


We’ve got a client with an old paging system that (supposedly) just 
takes an rj11 POTS connection, but when we put an SPA Cisco adapter on 
it, it doesn’t auto-answer the call, so paging never happens.




Michael J. Munger, dCAP, MCPS, MCNPS, MBSS

*Microsoft Certified Professional*

*Microsoft Certified Small Business Specialist*

*Digium Certified Asterisk Professional*

*High Powered Help, Inc.*

p:



678-905-8569

w:



hph.io e: m...@hph.io 





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread Eric Wieling

If you want your dialplan code to look pretty, use AEL.


On 02/20/2019 11:41 AM, Brian J. Murrell wrote:

Is there any less cumbersome way of doing conditionalized/branching in
extensions.conf other than something like:

exten => s,n,GotoIf($["${SIP}" = "PJSIP" ]?pjsip)
exten => s,n,Dial(${ARG2},20,TtWw)
exten => s,n,Goto(afterdial)
exten => 
s,n(pjsip),Dial(${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})},20,TtWw)
exten => s,n(afterdial),Goto(s-${DIALSTATUS},1)

Granted the particular above example could probably be better written
to simply modify $ARG2 based on ${SIP} rather than having two Dial()
branches, but using the above as just an example for wanting to have
branches, is there a less cumbersome way?

Cheers,
b.





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] PJSIP DNS ISSUE

2019-02-20 Thread Eric Wieling

Make sure the IP of every interface address is listed in /etc/hosts

Use dnsmgr

Install local BIND, which you already did.

On 02/20/2019 11:29 AM, John T. Bittner wrote:
Anyone know how to disable DNS in asterisk so PJSIP still works when the 
internet goes down.


I tried a few things but nothing is working. I even installed BIND on 
the asterisk box …that didn’t even work. Once I pull the plug on the 
internet, I cant dial anything.


John Bittner

CTO

xaccellogoemail

380 US Highway 46, Suite 500

Totowa, NJ 07512

Phone: 201.806.2602 x2405

Fax:   201.806.2604

Cell:   973.390.1090

www.xaccel.net 

*/CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of 
the intended recipient(s) and may contain confidential
and privileged information which should not be shared or forwarded. Any 
unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the 
sender by reply e-mail and destroy all copies of the e-mail./*






--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] trouble removing + sign

2019-02-14 Thread Eric Wieling

The format of Set is Set(MYVAR=myval) not Set(MYVAR = myval)

On 02/13/2019 06:12 PM, sean darcy wrote:
I'm using BLACKLIST() to check numbers, which does not like leading + 
signs. I want to test if there is a plus sign, and then remove it.


I tried:

  ;  strip leading plus sign
   same => n, Verbose( callerid 0:1 is ${CALLERID(num):0:1} )
   same => n,ExecIf($["${CALLERID(num):0:1}" = "+"]?Set(CALLERID(num) = 
${CALLERID(num):1})

   same=>n,GotoIf(${BLACKLIST()}?make-em-wait)

but it's stripping the first character + sign or not. The callerid is 
1203XX


     -- Executing [s@hangup-spam:3] Verbose("PJSIP/2667075-000b", " 
callerid 0:1 is 1 ") in new stack

  callerid 0:1 is 1
     -- Executing [s@hangup-spam:4] ExecIf("PJSIP/2667075-000b", 
"0?Set(CALLERID(num) = 203XXX") in new stack
     -- Executing [s@hangup-spam:5] GotoIf("PJSIP/2667075-000b", 
"0?make-em-wait") in new stack


ExecIf correctly finds the comparison false(the "0"), but still executes 
the appiftrue .


What am I missing ?




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Freepbx / Asterisk PJsip multipe devices

2019-02-06 Thread Eric Wieling

That question was answered long ago..

https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels

On 02/06/2019 09:16 AM, basti wrote:

In other words.

I there a way that both phones are ring with only one extension?

On 06.02.19 15:05, basti wrote:

both phones are in the same net.
when the soft phone is shut down, on hardware phone only an led is
flashing to show an incoming call but no sound.

both phones use the same extension. that is the reason why I use pjsip.

On 06.02.19 14:59, Antony Stone wrote:

On Wednesday 06 February 2019 at 13:54:44, Mark Wiater wrote:


These two phones are not using the same extension, are they?


If you shut down the softphone, does the hardware phone then ring?


Antony.


On 2/6/2019 8:49 AM, basti wrote:

both phones are registered. and the hardware phone can also make calls.
but an incoming call is not displayed and also not hearing.

Call Waiting is also disabled.

On 06.02.19 14:07, Cyril Alberts wrote:

Hi,
look at your registrations, is the hardware phone registered?
if yes, which phone vendor do you want to connect? can you make
outgoing calls with hardwarephone?

BR Cyril

Am Mittwoch, den 06.02.2019, 13:00 +0100 schrieb basti:

Hello,

I have some user that had have a hardwarephone and an softphone. I
use pjsip driver and set "Max Contacts = 2" to have register both at the
same time.

But Only the softphone is ring. the hardware phone is mute.

How can i fix this?








--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] Various extensions ring once and go to voicemail - Thomas Peters

2019-01-15 Thread Eric Wieling

From https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces:

res_timing_dahdi uses timing mechanisms provided by DAHDI. This method 
of timing was previously the only means by which Asterisk could receive 
timing. It has the benefit of being efficient, and if a system is 
already going to use DAHDI hardware, then it makes good sense to use 
this timing source. If, however, there is no need for DAHDI other than 
as a timing source, this timing source may seem unattractive. For users 
who are upgrading from Asterisk 1.4 and are used to the ztdummy timing 
interface, res_timing_dahdi provides the interface to DAHDI via the 
dahdi kernel module.


res_timing_timerfd uses a timing mechanism provided directly by the 
Linux kernel. This timing interface is only available on Linux systems 
using a kernel version at least 2.6.25 and a glibc version at least 2.8. 
This interface has the benefit of being very efficient, but at the time 
this is being written, it is a relatively new feature on Linux, meaning 
that its availability is not widespread.


On 01/15/2019 09:53 AM, Thomas Peters wrote:

Carlos and Stefan (and other who have helped):

I DON'T HAVE the res_timing_timerfd.so file. Can I build it? Recompiling 
Asterisk is unrealistic in my position but I wonder if I can build the one 
module. Here's what I do have:

apbx:~ $ locate *res_timing_timerfd*
/usr/src/asterisk-1.8.23.1/res/.res_timing_timerfd.makeopts
/usr/src/asterisk-1.8.23.1/res/.res_timing_timerfd.moduleinfo
/usr/src/asterisk-1.8.23.1/res/res_timing_timerfd.c
/usr/src/asterisk-1.8.7.0/res/.res_timing_timerfd.makeopts
/usr/src/asterisk-1.8.7.0/res/.res_timing_timerfd.moduleinfo
/usr/src/asterisk-1.8.7.0/res/res_timing_timerfd.c

Why I have 1.8.23 and 1.8.7 I don't know. Asterisk on this system is version 
1.8.7.0.

NEXT QUESTION: There are NO timing modules listed in /etc/asterisk/modules.conf at all. 
The only ones that are explicitly loaded are format_wav format_pcm format_mp3 and 
res_musiconhold. And there are "preload" directives for pbx_config.so and 
chan_local.so.

Is res_timing_dahdi.so getting loaded somewhere else? Or is it a default of 
some kind?

SYSTEM TIME OF DAY CLOCK which someone asked about, seems accurate. I did
watch -n1 date
and watched the time tick up, perfectly synchronized to my mobile phone. It 
might be off by a second or so, I'd have a hard time knowing for sure. NTPD is 
running, but not working for some reason. I fixed it (ownership of ntp.conf 
wrong) so now ntpq -pn returns a server ID.



Thomas M. Peters | Sr. Systems Administrator |  tpet...@mcts.org
Desk: 414.343.1720 | Helpdesk: x3400 or  helpd...@mcts.org
Milwaukee County Transit System

1942 N 17th Street | Milwaukee, WI  53205
Check us out on Facebook & Twitter

-Original Message-
From: asterisk-users  On Behalf Of 
Stefan Viljoen
Sent: Tuesday, January 15, 2019 12:05 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Various extensions ring once and go to voicemail 
- Thomas Peters

Here’s what I get:

apbx*CLI> module show like timing
Module Description  Use 
Count
res_timing_pthread.so  pthread Timing Interface 0
res_timing_dahdi.soDAHDI Timing Interface   4
2 modules loaded

So what would you suggest? (And thanks in advance.)

Thomas

I've had some good experience with

res_timing_dahdi

both when we ourselves were still on 1.8 and now with us on Asterisk 13 as well.

To force usage of a certain timer, specify in your modules.conf, e. g. to force 
use of DAHDI timing only, I did the following in my modules.conf:

.
.
.
load => res_timing_dahdi.so
noload => res_timing_pthread.so
noload => res_timing_timerfd.so

That said, we have had some weird issues trying to run Asterisk in virtual 
machines - all our instances (16 of them) are physical machines.

We did a deployment at Azure in a Centos 7 "stock Azure" VM awhile ago and it 
suddenly lost the capability to encode .gsm audio files. All .gsm files the virtualised 
Asterisk 13 instances produced were all corrupt and no player would want to play the .gsm 
files. Neither could SOX convert them to anything. So we had to switch over to .wav, and 
then use a mixmonitor hook and manually convert the .wav files back to .gsm in SOX after 
each recording was written by Asterisk in .wav format. There were no errors logged, 
Asterisk just mysteriously lost the capacity to encode .gsm files when running on the 
Azure VM instance we had.

So quite probably the virtual environment / hypervisor you're using is part of 
the issue and switching timing modules around won't solve anything...

Have you checked that the system time is sane, and that one second on a stop 
watch externally to the VM instance, equates to one second inside it?

Because the symptoms described could indicate that the clock in the VM is just 
running too fast - or that some timing implementation detail inside 

Re: [asterisk-users] How to defer SDP in ACK for unit testing purposes

2018-10-10 Thread Eric Wieling

Have you looked at https://sourceforge.net/projects/sipsak.berlios/

On 10/10/2018 07:11 AM, Olivier wrote:



Le mer. 10 oct. 2018 à 12:26, Joshua Colp > a écrit :


On Wed, Oct 10, 2018, at 4:27 AM, Olivier wrote:
 > Hello,
 >
 > I think I met a case similar to the one solved by [1] . Quoting
this case :
 >
 > * res_pjsip: Handle deferred SDP hold/unhold properly.
 >
 >         Some SIP devices indicate hold/unhold using deferred SDP
reinvites. In
 >         other words, they provide no SDP in the reinvite.
 >
 >         A typical transaction that starts hold might look
something like this:
 >
 >         * Device sends reinvite with no SDP
 >         * Asterisk sends 200 OK with SDP indicating sendrecv on
streams.
 >         * Device sends ACK with SDP indicating sendonly on streams.
 >
 >
 > Now, I would like to configure an Asterisk instance to act as
those SIP
 > devices, ie to defer all SDP signaling in ACK.
 >
 > This is for testing purpose as I would like to reproduce in a lab
an issue
 > with those SIP devices.
 >
 > 1. Is it possible ? I can use any Asterisk version for
implementation.

It is not possible to configure Asterisk for this. The chan_pjsip
module only does normal reinvites with SDP when configured to pass
through MOH signaling.


This is the answser I feared ;-)
Thanks for replying.

If someone has a clue for alternatives (softphones, hardphones, ...), 
I'll curious to know



-- 
Joshua Colp

Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com  &
www.asterisk.org 

-- 
_

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

Astricon is coming up October 9-11!  Signup is available at:
https://www.asterisk.org/community/astricon-user-conference

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





--
http://help.nyigc.net/

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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 timeout option

2018-09-14 Thread Eric Wieling
I don't know AGIspeedy, but I have some PHP scripts where I set a 
connect timeout using streams.


Example using https, but should be easily adaptable to non-s http.:

$pbxsh_bin = @file_get_contents("https://blah.blah.blah;, FALSE, 
@stream_context_create(array('https' => array('timeout' => 5, 
"verify_peer"=>false, "verify_peer_name"=>false;


On 09/14/2018 01:40 PM, Carlos Chavez wrote:

On 9/13/2018 8:04 PM, Patrick Wakano wrote:


Hello list,
Hope you all doing  well!

Recently, I had an issue with a FastAGI PHP script, which under some 
specific situation would run into an infinity loop, consuming all CPU 
resources. This also was preventing Asterisk to terminated the call 
properly because it was waiting for the AGI to return... The 
application uses AGIspeedy to process the AGI calls, not sure if this 
can be affecting this situation somehow
Due to this problem I started looking for some option to timeout the 
AGI call and return to the dialplan after XYZ seconds and so this 
would protect Asterisk preventing the dialplan to get stuck due to 
some external script problem that is actually outside of Asterisk 
control. Does Asterisk provide some control of this sort? I searched 
around and could not find any.

Any idea is appreciated!

Kind regards
Patrick Wakano



I think this is what you may be looking for:

http://php.net/manual/en/function.set-time-limit.php



--
http://help.nyigc.net/

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] change dialing process on live call

2018-08-19 Thread Eric Wieling

Another way, using Local/

[do_dial]

exten => s,1,Noop
exten => s,n,Dial(SIP/1000/1001@do_dial,20)
exten => s,n,Hangup()

exten => 1001,1,Noop
exten => 1001,n,Wait(20)
exten => 1001,n,Dial(SIP/1001)
exten => 1001,n,Hangup

More detailed:

https://wiki.asterisk.org/wiki/display/AST/Delay+Dialing+Devices+Example

On 08/19/2018 08:20 AM, Khalil Khamlichi wrote:
Thanks for your response, this works but we cannot hardcode this in the 
dialplan, we need this to be done from an external application connected 
either via manager or stasis.



On Sun, Aug 19, 2018, 11:14 AM Doug Lytle > wrote:


On 08/19/2018 05:57 AM, Khalil Khamlichi wrote:

Is there a way to add another extension to a live dial, for example

Dial(PJSIP/1000,,)

and after 20 secondes change it to

Dial(PJSIP/1000/1001,,)


This is a simple one.

     exten => s,1,Dial(SIP/1000,20)
     exten => s,n,Dial(SIP/1000/1001,20)
     exten => s,n,Hangup()

The first dial will ring with a 20 second timeout and proceed to the
next dial and ring both extensions for 20 seconds and finally hangup


--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling
My actual dialplan hangupcause handling is in AGI and AEL, so the 
dialplan below has not been tested.


Don't use HANGUPCAUSE_KEYS, the order of the channels varies.  Save the 
channel name while the dialplan is in the predial handler like below. 
MASTER_CHANNEL is used to avoid silly issues with the scope of the 
out_chan variable.


[test]
exten => _X.,1,Set(CHANNEL(hangup_handler_push)=caller_hangup,s,1)
 same => n,Dial(SIP/my-peer/12125551212,30,b(test_pre_dial^s^1))

[test_pre_dial]
; while in the handler save the channel
exten => _X.,1,Set(MASTER_CHANNEL(out_chan)=${CHANNEL{name})
 same => n,Return

You should be able to use the caller hangup handler to get tech 
hangupcauses like "SIP 480 Temporarily Unavailable".


[caller_hangup]
exten => 
s,1,Noop(HANGUPCAUSE(${MASTER_CHANNEL(out_chan)},tech)='${HANGUPCAUSE(${MASTER_CHANNEL(out_chan)},tech)}')

exten => n,Return


On 06/09/2018 03:10 PM, Khalil Khamlichi wrote:

Thanks for your response Eric,

Here is some testing code, as you can see ${HANGUPCAUSE(${ARG1},tech)}
is empty if number is not found (HANGUPCAUSE=1) or if sip request
times-out (HANGUPCAUSE=0) (a dead far end for example) so I had to
check value HANGUPCAUSE and filter out zero and one before moving on.
where all I need is simply the sip code returned from the server that
even softphones are able to give me.


[autodial_out]
exten => _X.,1,NoOP( testing manager dial out )
  same => 
n,Dial(PJSIP/${EXTEN}@${TRUNK},25,b(autodial_out^setup_hup_handler^1)g)
  same => n,Hangup()


exten => 
setup_hup_handler,1,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1(${CHANNEL}))
  same => n,Return()


[hdlr1]
exten => 
s,1,NoOp(START==)
  same => n,Set(HANGUPCAUSE_STRING=${HANGUPCAUSE_KEYS()})
  same => n,Set(ASTcause=${HANGUPCAUSE})
  same => n,Set(GO=Found)
  same => n,GotoIf($[${ASTcause}=0]?NotFound0:Check2)
  same => n(Check2),GotoIf($[${ASTcause}=1]?NotFound1:Found)
  same => n(Found),Set(SIPcause=${HANGUPCAUSE(${ARG1},tech)})
  same => n,Goto(End)
  same => n(NotFound0),Set(SIPcause=SIP 500 Server Internal Error)
  same => n,Goto(End)
  same => n(NotFound1),Set(SIPcause=SIP 404 Not Found)
  same => n,Goto(End)
  same => n(End),Set( ${SIPcause} /
${ASTcause} =======END)
  same => n,Return()


On Sat, Jun 9, 2018 at 7:02 PM Eric Wieling  wrote:


I think HANGUPCAUSE is channel agnostic.

See: core show function HANGUPCAUSE

Some thing like this IIRC:
  Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)})

Remember the incoming leg of the call and the outgoing leg of the call
are different channels.  Make sure you are giving HANGUPCAUSE the
correct channel.

On 06/09/2018 02:01 PM, Khalil Khamlichi wrote:

It seems very weird to me that we cannot access sip code of a call
from pjsip which information is actually returned from the provider,
so it is available to asterisk, why does asterisk hide it ?
On Sat, Jun 9, 2018 at 5:08 PM Khalil Khamlichi
 wrote:


Hi,

Is there any way I can get exact sip status from pjsip after a dial ?
or all we can
get is asterisk hangup causes ?

Thanks in advance.

KKh




--
http://help.nyigc.net/


--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling

I think HANGUPCAUSE is channel agnostic.

See: core show function HANGUPCAUSE

Some thing like this IIRC:
Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)})

Remember the incoming leg of the call and the outgoing leg of the call 
are different channels.  Make sure you are giving HANGUPCAUSE the 
correct channel.


On 06/09/2018 02:01 PM, Khalil Khamlichi wrote:

It seems very weird to me that we cannot access sip code of a call
from pjsip which information is actually returned from the provider,
so it is available to asterisk, why does asterisk hide it ?
On Sat, Jun 9, 2018 at 5:08 PM Khalil Khamlichi
 wrote:


Hi,

Is there any way I can get exact sip status from pjsip after a dial ?
or all we can
get is asterisk hangup causes ?

Thanks in advance.

KKh




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling

I think HANGUPCAUSE is channel agnostic.

See: core show function HANGUPCAUSE

Some thing like this IIRC:
Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)})

Remember the incoming leg of the call and the outgoing leg of the call 
are different channels.  Make sure you are giving HANGUPCAUSE the 
correct channel.


On 06/09/2018 02:01 PM, Khalil Khamlichi wrote:

It seems very weird to me that we cannot access sip code of a call
from pjsip which information is actually returned from the provider,
so it is available to asterisk, why does asterisk hide it ?
On Sat, Jun 9, 2018 at 5:08 PM Khalil Khamlichi
 wrote:


Hi,

Is there any way I can get exact sip status from pjsip after a dial ?
or all we can
get is asterisk hangup causes ?

Thanks in advance.

KKh




--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] How to execute priorities following a caller hangup in a successful Dial?

2018-06-06 Thread Eric Wieling
Keep it as simple as you can.

​[test]
exten => 12345678900,1,Noop( Set callER hangup handler
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Set(CHANNEL(hangup_handler_push)=test_caller_hangup,${EXTEN},1)
 same =>
n,Dial(SIP/pbx-nyigc/4408,60,gb(test_pre_dial^${EXTEN}^1)F(test_intercept_callee,${EXTEN},1))
 same => n,Noop(### Running post Dial() dialplan on callER
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Gosub(test_intercept_caller,${EXTEN},1)
 same => n,Hangup

[test_pre_dial]
exten => _X.,1,Noop( Set callEE hangup handler
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Set(CHANNEL(hangup_handler_push)=test_callee_hangup,${EXTEN},1)
 same => n,Dumpchan
 same => n,Return

[test_caller_hangup]
exten => _X.,1,Noop( Running callER hangup handler
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Dumpchan
 same => n,Return

[test_callee_hangup]
exten => _X.,1,Noop( Running callEE hangup handler
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Dumpchan
 same => n,Return

[test_intercept_callee]
exten => _X.,1,Noop(### Running post Dial() dialplan on callEE
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Dumpchan
 same => n,ExecIf($["${DIALSTATUS}" == "ANSWER"]?Hangup)
 same => n,ExecIf($["${DIALSTATUS}" == "BUSY"]?Busy)
 same => n,Hangup

[test_intercept_caller]
exten => _X.,1,Noop(### Running post Dial() dialplan on callER
CHANNEL(name)='${CHANNEL(name)}' SIPCALLID='${SIPCALLID}')
 same => n,Dumpchan
 same => n,Hangup

​


On Wed, Jun 6, 2018 at 2:37 PM, David P  wrote:

> FYI, we found that our peers don't hangup properly. But we would still
> like to know how to get the peer's hangup handler to fire upon peer hangup,
> because right now it corrupts our globals by firing after the caller's
> hangup handler.
>
> On Tue, Jun 5, 2018 at 5:40 PM, David P  wrote:
>
>> FWIW, I added the following after the Dial, and it doesn't appear in cli
>> after peer hangup:
>>
>> same => n,NoOp(After Dial ${AddressToReachPeer})
>>
>> I also tried putting 'g' before the 'b'.
>>
>> I also tried removing the context headers of the hangup handlers and
>> predial handler, and just referring to those by extensions. No difference.
>>
>> On Tue, Jun 5, 2018 at 3:17 PM, David P 
>> wrote:
>>
>>> This has been super-helpful, Eric. However, the handleHangupByPeer 
>>> priorities
>>> below are still not run when the peer hangs-up. The last line in the cli
>>> when the peer hangs-up is still:
>>> Strict RTP learning complete - Locking on source address
>>> (Although sometimes there is also: Retransmission timeout reached on
>>> transmission)
>>>
>>>  same => 
>>> n(callPeer),Set(GLOBAL(CB${IndexIntoPeers}CurrentCallsCount)=$[${PeerCurrentCallsCount}
>>> + 1])
>>>  ; Ensure that hangup by caller/inbound-channel will invoke
>>> handleHangupByCaller.
>>>  same => n,Set(CHANNEL(hangup_handler_push)=handleHangupByCaller,s,1(
>>> args))
>>>  same => n,Set(AddressToReachPeer=SIP/${EXTEN:0:4}@${PeerBeingConside
>>> red})
>>>  ; Ensure that the channel of the peer (i.e. outbound-channel) is
>>> configured with hangup handler.
>>>  same => n,Dial(${AddressToReachPeer},,b(beforeDialingPeerConfigureIt
>>> sChannelForPeerHangupHandling^s^1))
>>>  same => n,Hangup
>>>
>>> [beforeDialingPeerConfigureItsChannelForPeerHangupHandling]
>>> exten => s,1,Set(CHANNEL(hangup_handler_push)=handleHangupByPeer,s,1(
>>> args))
>>>  same => n,Return
>>>
>>> [handleHangupByPeer]
>>>  ; Ensure that GLOBAL(CB${IndexIntoPeers}CurrentCallsCount) is
>>> decremented after hangup, and end-of-call-epoch is set.
>>> exten => s,1,NoOp(${PeerBeingConsidered} peer channel: Entered
>>> handleHangupByCallerOrPeer Calls ${CB${IndexIntoPeers}CurrentCa
>>> llsCount})
>>>  same => n,Set(GLOBAL(CB${IndexIntoPeers}CurrentCallsCount)=$[${CB${I
>>> ndexIntoPeers}CurrentCallsCount} - 1])
>>>  same => n,Set(GLOBAL(${PeerBeingConsidered}EpochAtCallEnd)=${EPOCH})
>>>  same => n,Return
>>>
>>> [handleHangupByCaller]
>>>  ; Ensure that GLOBAL(CB${IndexIntoPeers}CurrentCallsCount) is
>>> decremented after hangup, and end-of-call-epoch is set.
>>> exten => s,1,NoOp(${PeerBeingConsidered} caller channel: Entered
>>> handleHangupByCallerOrPeer Calls ${CB${IndexIntoPeers}CurrentCa
>>> llsCount})
>>&

Re: [asterisk-users] How to execute priorities following a caller hangup in a successful Dial?

2018-06-05 Thread Eric Wieling

Don't use the _. pattern.  Ever.

The call has two channels so it needs two hangup handlers, something 
like this, though I've not tested it.


[some_context]
exten => _X.,1,Noop
 same => n,Set(CHANNEL(hangup_handler_push)=my_caller_hangup_handler)
 same => n,Dial(SIP/number@peer,b(pre_dial^s^1))
 same => n,Hangup

[pre_dial]
exten => s,1,Set(CHANNEL(hangup_handler_push)=my_called_hangup_handler)
 same => Return

See: https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers
and https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers


On 06/05/2018 03:37 PM, David P wrote:
Thanks, Eric. I just tried a hangup handler, but it's showing a similar 
problem: When the peer hangs-up, the hangup handler is not invoked and 
the caller channel remains open.


  same => 
n(callPeer),Set(GLOBAL(Peer${IndexIntoPeers}CurrentCallsCount)=$[${PeerCurrentCallsCount} 
+ 1])
  same => 
n,Set(CHANNEL(hangup_handler_push)=handleHangupByCallerOrPeer,doesntMatter,1(args))

  same => n,Set(DialForPeer=SIP/${EXTEN:0:4}@${PeerBeingConsidered})
  same => n,Dial(${DialForPeer})
  same => n,Hangup()
[handleHangupByCallerOrPeer]
exten => _.,1,NoOp(${PeerBeingConsidered}: Entered 
handleHangupByCallerOrPeer Calls ${Peer${IndexIntoPeers}CurrentCallsCount})
  same => 
n,Set(GLOBAL(Peer${IndexIntoPeers}CurrentCallsCount)=$[${Peer${IndexIntoPeers}CurrentCallsCount} 
- 1])

  same => n,Set(GLOBAL(${PeerBeingConsidered}EpochAtCallEnd)=${EPOCH})
  same => n,Return()

I've also tried replacing the Dial above with:

  same => n,Dial(${DialForPeer},,g)

Cheers,
David

On Tue, Jun 5, 2018 at 7:38 AM, Eric Wieling <mailto:ewiel...@nyigc.com>> wrote:


Use hangup handlers, they work around the issues with the 'h' extension.

On 06/05/2018 05:33 AM, David P wrote:

Thanks, Anthony.

I added both 'g' and 'F' options. Now, when the caller hangs-up,
my cleanup code is run by both the caller channel and the peer
channel, but I only want the caller channel to do that.

Also, when the peer hangs-up, there is no execution of the
priorities following the Dial.

Finally, is there a way to reset all globals, maybe as a variant
of "dialplan reload"?

On Tue, Jun 5, 2018 at 1:21 AM, Antony Stone
mailto:antony.st...@asterisk.open.source.it>
<mailto:antony.st...@asterisk.open.source.it
<mailto:antony.st...@asterisk.open.source.it>>> wrote:

     On Tuesday 05 June 2018 at 08:33:26, David P wrote:

     > We're using Asterisk 14.7.6 and I have a dialplan that
ends like this:
     >     >  same => n,Dial(SIP/${EXTEN:0:4}@peer1)
     >  same => n,Set(GLOBAL(EpochAtCallEnd)=${EPOCH})
     >  same => n,Hangup()
     >     > When peer1 hangsup, the priorities after the Dial
are executed fine. But
     > when the caller hangsup during the Dial, the cleanup
steps aren't done.
     > Why?
     >     > I did read "Note that on a successful connection,
in the absence of the g
     > and G modifiers (below), the Dial command does not return
to allow
     > execution of further commands for that extension in that
context." at
     > https://www.voip-info.org/asterisk-cmd-dial/
<https://www.voip-info.org/asterisk-cmd-dial/>
     <https://www.voip-info.org/asterisk-cmd-dial/
<https://www.voip-info.org/asterisk-cmd-dial/>> But it seems not
to apply
     > because I'm seeing the 'g' behavior without specifying
that option, and the
     > 'G' option seems intended for a far more complicated
scenario.

     If you're getting "g" functionality without specifying it,
     congratulations.

     If you want something similar when the callER hangs up, you
want to
     use the F
     option.

     Regards,


     Antony.




-- 
http://help.nyigc.net/







--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] How to execute priorities following a caller hangup in a successful Dial?

2018-06-05 Thread Eric Wieling

Use hangup handlers, they work around the issues with the 'h' extension.

On 06/05/2018 05:33 AM, David P wrote:

Thanks, Anthony.

I added both 'g' and 'F' options. Now, when the caller hangs-up, my 
cleanup code is run by both the caller channel and the peer channel, but 
I only want the caller channel to do that.


Also, when the peer hangs-up, there is no execution of the priorities 
following the Dial.


Finally, is there a way to reset all globals, maybe as a variant of 
"dialplan reload"?


On Tue, Jun 5, 2018 at 1:21 AM, Antony Stone 
> wrote:


On Tuesday 05 June 2018 at 08:33:26, David P wrote:

> We're using Asterisk 14.7.6 and I have a dialplan that ends like this:
> 
>  same => n,Dial(SIP/${EXTEN:0:4}@peer1)

>  same => n,Set(GLOBAL(EpochAtCallEnd)=${EPOCH})
>  same => n,Hangup()
> 
> When peer1 hangsup, the priorities after the Dial are executed fine. But

> when the caller hangsup during the Dial, the cleanup steps aren't done.
> Why?
> 
> I did read "Note that on a successful connection, in the absence of the g

> and G modifiers (below), the Dial command does not return to allow
> execution of further commands for that extension in that context." at
> https://www.voip-info.org/asterisk-cmd-dial/
 But it seems not to apply
> because I'm seeing the 'g' behavior without specifying that option, and 
the
> 'G' option seems intended for a far more complicated scenario.

If you're getting "g" functionality without specifying it,
congratulations.

If you want something similar when the callER hangs up, you want to
use the F
option.

Regards,


Antony.





--
http://help.nyigc.net/

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

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

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

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

Re: [asterisk-users] What does pct mean?

2018-02-13 Thread Eric Wieling
Could this gap in sequence numbers caused by a codec change generate 
errors like the one below?


[2018-02-13 12:57:43] WARNING[4917][C-0004c2cb] codec_sangoma.c: 
[526559][g722toulaw] Got Seq 15944 but expecting 10106 (time since last 
read = 0ms), dropped 5838 packets


On 02/13/2018 01:24 PM, Andres wrote:

On 2/13/18 11:55 AM, Michael Maier wrote:

On 02/13/2018 at 08:41 AM Floimair Florian wrote:

No you're reading it wrong.

There are 188K received with no loss, and 16441K transmitted.

This doesn't make any sense to me, either. There can't be more packages
transmitted than received. It's the same codec in and out and it's been
running exactly the same time.
Lost and Percent (pct) are not calculated by counting packets. Those 
are calculated from the sequence numbers in the RTP frame.


For example let's say you start the receiver (Asterisk) at Sequence 
#1then something happens and it jumps to sequence #5000.  The 
audio might be fine, but now the stats say 4998 packets were lost. Why 
is there a bizarre sequence jump?  Hard to say.  I have seen it 
because of bugs that eventually get fixed on the CPE, or even when 
there is a change of codec (or re-invite) mid-call.  I would not worry 
too much about this unless you can reproduce it and can address it 
properly at the CPE level.  A packet capture will clearly confirm what 
I am referring to here. Just look at every Sequence # in the RTP flow 
and you will see the jump.



...Receive. .Transmit..
Count    Lost Pct  Jitter   Count    Lost Pct    Jitter RTT
188K  0    0   0.000    188K   16641K 8809   0.000   0.026

       
There are 188K received and 188K transmitted. Pct is unknown - what's 
Pct?



Still 8809 does not sound like a percentage to me  so there is 
something wrong with either the label or the value.
 From what's in the code, you can see it's clearly a lost Packet 
count not a percentage.

So I guess Pct in this case is short for "Packet".

    With best regards

Florian Floimair
Innovation - Software-Development

COMMEND INTERNATIONAL GMBH
http://www.commend.com

Security and Communication by Commend

FN 178618z | LG Salzburg

-Ursprüngliche Nachricht-
Von: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] Im Auftrag von 
Michael Maier

Gesendet: Montag, 12. Februar 2018 17:46
An: asterisk-users@lists.digium.com
Betreff: Re: [asterisk-users] What does pct mean?

Hi Carsten,

On 02/11/2018 at 07:46 PM Carsten Bock wrote:

Hi,

Lost percent (%)

Are you sure? I'm seeing here:

...Receive. .Transmit..
Count    Lost Pct  Jitter   Count    Lost Pct    Jitter RTT
188K  0    0   0.000    188K   16641K 8809   0.000   0.026

=> This doesn't sound reliable to me: there are 188K packets and 
16641K of them are lost?! The Pct value is fluctuating between about 
6009 and 9009.


Thanks,
Michael




Am 11.02.2018 19:27 schrieb "Michael Maier" :


Hello,

could somebody please tell me the meaning of "Pct" as seen in 
asterisk cli:


...Receive. .Transmit..
Count    Lost Pct  Jitter   Count    Lost Pct  Jitter RTT


Thanks,
Michael

--
_
-- Bandwidth and Colocation Provided by 
https://linkprotect.cudasvc.com/url?a=http://www.api-digital.com=E,1,uxGzivqW6oZ241hxc5A3oz1rZf6JLog-Gi4ziwN-95NzbE_HEndRkD8LLLem_gvmmxd5k_T95J2jepit1IpIkZ2AxkG4RSoADT-AMulX4hxaaQ,,=1 
--


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:
https://linkprotect.cudasvc.com/url?a=http://lists.digium.com/mailman/listinfo/asterisk-users=E,1,wIdvPI63-ImQqWZFblrmlGJbQ_cbmu31TlSPHYv9kAkHrNRLdIAjL2IUr9sVYxm6piHc0Pf2Zna7zuNOJ2hb4CVzp2WYVDsgZJqAyHt2YkVuGQ,,=1









--
_
-- 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] Handling a long-running agi on hangup-handler?

2018-01-18 Thread Eric Wieling


Asterisk (after 1.4?) sends the AGI a HUP when the call hangs up.

Try setting your script to ignore the HUP signal and make it fork and go 
into the background so Asterisk thinks the process has completed.


In PHP ignore HUP:

    pcntl_signal(SIGHUP, SIG_IGN);

In PHP fork and become a short lived daemon:

    $pid = pcntl_fork();
        if ($pid == -1) {
        die("could not fork");
        } elseif ($pid) {
        exit; // we are the parent
        }
        // we are the child
        // detatch from the controlling terminal so we don't become a 
zombie when we die.

        if (posix_setsid() == -1) {
        die("could not detach from terminal");
        }


On 01/18/2018 12:27 PM, Jonathan H wrote:
I know that hangup handlers 
(https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers) have to 
finish quickly.


So it's no surprise that my speech to text agi which takes 8 seconds 
gets killed.


However, can anyone think of a way round this? So, once the caller has 
hung up, I need to take one of the channel variables, and pass it to a 
python agi script which then does speech to text.


In-call, it works fine. After hangup, it doesn't. Which is correct, 
but any thoughts on ways round this?


Thanks.




-- 
_
-- 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] Asterisk 13.19.0 Now Available

2018-01-12 Thread Eric Wieling


See https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions for 
information regarding the release cycle.   It shows v14 went into 
security fix only mode on Sept 26 2017.




On 01/12/2018 02:02 PM, Binarus wrote:

Thanks for taking the time, but ...

On 12.01.2018 12:04, Joshua Colp wrote:


Could this be one of the rare cases where 13 and 15 needed security
fixes, but 14 didn't?

These are normal bug fix releases, not security releases. As such 14 did not 
receive a release.


Interesting. The announcements for 13.19.0 and 15.2.0 you have made here
both list all issues which have been fixed in the section "Bugs fixed in
this release". However,

ASTERISK-27480
ASTERISK-27452
ASTERISK-27337
ASTERISK-27319

seem to be security related (according to the short explanation texts in
the announcements) and have been fixed both in 15.2.0 and 13.19.0.

I am wondering why 14 does not suffer from them, or -if it suffers from
them- why they are not considered security related there.

I highly respect your work and don't want to steal your time since I
have probably seriously misunderstood something, but could you please
shortly explain what the string "Security: " (aka "(Security)" and with
other wordings) at the beginning of the short explanation text for an
issue exactly means?

Thank you very much,

Binarus




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

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.


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

On Tue, 26 Dec 2017, Eric Wieling wrote:


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


Why?





-- 
_
-- 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 invite timeouts : how is someone sending invites from our server ??

2018-01-02 Thread Eric Wieling



On 01/02/2018 05:30 PM, sean darcy wrote:

On 12/30/2017 08:18 PM, Dovid Bender wrote:
Script kiddies trying to find vulnerable systems that they can make 
calls on. Lock down the box with iptables and use fail2ban to block 
them. The via is probably bogus unless a box at the DoD was comprimised.




On Sat, Dec 30, 2017 at 6:49 PM, sean darcy > wrote:


    I've been getting a lot of timeouts on non-critical invite
    transactions. I turned on sip debug. They were the result of SIP
    invites like this:

    Retransmitting #10 (NAT) to 185.107.94.10:13057
    :
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP
215.45.145.211:5060;branch=z9hG4bK-524287-1---zg4cfkl50hpwpv4p;received=185.107.94.10;rport=13057
    From: ;tag=fptfih1e
    To: ;tag=as2913c67b
    Call-ID: 5YpLDUSIs6l3xbDXsurYTu..
    CSeq: 1 INVITE
    Server: Asterisk PBX 13.19.0-rc1
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
    INFO, PUBLISH, MESSAGE
    Supported: replaces, timer
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk_home",
    nonce="14be1363"
    Content-Length: 0
I don't see how fail2ban would help. asterisk isn't rejecting 
anything. There's no attempt with username/password.


How could I use iptables to "lock it down" ? We get sip calls from all 
over. Is there something about the incoming packet we could use ? For 
instance , any packet containing a VIA instruction ? For that matter, 
can SIP be configured to drop any VIA request?




fail2ban is most useful for blocking registration attempts.    I handle 
non-registration call attempts by allowing guests, point them to a jail 
context, which runs Log(WARNING,fail2ban='${CHANNEL(peerip)}')   I set a 
fail2ban rule to match that line logged from Asterisk.



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

Don't use an 'h' extension, use a hangup handler.
Use the MASTER_CHANNEL() function to set variables to ensure they are 
always set in the "top most" channel.  Below is an untested example, but 
is inspired by dialplan code I use in production.  Maybe it will help.


[outbound] ; this is called on the incoming (caller) channel
exten => _X.,1,Noop
 same => n,Set(MASTER_CHANNEL(start_timestamp)=${STRFTIME(,,%s.%3q)})
 same => n,Set(CHANNEL(hangup_handler_push)=hangup_handler,s,1)
 same => n,Set(MASTER_CHANNEL(callid_ingress)=${SIPCALLID})
same => n, *** unrelated dialplan, AGIs, etc. ***
 same => n,Dial(SIP/${EXTEN}@1.1.1.1 
,,U(answer_handler)b(pre_dial_handler^s^1)g
 same => n, *** dialplan for the caller when the callee hangs up first, 
not run when caller hangs up first.  use it to try dialing another 
destination, play intercept to caller, etc. ***



[pre_dial_handler] ; this is called on the outgoing (callee) channel
exten => s,1,Noop
 same => n,Set(MASTER_CHANNEL(callid_egress)=${SIPCALLID})
 same => n,Set(MASTER_CHANNEL(dial_timestamp)=${STRFTIME(,,%s.%3q)})
 same => n,Return


[answer_handler] ; run on outgoing (callee) channel, but sets 
answer_timestamp in the caller channel

exten => s,1,Noop
 same => n,Set(MASTER_CHANNEL(answer_timestamp)=${STRFTIME(,,%s.%3q)})
 same => n,Return


[hangup_handler]  ; run on incoming (caller) channel, use to do final 
post call cleanup

exten => s,1,Noop
same => n,Set(MASTER_CHANNEL(hangup_timestamp)=${STRFTIME(,,%s.%3q)})
  same => n, ***post call cleanup AGIs, dialplan, etc.***
same => n,Return



On 12/26/2017 03:28 PM, Dovid Bender wrote:

Hi,

I have a dial plan where I need to notify an external system when a 
call was answered and when the call hung up. In both requests the 
start time needs to be the same. My Dialplan looks something like this:



[outbound]
Exten => _X.,1,Dial(SIP/${EXTEN}@1.1.1.1 
,,U(call-answer-from-carrier))


Exten => h,1,NoOp(ANSWERED_TIME: ${ANSWEREDTIME} >>> DIAL_TIME: 
${DIALEDTIME} >>> HANGUP_TIME: ${EPOCH} >>> ANSWERED TIME 
${MATH(${EPOCH}-${ANSWEREDTIME},int)})


[call-answer-from-carrier]
Exten => s,1,Noop(CALL WAS ANSWERED AT ${EPOCH}
Exten => s,n,Agi(some_script.py)

Now in theory the hangup time of the call (${EPOCH} in the h 
extension) minus the answered time should be the same as the noop from 
my subroutine. I am finding that some times they match and some times 
they are off by a second. My issue is that the external system expects 
the answered time to the same for when we call it from the SubRoutine 
as well as from the h extension. I assume the difference is based on 
the microsecond of when we look at EPOCH how DIALEDTIME is rounded.


Any tips on how I can get the same answered time across the board?

TIA.

Dovid





-- 
_
-- 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] General Kernel practices on CentOS

2017-12-20 Thread Eric Wieling


That only applies to DAHDI, not Asterisk.

I add exclude=*kernel* to /etc/yum.conf so the kernel doesn't get 
upgraded accidentally and break DAHDI.



On 12/20/2017 05:30 AM, Abdul Basit wrote:

Olivier

If you installed asterisk from source, you need to recompile it after 
kernel version upgrade.


This will compile & install asterisk modules with latest installed 
kernel sources.


--
regards,

abdul basit

On 19 December 2017 at 08:01, Ron Wheeler 
> wrote:


Linux x.y.com  3.10.0-693.5.2.el7.x86_64 #1 SMP
Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
I try to keep up with the latest versions of everything.

Ron

On 15/12/2017 5:59 AM, Olivier wrote:

Hello Ron,
Which kernel do you run Asterisk/Freepbx with ?
Cheers

2017-12-14 16:57 GMT+01:00 Ron Wheeler
>:

CentOS 7 works well with Asterisk.
Install latest CentOS7 with updates install asterisk

I am running FreePBX on CentOS 7.

Ron

On 14/12/2017 10:38 AM, Olivier wrote:

Hello,

I'm used to install Asterisk on Debian stable platforms.

A customer is asking how I would proceed on a CentOS platform.

After a short research (see [1] as an example), I'm
wondering what are general kernel practices on CentOS
regarding Asterisk and when targeting stability:

- Is it recommended to upgrade kernel version(s) (ie moving
from linux 3.10 to 4.3) just after OS installation ?

Best regards





-- 
Ron Wheeler

President
Artifact Software Inc
email:rwhee...@artifact-software.com

skype: ronaldmwheeler
phone:866-970-2435, ext 102 


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





-- 
Ron Wheeler

President
Artifact Software Inc
email:rwhee...@artifact-software.com 
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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

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

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


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







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

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

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

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

Re: [asterisk-users] Having problem getting Asterisk to work on CentOS 7

2017-03-14 Thread Eric Wieling
This is what I hacked up for my CentOS 7 Asterisk server.   It does NOT act
like safe_asterisk.

[Unit]
Description=Asterisk PBX and telephony daemon
Documentation=man:asterisk(8)
After=network-online.target multi-user.target

[Service]
Type=simple
User=root
Group=root
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/bin/asterisk -rx 'core reload'

[Install]
WantedBy=multi-user.target


On Tue, Mar 14, 2017 at 2:18 PM, Tzafrir Cohen 
wrote:

> On Tue, Mar 14, 2017 at 05:09:17PM +, Dan Cropp wrote:
> > Thank you Tzafrir.
> >
> > I had been using different users in earlier attempts to make this work.
> Decided to try everything where root is the only user, simply to verify
> it's working.
> >
> > For problem 2, where asterisk is writing to the log but doesn't seem to
> receive the SIP packets even though tcpdump indicates they are making it to
> the box on 5060, I am starting asterisk while logged in as root.
> > /usr/sbin/asterisk -dddc
> >
> >
> > For problem 1, where it seems to be stuck when running as a service, I
> simply reboot the machine.  Then I log it as root and notice it's not
> writing to the log.
> >
> > When running it as a service (after restart).  Here is what the output
> from strace -p $PID_OF_ASTERISK
> >
> >  [root@localhost ~]# strace -p 1470
>
> pkill? nice? That is not asterisk. Are you sure you got the right
> process? Maybe you got safe_asterisk instead? If it is safe_asterisk:
>
> 1. That script is pointless now that you have systemd. Replace it with a
> simple systemd unit (hint: Restart=on-failure gets you most of the way
> there).
>
> Isn't there one already included with Asterisk by now?
>
> 2. Use the option -f of strace to see the exact error message. What is
> error status 34 of asterisk? ERANGE?
>
> --
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 

GMail: Making MS Outlook look good since 2007
-- 
_
-- 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 Eric Wieling

If cable can be pulled , you have a couple of options.

Long Reach Ethernet from Cisco is rated for 5,000 feet. Multi-mode fiber 
with fiber/ethernet media converters on each end would work and 
electrically isolate the two ends of the cable. Both are way overkill 
from a capacity standpoint, but sometimes there's nothing wrong with 
overkill. Put an ATA on the far side.


On 11/02/2016 03:46 PM, Jerry Geis wrote:

Hi All,

The reason for the question was simply that the customer desired some 
solution
called an "AOR" or Area of refuge - I think it was. Basically a call 
button, microphone and speaker to hear back
with the kicker being "a long distance" the solution has to run.  
RS485 is like 4000 feet.


There are solutions our there apparently that are not built on 
asterisk - so I was just trying to find

a solution that potentially worked with asterisk.

Thanks!

Jerry





--
if at first you don't succeed, skydiving isn't for you


--
_
-- 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] Asterisk use with verizon hotspot

2016-10-14 Thread Eric Wieling
A few years ago I ran into something similar.  Using TLS seemed to fix 
it, but it was a while ago so I might be wrong.


On 10/14/2016 11:35 AM, Greg Woods wrote:



On Fri, Oct 14, 2016 at 9:06 AM, Dovid Bender > wrote:


Changing your port should fix all your worries.


That may work if you control both ends of the SIP connection.

--Greg





--
if at first you don't succeed, skydiving isn't for you


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


Re: [asterisk-users] Multiple phones when one is unregistered

2016-09-01 Thread Eric Wieling
The dial application dials devices not extensions.   The only way to 
"dial" an extension from the dialplan is to use chan_local.


On 09/01/2016 06:55 AM, D'Arcy J.M. Cain wrote:

So does the Dial command go directly to the registered device or does
it use the extension?  I was assuming that it was going to the
extension's voice mail if it wasn't there but that's in the extension
dialplan and I suspect that the extension is irrelevant and only the
SIP registration matters.  That would be a good thing since many
extensions also ring the user's cell phone and that would be annoying
if they were at home when someone came to the office door.



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


Re: [asterisk-users] Multiple phones when one is unregistered

2016-08-30 Thread Eric Wieling



On 08/30/2016 11:31 AM, D'Arcy J.M. Cain wrote:

Paste the Asterisk console output of a call showing the problem,
Here is what the log shows.  I can't put the unregistered user back at
the moment.  Perhaps I can do it overnight when no one is going to the
building.

[Aug 23 10:20:55] WARNING[-1][C-0001fee7] app_dial.c: Unable to create
channel of type 'SIP' (cause 20 - Subscriber absent)

I am assuming that the voice mail is for the absent (unregistered) user.


You should set your verbosity to 3 and then reproduce the call and paste 
the CLI output.   It is pointless to troubleshoot without the CLI 
output.  The warning is expected when the phone is offline and does not 
cause the issue you are experiencing.  It almost looks like Local/ 
channels are involved, but we'll know more once we see the CLI output.



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


Re: [asterisk-users] Multiple phones when one is unregistered

2016-08-30 Thread Eric Wieling
The dialplan below cannot go to voicemail, either something else is 
going on or the dialplan below is not the actual dialplan. Calls only go 
to voicemail when the dialplan runs the VoiceMail application.


Paste the Asterisk console output of a call showing the problem, maybe 
someone can help.


On 08/30/2016 09:56 AM, D'Arcy J.M. Cain wrote:

I have an extension that looks like this:

exten => 55,1,Verbose(Door buzzer calling)
   same => n,Dial(SIP/user1/user2/user3)

The idea is that any of the three users can answer the phone to let
someone in.  The problem is that if, say, user2 unplugs his phone then
the call immediately goes to his voice mail and the other two do not
have the ability to open the door.

Is there any way to direct only to phones in a list that are currently
registered?  I am sure that I can write a rather convoluted extension
to check for registrations and create a dial command but I am hoping
that there is an easier way so that I can create these types of
extensions for other clients easily as well as being able to add and
remove destinations quickly.

Cheers.



--
if at first you don't succeed, skydiving isn't for you


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


Re: [asterisk-users] DAHDI on CentOS 7

2016-08-15 Thread Eric Wieling

"make config" should also install the init script.

On 08/15/2016 11:36 AM, Jerry Geis wrote:

>On my Fedora 24 system, the "dahdi-tools" package contains an old-style
>init script  /etc/rc.d/init.d/dahdi, and this seems to work just fine with
>systemd. I realize that CentOS != Fedora but if you have or can find an
>init script for an older CentOS, it might work fine on CentOS 7. I can send
>you the script file that I have, but of course I can't guarantee it will
>work on CentOS.

seems to work. I copied the dahdi.init to /etc/rc.d/init.d/dahdi, run 
chkconfig dahdi on and reboot

and modules are now loaded...

Thanks,

Jerry


On Mon, Aug 15, 2016 at 8:36 AM, Jerry Geis > wrote:


What is needed to get DAHDI to start up correctly on CentOS 7 and
systemd...
I am using DAHDI-linux-complete 2.11.1

I saw mention in my search that it has been fixed after 2.11.1 but
cannot find
what the fix is.

Thanks,

Jerry






--
if at first you don't succeed, skydiving isn't for you


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

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


Re: [asterisk-users] Trouble applying regex to dialplan variable that contains double-quotes

2016-08-08 Thread Eric Wieling


How Set handles quotes can be changed with the 'app_set' setting in the 
[compat] section of /etc/asterisk/asterisk.conf.  See also: 
https://wiki.asterisk.org/wiki/display/AST/Application_Set Perhaps you 
have the value left over from an old Asterisk setup.


On 08/08/2016 04:31 PM, Alex Villací­s Lasso wrote:
I am writing a dialplan context under asterisk 11.21.0 to handle SIP 
message routing between registered SIP peers using chan_sip. I am 
having trouble with double-quotes when the source peer uses a display 
name, which appears in quotes before the SIP URI. I want to extract 
the SIP URI from MESSAGE(from) in order to (conditionally) route a 
failure message back to the source peer.


My test dialplan sets up variables like these:

exten => _X.,n,Set(RX=".*<(.+)>")
exten => _X.,n,Set(T1="Example name" )

If I just apply the regex operator (:) on T1 using regexp RX, like this:

exten => _X.,n,Set(FROM_SIPURI=$[${T1}:${RX}])

...I get this syntax error:

[2016-08-08 15:04:02] WARNING[1653][C-]: ast_expr2.fl:470 
ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected 
':', expecting '-' or '!' or '(' or ''; Input:

"Example name" :".*<(.+)>"
^
(caret points at the colon character)

If I enclose the T1 variable in double quotes, like this:

exten => _X.,n,Set(FROM_SIPURI=$["${T1}":${RX}])

...I get this syntax error:

[2016-08-08 15:05:40] WARNING[1653][C-]: ast_expr2.fl:470 
ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected 
'', expecting $end; Input:

""Example name" ":".*<(.+)>"
  ^
(caret points at letter E)

If I use the QUOTE() function to quote the double quotes before 
applying the regexp, like this:


exten => _X.,n,Set(FROM_SIPURI=$[${QUOTE(${T1})}:${RX}])

... I get this syntax error:

[2016-08-08 14:53:35] WARNING[1653][C-]: ast_expr2.fl:470 
ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected 
'', expecting $end; Input:

"\"Example name\" ":".*<(.+)>"
   ^
(caret points at letter E)

Currently I am working around the issue by using REPLACE() to strip 
all double-quotes, but I believe this is not a correct solution. How 
should I write the $[ expression so that the double-quotes are handled 
correctly?





--
if at first you don't succeed, skydiving isn't for you


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

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


Re: [asterisk-users] Calls are dropped after 15 minutes

2016-07-30 Thread Eric Wieling
I've seen calls drop after 10 mins when SIP session timers are enabled.  
Try setting them to refuse in sip.conf.


On 07/30/2016 02:07 PM, Keith Heppner wrote:
We have a problem in that calls are dropped after 15 minutes (on both 
internal and out going calls, incoming calls do not seem to have that 
limit)  How do we fix it?


--
if at first you don't succeed, skydiving isn't for you


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

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


Re: [asterisk-users] Function SHELL not registered

2016-07-05 Thread Eric Wieling
Maybe Asterisk dialplan apps and functions don't work in the [globals] 
section.


On 07/05/2016 11:40 AM, John Kiniston wrote:
If you just need the name of the system it may be contained in the 
variable ${SYSTEMNAME}.


This is assuming you have the systemname set in asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Main+Configuration+File

That said, for SHELL support you probably need to set :

live_dangerously = yes

Also in your asterisk.conf

https://wiki.asterisk.org/wiki/display/AST/Privilege+Escalations+with+Dialplan+Functions


On Tue, Jul 5, 2016 at 7:27 AM, Michael Jepson > wrote:


Even weirder, when I check in asterisk, using "core show
functions", I can see the function SHELL right there.
From what I can find, the call is made from a conf. file, as grep
shows:

globals.conf: G_server=${SHELL(hostname)}

Is this even correct? The config files are from a much older
version of asterisk, which I am trying to update.

-Original Message-
From: asterisk-users-boun...@lists.digium.com

[mailto:asterisk-users-boun...@lists.digium.com
] On Behalf Of
Michael Jepson
Sent: dinsdag 5 juli 2016 16:07
To: Asterisk Users Mailing List - Non-Commercial Discussion
>
Subject: Re: [asterisk-users] Function SHELL not registered

I have rebuilt a new version, making sure func_shell was selected,
but I am still getting this error.

-Original Message-
From: asterisk-users-boun...@lists.digium.com

[mailto:asterisk-users-boun...@lists.digium.com
] On Behalf Of A J
Stiles
Sent: maandag 4 juli 2016 09:34
To: Asterisk Users Mailing List - Non-Commercial Discussion
>
Subject: Re: [asterisk-users] Function SHELL not registered

On Monday 04 Jul 2016, Michael Jepson wrote:
> Hi all,
>
> I am getting the following error when starting asterisk:
> pbx_functions.c: Function SHELL not registered
>
> Some of my conf files use a SHELL command, which used to work
with an
> older version of asterisk, but now with version 13.9.1 I see this
> warning in the error log. How can I register the SHELL function?
From
> what I can find in the wiki's, it should just be available?
>
> Best regards,
>
> Michael Jepson

Did you include func_shell in your Asterisk build?

Fortunately, it's no biggie to build a missing module, because the
"make"
command explicitly keeps track of everything it has already done
and does not need to do again.  Just cd into the folder with your
Asterisk source, run `make menuselect` and select "func_shell" 
(under dialplan functions).  Then run `make` and finally `make

install`.

--
AJS

Note:  Originating address only accepts e-mail from list!  If
replying off- list, change address to asterisk1list at earthshod
dot co dot uk .

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

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

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

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

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

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




--
A human being should be able to change a diaper, plan an invasion, 
butcher a hog, conn a ship, design a building, write a sonnet, balance 
accounts, build a wall, set a bone, comfort the dying, take orders, 
give orders, cooperate, act alone, solve equations, analyze a new 
problem, pitch manure, program a computer, cook a tasty meal, fight 
efficiently, die gallantly. Specialization is for insects.

---Heinlein




--
if at first you don't 

Re: [asterisk-users] Migrating asterisk 11 to 13: some callers get no ringback tone any more

2016-05-03 Thread Eric Wieling
I don't know the default setting for progressinband in the code, but it 
is documented in Asterisk 11's sip.conf.sample as defaulting to never.  
Maybe the docs were fixed since Asterisk 11.


from 11.21.x sip.conf.sample:

;progressinband=never   ; If we should generate in-band ringing 
always
; use 'never' to never use in-band 
signalling, even in cases
; where some buggy devices might not 
render it
; Valid values: yes, no, never Default: 
never



On 05/03/2016 02:52 PM, Joshua Colp wrote:

Whoops, email client auto-filled dev previously. Let's try this again.

Michael Maier wrote:



> Ok - but this doesn't seem to answer my main question:
>
> Why must
>
> progressinband=never
>
> be applied especially if asterisk uses it by default? The big 
difference

> between w/ and w/o it is:

The default in 13 is "no" which still allows early media through. That
option has a complicated past.

>
> w/o the option progrssinband=never just the sip-package
> 183 Session Progress
> is sent.

Yes, because it's doing inband progress using a media stream.

>
> w/ the option set, the additional sip-packages
> 100 Trying
> 180 Ringing
> 180 Ringing
> are sent.
>
> If progrssinband=never is the default, the Ringing package should be
> sent always, shouldn't it?

It's not the default.

>
> If I remove the option progrssinband=never via FreePBX, I can't find 
any

> other value provided to progrssinband in /etc/asterisk/*.
>
>
> Why does it work always correctly w/ the second trunk, which is
> connected directly to the extension?

FreePBX may not use inband progress for that scenario, causing it to
send out of band ringing instead.

>
> Is it possible to switch off the standard behavior of asterisk /
> progrssinband for ring groups only by setting some other options?

Asterisk does not have the concept of ring groups, this is a FreePBX
construct. Asterisk itself does allow the option to be set on an
individual basis for the entries in sip.conf.



--
if at first you don't succeed, skydiving isn't for you


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

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


Re: [asterisk-users] chanspy for group extension

2015-03-13 Thread Eric Wieling
Using Gosub / Return is well documented on voip-info.org, Asterisk The 
Definitive Guide, and many other places.  Rehashing it on the mailing list 
would not be helpful.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Salaheddine 
Elharit
Sent: Thursday, March 12, 2015 2:40 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] chanspy for group extension

thank you but could you please tell me how can i put it

thanks and regards

2015-03-12 18:19 GMT+00:00 Administrator TOOTAI 
ad...@tootai.netmailto:ad...@tootai.net:
Hi,

Le 12/03/2015 17:28, Salaheddine Elharit a écrit :
hello list,

i use the code below

[macro-chanspy]
exten = s,1,Authenticate(${ARG1})
exten = s,n,ChanSpy(SIP/${EXTEN:3},__dqs)

Here you have a problem: ${EXTEN} value is s

[...]

Daniel


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

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

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

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

Re: [asterisk-users] switching from SIP to Skype..or not

2015-03-12 Thread Eric Wieling
Which wideband codec did you use when testing SIP?

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ron Wheeler
Sent: Thursday, March 12, 2015 9:39 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] switching from SIP to Skype..or not

Your characterization may be true but Skype works much better than SIP 
when it comes to sound quality.

I have SIP softphone with Asterisk server and Skype on the same 
workstation.
Skype just works better over the same network.

Ron


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

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


Re: [asterisk-users] chanspy for group extension

2015-03-12 Thread Eric Wieling
This is one of the drawbacks to using macros.  There are workarounds for 
macros, but the correct solution is use the Gosub / Return dialplan applications

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Administrator 
TOOTAI
Sent: Thursday, March 12, 2015 2:19 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] chanspy for group extension

Hi,

Le 12/03/2015 17:28, Salaheddine Elharit a écrit :
 hello list,

 i use the code below

 [macro-chanspy]
 exten = s,1,Authenticate(${ARG1})
 exten = s,n,ChanSpy(SIP/${EXTEN:3},__dqs)

Here you have a problem: ${EXTEN} value is s

[...]

Daniel

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

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

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

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


Re: [asterisk-users] Caller ID Names

2015-03-11 Thread Eric Wieling
Are the phones exposed to the internet (even using NAT)?  If so there is a good 
chance these calls are not coming through your PBX but are coming in direct 
from someone, usually scammers.

Polycom has a config option to disable accepting calls from unknown devices.  
No idea if Cisco has something similar.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Todd R.
Sent: Wednesday, March 11, 2015 1:18 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Caller ID Names

To be sure you could setup a soft phone and see if the caller ID name comes in 
correctly.



On Mar 10, 2015, at 8:41 AM, Jordan Cook - Gyron Networks 
jordan.c...@gyron.netmailto:jordan.c...@gyron.net wrote:
Hi,

In my dialplan I have the following line.

same = n,Set(CALLERID(name)=Support)

I am expecting this to always set the caller id name to ‘Support’  - however, 
we are getting calls come in as “Anonymous” with the number as something like 
“unknown@unknown”

We’re using Cisco 7945 phones – I possibly wonder if they are displaying this 
rather than asterisk not changing it?

Anyone had similar experiences before?


This message may be private and confidential. If you have received this message 
in error, please notify us and remove it from your system.

Gyron may monitor email traffic data and the content of email for the purposes 
of security and staff training.

Gyron Internet Ltd is a limited company registered in England and Wales. 
Registered number: 4239332. Registered office: 3 Centro, Boundary Way, Hemel 
Hempstead, HP2 7SU. VAT reg no 804 2532 63. Gyron is a registered trademark.

Gyron is a Deloitte Technology Fast 50 ranked company.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Failsafe AGI using AEL

2015-03-04 Thread Eric Wieling

For the mailing list archive and for anyone else interested.

A few years ago we needed to automatically run a second AGI if the first AGI 
failed i.e. a failsafe setup.  Mainly because I'm not a very good programmer. 
8-|

The code below is very similar to what we use in production.  This code is also 
at http://pastebin.com/LBaLhdfJ for a while.  sm stands for Switch Manager 
(get your mind out of the gutter), the name of one of our internal Asterisk 
projects.  

/*

This script runs an AGI, if the AGI fails, a circuit breaker will trip.
The breaker causes this script to skip running the primary AGI on and only run 
the failsafe AGI until the max calls or max seconds.
Once max calls or max seconds elapse the breaker is reset on the next call and 
everything goes back to normal.

GLOBAL VARIABLES
SM_NODE: system hostname
SM_AGI_BREAKER_MAX_CALLS: reset breaker after this many calls
SM_AGI_BREAKER_MAX_ELAPSED: reset breaker after this many seconds
SM_AGI_BREAKER_NOTIFY: e-mail address list

*/

macro sm_agi(agi,agi_failsafe) {

// extract script name from primary agi for the global breaker variable name

Set(LOCAL(breaker)=sm_agi_breaker-${CUT(CUT(agi,/,${FIELDQTY(agi,/)}),^,1)});
Set(SM_AGI_STATUS=);

if (${GLOBAL(${breaker})} == tripped) {
// globally lock breaker variable to prevent race condition
if (${TRYLOCK(${breaker})}) {
Noop(AGI Breaker '${breaker}' is currently 'tripped'  Checking 
elapsed time and elapsed calls.);
if (${${breaker}_calls}  ${SM_AGI_BREAKER_MAX_CALLS} || 
${MATH(${STRFTIME(,,%s)}-${${breaker}_timestamp},int)}  
${SM_AGI_BREAKER_MAX_ELAPSED}) {
System(/bin/echo AGI breaker '${breaker}' reset on 
'${SM_NODE}' after '${MATH(${STRFTIME(,,%s)}-${${breaker}_timestamp},int)}' 
seconds and '${${breaker}_calls}' calls.  Normal call processing has resumed. 
| mail -s NOTICE: ${SM_NODE} AGI Breaker '${breaker}' Reset 
${SM_AGI_BREAKER_NOTIFY});

Set(ARRAY(GLOBAL(${breaker}),GLOBAL(${breaker}_calls),GLOBAL(${breaker}_elapsed))=,,,);
}
Set(undef=${UNLOCK(${breaker})});
}
}
if (${GLOBAL(${breaker})} != tripped) {

// run agi, replacing ^ with ,
AGI(${REPLACE(agi,^,\,)});

// the agi should set SM_AGI_STATUS to FAIL when it starts and set it 
to SUCCESS just before the AGI exits.   This is because if the AGI fails it 
won't be able to set the SM_AGI_STATUS variable.
if (${SM_AGI_STATUS} == SUCCESS) {  
return;
}
if (${SM_AGI_STATUS} != FAIL  ${AGISTATUS} == SUCCESS) {
Set(SM_AGI_STATUS=SUCCESS);
return;
}

// agi failed, trip the circuit breaker
if (${TRYLOCK(${breaker})}) {

Set(ARRAY(GLOBAL(${breaker}),GLOBAL(${breaker}_calls),GLOBAL(${breaker}_timestamp))=tripped,1,${STRFTIME(,,%s)});
Set(undef=${UNLOCK(${breaker})});
}

System(/bin/echo AGI '${agi}' failed on channel '${CHANNEL(name)}' 
with status '${AGISTATUS}' on '${SM_NODE}', tripping AGI breaker '${breaker}'.  
Failsafe mode enabled, AGI breaker will reset after 
'${SM_AGI_BREAKER_MAX_ELAPSED}' seconds or '${SM_AGI_BREAKER_MAX_CALLS}' calls 
| mail -s ERROR: ${SM_NODE} AGI Breaker '${breaker}' Tripped 
${SM_AGI_BREAKER_NOTIFY});

Playback(custom/sm_agi_fail);

}

// try using the failsafe
AGI(${REPLACE(agi_failsafe,^,\,)});
if (${AGISTATUS} == SUCCESS) {
if (${LOCK(${breaker})}) {

Set(ARRAY(GLOBAL(${breaker}_calls),SM_AGI_STATUS)=${MATH(${${breaker}_calls}+1,int)},SUCCESS);
Set(undef=${UNLOCK(${breaker})});
}
return;
}

System(/bin/echo Backup AGI '${agi_failsafe}' failed with status 
'${AGISTATUS}' on '${SM_NODE}'.  This is a critical emergency.  All calls on 
this node are failing.  Drop whatever you are doing and deal with it. | mail 
-s PANIC: ${SM_NODE} AGI FAILED ${SM_AGI_BREAKER_NOTIFY});

// both agi and failsafe agi failed. reset the agi breaker for the next 
call and hope for the best.

Set(ARRAY(GLOBAL(${breaker}),GLOBAL(${breaker}_calls),GLOBAL(${breaker}_timestamp))=,,,);

return;

}

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

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


Re: [asterisk-users] Res_fax - FAXOPT(faxdetect)

2015-02-18 Thread Eric Wieling

I solved the issue by not answering the call as I assume others have done.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Administrator 
TOOTAI
Sent: Wednesday, February 18, 2015 12:50 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Res_fax - FAXOPT(faxdetect)


Hello


Le 17/02/2015 17:00, Administrator TOOTAI a écrit :
 Hi,

 as stated in the documentation, it's allowed to set
 FAXOPT(faxdetect)=yes/no to allow fax detection.

 It's done (see below) but still fax detection :-( Extension 300 is
 hylafax with iaxmodem.

 On the upper Asterisk gw it's the same, despite the faxdetect set to no
 we also have the NOTICE of T.38 re-INVITE. Test is done with a mobile
 phone calling the 0123456789 PSTN number.

  -- Executing [0123456789@from-internal:1]
 Set(SIP/TOOTAi-8262, FAXOPT(faxdetect)=no) in new stack
  -- Executing [0123456789@from-internal:2]
 Macro(SIP/TOOTAi-8262, Fax) in new stack
  -- Executing [s@macro-Fax:1] Dial(SIP/TOOTAi-8262,
 IAX2/300,,) in new stack
  -- Called IAX2/300
  -- Call accepted by 127.0.0.1 (format alaw)
  -- Format for call is (alaw)
  -- IAX2/300-7211 is ringing
  -- IAX2/300-7211 answered SIP/TOOTAiAudio-8262
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
 [2015-02-17 16:52:51] NOTICE[3467][C-1d5b]: chan_sip.c:10645
 process_sdp: T.38 re-INVITE detected but no fax extension
 [2015-02-17 16:52:56] WARNING[3467][C-1d5b]: chan_sip.c:9868
 process_sdp: Insufficient information for SDP (m= not found)
  -- Executing [h@from-internal:1] Hangup(SIP/TOOTAi-8262, )
 in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on
 'SIP/TOOTAi-8262'
  -- Hungup 'IAX2/300-7211'

 Thanks for your support


No one have an idea on this ?

-- 
Daniel

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

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

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

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


Re: [asterisk-users] Debugging some DTMF Weirdness.

2015-02-14 Thread Eric Wieling

Is it possible your transmit or receive gain is too high and Asterisk is 
detecting the echo of a DTMF as a new digit cause by an analog leg of the call 
somewhere?


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of John Kiniston
Sent: Thursday, February 12, 2015 8:01 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Debugging some DTMF Weirdness.

I'm attempting to find where my extra long DTMF  Tones are coming from.

I'm dialing from my sip handset through my proxy to my Asterisk box which is my 
PSTN Gateway.
I'm pressing 4 to select a menu and everything is fine.

[Feb 12 16:58:18] DTMF[29762] channel.c: DTMF begin '4' received on 
SIP/trunk-0a02dee0
[Feb 12 16:58:18] DTMF[29762] channel.c: DTMF begin passthrough '4' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:18] DTMF[29762] channel.c: DTMF end '4' received on 
SIP/trunk-0a02dee0, duration 150 ms
[Feb 12 16:58:18] DTMF[29762] channel.c: DTMF end accepted with begin '4' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:18] DTMF[29762] channel.c: DTMF end passthrough '4' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:19] DTMF[29760] channel.c: DTMF begin '4' received on 
SIP/trunk-0a03aaa0
[Feb 12 16:58:19] DTMF[29760] channel.c: DTMF begin passthrough '4' on 
SIP/trunk-0a03aaa0
[Feb 12 16:58:19] DTMF[29760] channel.c: DTMF end '4' received on 
SIP/trunk-0a03aaa0, duration 170 ms
[Feb 12 16:58:19] DTMF[29760] channel.c: DTMF end accepted with begin '4' on 
SIP/trunk-0a03aaa0
[Feb 12 16:58:19] DTMF[29760] channel.c: DTMF end passthrough '4' on 
SIP/trunk-0a03aaa0
I'm, pressing 9 to select an option and I hear an extra long DTMF burst from my 
handset.

[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF begin '9' received on 
SIP/trunk-0a02dee0
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF begin passthrough '9' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF begin '9' received on Zap/59-1
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF begin passthrough '9' on Zap/59-1
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end '9' received on 
SIP/trunk-0a02dee0, duration 1700 ms
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end accepted with begin '9' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end passthrough '9' on 
SIP/trunk-0a02dee0
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end '9' received on Zap/59-1, 
duration 32 ms
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end accepted with begin '9' on 
Zap/59-1
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end '9' has duration 32 but want 
minimum 80, emulating on Zap/59-1
[Feb 12 16:58:20] DTMF[29762] channel.c: DTMF end emulation of '9' queued on 
Zap/59-1
Can someone explain the received passthrough parts of my output here?
If I send my call out through a different Asterisk box I have my calls are 
working fine, Looking at the two boxes I have the same version of asterisk but 
the machine with the extra long DTMF is using hardware DTMF decoding where the 
working machine is using software only.
--
A human being should be able to change a diaper, plan an invasion, butcher a 
hog, conn a ship, design a building, write a sonnet, balance accounts, build a 
wall, set a bone, comfort the dying, take orders, give orders, cooperate, act 
alone, solve equations, analyze a new problem, pitch manure, program a 
computer, cook a tasty meal, fight efficiently, die gallantly. Specialization 
is for insects.
---Heinlein
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Investigating international calls fraud

2015-01-28 Thread Eric Wieling
I’ve seen the following exploits of Asterisk / FreePBX boxes:


1)  Default PlcmSpIp username and password for Polycom provisioning

2)  Insecure SIP usernames and secrets

3)  FreePBX GUI accessable from the internet

4)  OS remote exploit (maybe ssh/ssl exploit)

Mitigation options:

1)  Don’t use an easy to guess or default password on provisioning servers.

2)  Use secure secrets.  Users never enter the secret so we use a 32 char 
random string of characters for the password

3)  Don’t allow connections to port 80 from off-site.

4)  Make sure your OS and SSH/SSL is updated packages are updated.

Contact your carrier and ask about any possible fraud detection.Verizon SIP 
service has that feature.   I don’t think Level 3 has.   Don’t know about 
CenturyLink.   I also recommend locking down the system very tight with IP 
tables – only allow whitelisted traffic rather than only blocking blacklisted 
traffic.

Fraud is a constant issue for everyone.


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steven McCann
Sent: Wednesday, January 28, 2015 4:03 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] Investigating international calls fraud

Hello,

I'm investigating a situation where there was a hundreds of minutes of calls 
from an internal SIP extension to an 855 number in Cambodia, resulting in a 
crazy ($25,000+) bill from the phone company. I'm investigating, but can anyone 
provide some feedback on what's happened here? I'm investigating how this 
happened as well as what types of arrangements can be made with the phone 
company (CenturyLink in Texas).

Some details:
* PBX is located in Texas
* Phone carrier is CenturyLink
* FreePBX distro running asterisk 1.8.14
* source SIP extension is Mitel 5212, firmware 08.00.00.04, default admin 
password (argh!). Phone is used by many different people.

More PBX setting details:
* inbound SIP traffic is not allowed through the firewall
* internal network is not accessed by many
* FreePBX web interface

Questions I have at this moment:
1) how were the calls placed? Was the Mitel SIP phone hacked somehow? Asterisk 
PBX?
2) how does this typically get sorted out with the phone company? they are 
charging $6.25 per minute for the Texas to Cambodia calls. The phone system 
owners are at fault, but how have these situations worked out in the past?

I'll be tightening things up, but any feedback is appreciated.

Thanks,
Steve

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

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

Re: [asterisk-users] sip show channelstats reliable?

2015-01-19 Thread Eric Wieling
I've seen something similar with Adtran SIP gateways.When a re-invite 
happens the Adtran gets all confused about call stats and marks the 
pre-reinvite leg of the call as losing large numbers of packets.BTW, IIRC 
reinvites happen when a codec changes or the channel switches to T.38.

Also Adtran SIP gateways appear not to support OPTIONS packets when running in 
SIP proxy mode, which is very annoying. At some point I'll try and arrange 
a slugfest between Digium and Adtran and they can figure out why it doesn't 
work.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Todd R.
Sent: Monday, January 19, 2015 1:45 PM
To: Asterisk-Users List
Subject: Re: [asterisk-users] sip show channelstats reliable?

Additional info:

At the moment I am running 1.8.x but the other day I was getting the same 
results on 11.x

Here is a sample from show channelstats. I do think this command is showing 
that there is trouble between specific IP's and my Asterisk box but I don't 
know if the numbers are accurate and reliable.

Peer

Call ID

Duration

Recv: Pack

Lost

( %)

Jitter

Send: Pack

Lost

(

%)

Jitter

x.x.x.x

5531341d06b

00:07:42

023123

063836

(73.41%)

0.

023102

00

(

0.00%)

0.0007


Peer IP changed to protect the innocent :-)


From: tjrl...@live.commailto:tjrl...@live.com
To: asterisk-users@lists.digium.commailto:asterisk-users@lists.digium.com
Date: Mon, 19 Jan 2015 12:17:25 -0600
Subject: [asterisk-users] sip show channelstats reliable?
I am seeing lots of lost packets when running the command sip show channelstats 
at the CLI.

There are issues across multiple Asterisk servers I am trying to diagnose but 
everything I read seems to point to this command being pretty unreliable.

Can I trust the info this command shows?

I am showing lots of lost packets in sip show channelstats but I can't see any 
packet loss when pinging the same IP's to/from.

Since I don't 100% control the network my gear is on, I need something outside 
of Asterisk to show the network engineer to convince here and myself that there 
are network issues.

All I have is the loss that's shown from this command with no real network 
stats to back it up.

Is there a magic command in CentOS anyone can recommend to diagnose and match 
up the issues shown in Asterisk using this command?

Moving gear around on the network changes the info Asterisk shows a LOT. For 
example, if I point traffic to the main physical gateway I get loss to a 
particular customer's IP (their PBX), if I move it to another place on the 
network (as a VM) their IP is good and other customers IP's start showing loss 
using the channelstats info.

Driving me freakin' crazy. It does appear there are network issues causing my 
troubles but I can't get help if I can't point to some hard and fast issues 
outside of Asterisk.

The only thing I have right now is collissions showing on one of a few of our 
pfSense devices but they are virtual running on XenServer, still this would 
indicate a problem in my opinion.

Thanks in advance for any assistance on this issue. Stepping back from the 
ledge now LOL



-- _ -- 
Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
Asterisk? Join us for a live introductory webinar every Thurs: 
http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or 
update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Passing literals with commas to subroutine [SOLVED]

2014-12-11 Thread Eric Wieling
The easiest way is to escape the commas is with a \ (backslash). 

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of A J Stiles
Sent: Thursday, December 11, 2014 7:41 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Passing literals with commas to subroutine 
[SOLVED]

On Tuesday 09 Dec 2014, Daniel Gonzalez wrote:
 Hi,
 
 Let's say I do:
 
 Set(data=xxx,yyy)
 Gosub(my-sub,s,1(${data}))
 
 My subroutine will only receive xxx for ARG1. How can I pass a literal
 with a comma to a single argument in a subroutine?
 
 (The point is: when calling the subroutine I do not know if the variable
 has a comma or not.)

O.K.  I've managed to set myself up a temporary Asterisk box, so I was able to 
do some testing without risking bringing down a production server  :)  And I 
have managed to put together a solution, if you can call it that.

If you put speech marks around the argument, like so:
 Gosub(my-sub,s,1(${data}))
then what actually comes through in ${ARG1} is
 xxx,yyy
(complete with the speech marks).  But at least that comma is protected.  So 
then within my-sub, you just need to evaluate ${ARG1:1:-1}, ${ARG2:1:-1} c. 
to strip off the first and last characters  (skip one, show all but one).  


It's a bit ugly -- but so is a lot of stuff written in the Dialplan.  Just 
because a language is Turing-complete, doesn't mean any code written in it is 
going to be pretty.  But you might be able to mitigate some of the ugliness 
with comments  (introduced with a semicolon in Dialplan, because the comment 
mark is a valid digit).

-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

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

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


Re: [asterisk-users] Finish extension (avoid dialplan to silently continue in the next priority of another extension)

2014-12-11 Thread Eric Wieling
Hangup handling in Asterisk is horrible enough to make the Buddha cry.

The (mostly working) solution I came up with was

1)  Attach a hangup handler to the source channel as soon as possible in 
the dialplan to do whatever post call work which needs to be done.

2)  Use the “g” and “F” options to Dial to play any needed intercept 
messages required after one leg of the call hangs up.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Daniel Gonzalez
Sent: Thursday, December 11, 2014 10:58 AM
To: Asterisk Users Mailing List
Subject: [asterisk-users] Finish extension (avoid dialplan to silently continue 
in the next priority of another extension)


Hi,

I have run into a strange behaviour:

[ctx-test]



exten = h,1,NoOp(*** hangup ***)



exten = s,1,NoOp(*** ${EXTEN} ***)

 same = n,...

 same = n,...

 same = n,Hangup()

Strangely, the h extension continues on the priority 2 of the extension s. 
Maybe this is caused by the use of same? How can I make sure that an extension 
is really ending, something like:

exten = h,1,NoOp(*** hangup ***)

 same = n,RellyEndHere()

For subroutines there is the Return() application, but this can not be used 
generally in contexts. Is there any application to finish processing the 
extension in the context?



Thanks,

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

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

[asterisk-users] Weird SIP stuff

2014-12-04 Thread Eric Wieling

We are seeing something weird we haven't come across before. It seems they are 
sending us a different IP in the SIP from URI, than the IP they are actually 
sending us the traffic from.

Basically, the traffic is coming from 65.211.180.237 but the header is:

f: 
sip:+1347545xxx@199.173.94.80:5060;user=phone;tag=4-45026-159e4a6-995949f-159e4a6


Does anyone know if this is normal and how I might make it work with Asterisk.  
 Incoming calls are not matching the we auth on IP only

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

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


Re: [asterisk-users] SIP call drops after 32 seconds, but only when....

2014-11-22 Thread Eric Wieling
Try setting directmedia=no in sip.conf.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Yves A.
Sent: Saturday, November 22, 2014 8:06 AM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] SIP call drops after 32 seconds, but only when

Am 22.11.2014 um 12:51 schrieb Andreas Sikkema:
 but as soon as I configure another sip registration on another server,
 outgoing
 calls  drop after 32 seconds.
 Are both your servers behind the same NAT router?

thanks for taking part...

I don´t know...
one is

siptrunk.ovh.net

and the other one is

sip.ovh.fr

how can i determine and how could that affect... I mean... why do they 
interfere at all?

thanks,
yves

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
http://www.avast.com


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

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

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

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


Re: [asterisk-users] Upgraded to 13 and now Mailbox is empty in sip show peers

2014-11-20 Thread Eric Wieling
I doubt the person cares, if you don't like people top posting then stop 
reading their messages.  If someone top posts, nothing you do will make them 
stop top posting.   Complaining about something you cannot change just wastes 
everyone's time.I have a rule which deletes messages with top post in 
them so I don't usually see these silly messages.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of A J Stiles
Sent: Thursday, November 20, 2014 11:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Upgraded to 13 and now Mailbox is empty in sip 
show peers

**  THIS IS NOT WHERE YOUR REPLY BELONGS  **

Which part of THIS IS NOT WHERE YOUR REPLY BELONGS do you not understand?


-- 
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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

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

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


Re: [asterisk-users] AGI and AMI in PHP -- What's current?

2014-11-18 Thread Eric Wieling
Other than a few minor patches, we use stock phpagi.  If you want simple, 
phpagi is the way to go.   

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Edwards
Sent: Tuesday, November 18, 2014 3:34 PM
To: Asterisk Users Mailing List
Subject: [asterisk-users] AGI and AMI in PHP -- What's current?

I'm writing some code that needs to access AMI in PHP. (I'll probably be 
doing AGI later as well.)

I'm looking at phpagi (2.20), but it hasn't been updated since 2010 and 
appears to be a bit behind current Asterisk -- No event handler for event 
'fullybooted'.

What PHP framework/library are you using -- and why?

-- 
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000

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

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

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

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


Re: [asterisk-users] PBX hacked: why hundred of calls to the same number ?

2014-10-03 Thread Eric Wieling
We set up our servers to allowguest=yes and autocreatepeer=yes and use a global 
context setting to point any of those calls to an IVR jail.Attempts stop 
reasonably quickly.

An empty room with an unlocked door is far less interesting than a room 
with the door locked.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Rainer Piper
Sent: Friday, October 03, 2014 1:53 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] PBX hacked: why hundred of calls to the same 
number ?

the attacking server changed the destination Number  at 18:53  CEST  and he is 
still blocked ... LOL


972597438354callto:00972597438354



Oct  3 18:53:17 server /sbin/kamailio[3977]: NOTICE: script: blocking IP 
62.210.149.136 sipcli/v1.8 rm=INVITE aU=null 
rU=00972597438354callto:00972597438354

Oct  3 19:06:37 server /sbin/kamailio[3978]: NOTICE: script: blocking IP 
62.210.149.136 sipcli/v1.8 rm=INVITE aU=null rU=000972597438354

Oct  3 19:19:45 server /sbin/kamailio[3977]: NOTICE: script: blocking IP 
62.210.149.136 sipcli/v1.8 rm=INVITE aU=null rU=972597438354

Oct  3 19:32:59 server /sbin/kamailio[3978]: NOTICE: script: blocking IP 
62.210.149.136 sipcli/v1.8 rm=INVITE aU=null rU=*000972597438354

Oct  3 19:46:20 server /sbin/kamailio[3977]: NOTICE: script: blocking IP 
62.210.149.136 sipcli/v1.8 rm=INVITE aU=null rU=100972597438354



Am 03.10.2014 um 14:52 schrieb Rainer Piper:
Am 02.10.2014 um 15:40 schrieb Tzafrir Cohen:

On Thu, Oct 02, 2014 at 07:52:34AM +0200, Rainer Piper wrote:



Is the destination Number like Country Code +972?



+972 59 xx(x) mobile - Jawall [moving to 7-digit subscriber numbers]



source - http://www.wtng.info/wtng-972-il.html

That page is slightly dated. +972 59 XXX are all the numbers in the

Palestinian Authority (there are several providers besides Jawall).



My SIP Proxy logs all the unauth. INVITEs and I found the a lot

calls go to the Country code +972 xxx

As a resident of +972 (+972-4), I'll just note that those hack attempts

are typically related to PA numbers (+972-59) as rates there are higher.


Hi Tzafrir,

ok, the page www.wtng.infohttp://www.wtng.info is not really up to date.

here some logs to see the variations of the attempt  to dial over my proxy



Oct  3 11:23:06 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null 
rU=00972592910519callto:00972592910519

Oct  3 11:42:52 server /sbin/kamailio[7218]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=972592910519

Oct  3 11:53:15 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=700972592910519

Oct  3 12:06:32 server /sbin/kamailio[7218]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=200972592910519

Oct  3 12:20:04 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null 
rU=#00972592910519callto:00972592910519

Oct  3 12:32:53 server /sbin/kamailio[7218]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=*000972592910519

Oct  3 12:45:35 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=*972592910519

Oct  3 12:57:42 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=900972592910519

Oct  3 13:09:37 server /sbin/kamailio[7218]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=7700972592910519

Oct  3 13:21:24 server /sbin/kamailio[7217]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=66600972592910519

Oct  3 13:33:11 server /sbin/kamailio[7218]: NOTICE: script: blocking IP 
69.30.254.234 sipcli/v1.8 rm=INVITE aU=null rU=00972592910519
and the source IP

69.30.254.234
is coming from


OrgName:WholeSale Internet, Inc.

OrgId:  WHOLE-125

Address:324 E. 11th St.

Address:Suite 1000

City:   Kansas City

StateProv:  MO

PostalCode: 64106

Country:US
very strange ;-)

--
Rainer Piper
Integration engineer
Koeslinstr. 56
53123 BONN
GERMANY
Phone: +49 228 97167161callto:004922897167161
P2P: sip:rai...@sip.soho-piper.de:5072 (pjsip-test)
XMPP: rai...@xmpp.soho-piper.demailto:rai...@xmpp.soho-piper.de



--
Rainer Piper
Integration engineer
Koeslinstr. 56
53123 BONN
GERMANY
Phone: +49 228 97167161
P2P: sip:rai...@sip.soho-piper.de:5072 (pjsip-test)
XMPP: rai...@xmpp.soho-piper.demailto:rai...@xmpp.soho-piper.de
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   

Re: [asterisk-users] Lost audio on forwarded calls

2014-10-03 Thread Eric Wieling
Any chance this is a simple directmedia and/or NAT issue?

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Steve Totaro
Sent: Friday, October 03, 2014 4:14 PM
To: tjrl...@live.com; Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Lost audio on forwarded calls

Asterisk does not need to care.  Is it SIP all the way through?
Thanks,
Steve T

On Fri, Oct 3, 2014 at 3:12 PM, Todd R. 
tjrl...@live.commailto:tjrl...@live.com wrote:
OK, been messing with Asterisk for a long time and I have my opinion on where 
the issues lies but sometimes it's just nice to see what others think that can 
relate :-)

Here goes..

Inbound calls flow like this:
Tier 1 Provider (SIP)  Asterisk 1.8  Name Brand PBX - Calls work fine

Outbound calls flow like this:
Name Brand PBX  Asterisk 1.8  Tier 1 provider (SIP) - Calls work fine


Problem is being reported on that many (not all) calls have no audio when they 
are forwarded.

Example of forwarded call:
Inbound call comes in from Tier 1 Provider  Asterisk 1.8  Name Brand PBX

Name Brand PBX then forwards the call back out to users cell phone:
Name Brand PBX  Asterisk 1.8  Tier 1 provider

No audio a large percentage of the time.


It's my opinion that the Asterisk box only sees the forwarded call as a regular 
outbound call and forwards it on to the Tier 1 provider then to the users cell 
phone.

I don't see how Asterisk even knows or cares if it was forwarded within the 
Name Brand PBX. The Name Brand PBX is the one making the connection of the 
inbound and outbound call. All other inbound and outbound calls are fine, audio 
is only lost when the Name Brand PBX connects the two calls and creates the 
forward.

Thoughts?

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

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

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

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

Re: [asterisk-users] Asterisk removes ice lines in sdp when calling between webrtc clients

2014-10-02 Thread Eric Wieling
Asterisk is not a SIP Proxy.   It is a B2BUA and will *always* replace the SDP 
with its own.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Olli Heiskanen
Sent: Thursday, October 02, 2014 9:06 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk removes ice lines in sdp when calling 
between webrtc clients


Hi,

Is there anything I can do with this problem? Re-installing Asterisk does not 
solve this and the problem still persists. Or is there any other logs or 
configurations I can provide to help figure out why Asterisk is removing lines 
from the sdp?

Any ideas would be greatly appreciated! I also tried removing everything under 
/etc/asterisk/ and make samples to restore any errors I could have had in my 
configurations, then restoring my minimal configuration: asterisk.conf, 
extconfig.conf, extensions.conf, res_mysql.conf and sip.conf. This did not help.

(in case this message comes double, I just canceled posting of previous similar 
one as it was too big)

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

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

Re: [asterisk-users] how to strip +1 out of incoming number

2014-10-02 Thread Eric Wieling
I prefer using FILTER() so if somehow CallerID arrived with something nasty it 
will be filtered out.


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of John Kiniston
Sent: Thursday, October 02, 2014 2:09 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] how to strip +1 out of incoming number

Try the Filter function

Set(cid=${FILTER(0123456789,${CALLERID(NUM)})})

On Thu, Oct 2, 2014 at 10:52 AM, motty cruz 
motty.c...@gmail.commailto:motty.c...@gmail.com wrote:
Hello, our VoIP send us caller ID +1(area)(number) for instance +16024224334 is 
there a way to strip +1 out of caller ID?

--
Thanks for your support,
Motty

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

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



--
A human being should be able to change a diaper, plan an invasion, butcher a 
hog, conn a ship, design a building, write a sonnet, balance accounts, build a 
wall, set a bone, comfort the dying, take orders, give orders, cooperate, act 
alone, solve equations, analyze a new problem, pitch manure, program a 
computer, cook a tasty meal, fight efficiently, die gallantly. Specialization 
is for insects.
---Heinlein
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Change codec when dial from SIP to DAHDI

2014-09-25 Thread Eric Wieling
You will find not transcoding much less useful that one might imagine. 


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of d tbsky
Sent: Thursday, September 25, 2014 2:57 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Change codec when dial from SIP to DAHDI

2014-09-25 20:46 GMT+08:00 Matthew Jordan mjor...@digium.com:
 https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite

 That article is in the development section of the wiki. While that
 doesn't mean any of the information there is necessarily wrong, its
 purpose was to coordinate development efforts, not to define behavior
 for end-users.

 In this particular case, portions of that page only affect chan_pjsip:

   thanks a lot for the hint! you really save my day!
   I was thinking about studying freeswitch, since people said
freeswitch can do that without transcode. now i will spent my time to
study chan_pjsip, and hope it can fix the problem. i really want to
stay with asterisk :)

   thanks again for your kindly help!!

Regards,
tbskyd

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

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

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

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


Re: [asterisk-users] read digits from the user through php agi script

2014-09-23 Thread Eric Wieling
I’m not going to help you debug your code, but I wanted to post part of a 
function from one of our internal AGIs which reads auth codes using a simple 
IVR.  The code is ugly but it might be helpful to you.   This code is released 
to the public domain.

// no pin provided, get pin from caller
$agi-answer();
usleep(25);

$try = 1;
$bad_pass = FALSE;
$auth_start_time = microtime(TRUE);
while ($try  4) {
if ($try == 1) {
$agi-exec(Read, pin,/igc/sounds/cc-bong,$pinset_len,,1,3);
} else {
if ($pinset_len == 0) {
$agi-exec(Read, 
pin,please-enter-youraccess-code/igc/sounds/cc-bong,,,1,5);
} else {
$agi-exec(Read, 
pin,please-enter-yourdigits/$pinset_lendigitaccess-code/igc/sounds/cc-bong,$pinset_len,,1,5);
}
}
$temp = $agi-get_variable(pin);
$pin = trim($temp[data]);

if ($pinset_verify == 1  $pin != ) {
$temp = array_search($pin, $pins);
if ($temp !== FALSE) {
$agi-set_variable(SM_START, $sm_start + (microtime(TRUE) - 
$auth_start_time));
$agi-exec(CELGenUserEvent, \SM,status = OK, cause =000, 
detail = Verified PIN, pin = $pin\);
return array(status = OK, cause =000, detail = 
Verified PIN, pin = $pin);
}
} else if ($pinset_verify != 1  $pin != ) {
$agi-set_variable(SM_START, $sm_start + (microtime(TRUE) - 
$auth_start_time));
$agi-exec(CELGenUserEvent, \SM,status = OK, cause =000, 
detail = Unverified PIN, pin = $pin\);
return array(status = OK, cause =000, detail = 
Unverified PIN, pin = $pin);
}

if ($try != 1) {
$agi-exec(Playback, badaccess-code);
}
$try++;
}

$agi-set_variable(SM_START, $sm_start + (microtime(TRUE) - 
$auth_start_time));
$agi-exec(CELGenUserEvent, \SM,status = ERROR, cause =851, detail = 
Verified PIN, pin = $pin\);
return array(status = ERROR, cause =851, detail = Verified 
PIN, pin = $pin);

}


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Brahim Abidar
Sent: Tuesday, September 23, 2014 1:26 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] read digits from the user through php agi script

hi everyone,
actually i want to release an IVR system using PHPAGI API , in this IVR i want 
to get value from the user.
I already used get_data defined in phpagi but they are not able to get the 
value given by the user and store it in a php variable.
i tested this :
$result = $agi-get_data('beep', 3000, 20);
$keys = $result['result'];

but every time i found in $keys variable 0.

please any help or suggestions
thank you for spending your valuable time for me.

--

Élève Ingénieur INE3 à l'Institut National des Postes et Télécommunications  
INPT - Rabat - Maroc

Responsable de la cellule Asterisk au Club Electronique et Systemes Embarqués 
de l'INPT
Membre du projet  ilearn, SIFE INPT

 Tel : +212642398782
   Skype  : abidarbrahim

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

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

Re: [asterisk-users] Asterisk prefix code to dial a high fraud country - security mechanism

2014-09-18 Thread Eric Wieling
Your question demonstrates a fundamental lack of Asterisk concepts and 
knowledge.  You should start by reading http://www.asteriskdocs.org/ and go 
from there.Asterisk is not something you can learn in a few days.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 4:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

Thank you Julian,

would it be possible to block calls to international calls except certain 
countries? I just want to make sure that if attackers try to place calls 
outside the states they not succeed.

Thanks,
Motty

On Thu, Sep 18, 2014 at 12:55 PM, Julian Beach 
jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk wrote:
Hello motty,

Thursday, September 18, 2014, 6:35:40 PM, you wrote:

 Hello, I would to allow users to place calls overseas such as India
 and Malaysia but only with a security code. if they don't have a
 security code I want to be able to drop the calls.

I use this

exten = _0041,1,Log(NOTICE,Pin Code for Switzerland calls)
same = n,Playback(silence/1)
same = n,Authenticate(9084,,4)
same = n,Macro(outgoingTrunk,${EXTEN})
same = n,Hangup()

It  uses  a  fixed PIN number which calls a macro which deals with the
actual  dialling,  but  a  standard  Dial command would work here too.
Quick  and  easy, but there are lots of options. If the correct PIN is
not entered, the call is not made.

--
Best regards,
 Julian
mailto:jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk


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

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

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

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

Re: [asterisk-users] Asterisk prefix code to dial a high fraud country - security mechanism

2014-09-18 Thread Eric Wieling
It is unfortunate 
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html#asterisk-DP-Basics-SECT-3.6
 is not helpful to you.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 5:27 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

Thanks Eric, for respectfully pointing that link, it is the reason why I am 
posting my question for lack of knowledge. I had been working on Asterisk for 
the last 4 years, I am always learning something knew.

- Motty

On Thu, Sep 18, 2014 at 2:15 PM, Eric Wieling 
ewiel...@nyigc.commailto:ewiel...@nyigc.com wrote:
Your question demonstrates a fundamental lack of Asterisk concepts and 
knowledge.  You should start by reading http://www.asteriskdocs.org/ and go 
from there.Asterisk is not something you can learn in a few days.

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 4:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

Thank you Julian,

would it be possible to block calls to international calls except certain 
countries? I just want to make sure that if attackers try to place calls 
outside the states they not succeed.

Thanks,
Motty

On Thu, Sep 18, 2014 at 12:55 PM, Julian Beach 
jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk wrote:
Hello motty,

Thursday, September 18, 2014, 6:35:40 PM, you wrote:

 Hello, I would to allow users to place calls overseas such as India
 and Malaysia but only with a security code. if they don't have a
 security code I want to be able to drop the calls.

I use this

exten = _0041,1,Log(NOTICE,Pin Code for Switzerland calls)
same = n,Playback(silence/1)
same = n,Authenticate(9084,,4)
same = n,Macro(outgoingTrunk,${EXTEN})
same = n,Hangup()

It  uses  a  fixed PIN number which calls a macro which deals with the
actual  dialling,  but  a  standard  Dial command would work here too.
Quick  and  easy, but there are lots of options. If the correct PIN is
not entered, the call is not made.

--
Best regards,
 Julian
mailto:jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk


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

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


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

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

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

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

Re: [asterisk-users] Asterisk prefix code to dial a high fraud country - security mechanism

2014-09-18 Thread Eric Wieling

My apologies, I misunderstood.  I’m glad the link was helpful.


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 5:44 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

absolutely not what I meant, I really meant to say thank you for respectfully 
pointing that out.


-Motty

On Thu, Sep 18, 2014 at 2:32 PM, Eric Wieling 
ewiel...@nyigc.commailto:ewiel...@nyigc.com wrote:
It is unfortunate 
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html#asterisk-DP-Basics-SECT-3.6
 is not helpful to you.

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 5:27 PM

To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

Thanks Eric, for respectfully pointing that link, it is the reason why I am 
posting my question for lack of knowledge. I had been working on Asterisk for 
the last 4 years, I am always learning something knew.

- Motty

On Thu, Sep 18, 2014 at 2:15 PM, Eric Wieling 
ewiel...@nyigc.commailto:ewiel...@nyigc.com wrote:
Your question demonstrates a fundamental lack of Asterisk concepts and 
knowledge.  You should start by reading http://www.asteriskdocs.org/ and go 
from there.Asterisk is not something you can learn in a few days.

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 
[mailto:asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com]
 On Behalf Of motty cruz
Sent: Thursday, September 18, 2014 4:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk prefix code to dial a high fraud country 
- security mechanism

Thank you Julian,

would it be possible to block calls to international calls except certain 
countries? I just want to make sure that if attackers try to place calls 
outside the states they not succeed.

Thanks,
Motty

On Thu, Sep 18, 2014 at 12:55 PM, Julian Beach 
jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk wrote:
Hello motty,

Thursday, September 18, 2014, 6:35:40 PM, you wrote:

 Hello, I would to allow users to place calls overseas such as India
 and Malaysia but only with a security code. if they don't have a
 security code I want to be able to drop the calls.

I use this

exten = _0041,1,Log(NOTICE,Pin Code for Switzerland calls)
same = n,Playback(silence/1)
same = n,Authenticate(9084,,4)
same = n,Macro(outgoingTrunk,${EXTEN})
same = n,Hangup()

It  uses  a  fixed PIN number which calls a macro which deals with the
actual  dialling,  but  a  standard  Dial command would work here too.
Quick  and  easy, but there are lots of options. If the correct PIN is
not entered, the call is not made.

--
Best regards,
 Julian
mailto:jb_s...@trink.co.ukmailto:jb_s...@trink.co.uk


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

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


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

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


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

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

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

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

Re: [asterisk-users] Asterisk 11.9.0 PRI no ring indications

2014-09-18 Thread Eric Wieling
Ringback problems are a pain in the neck to troubleshoot.   You don't mention 
your endpoint, but if the endpoint is sip, play around with the prematuremedia 
and progressinband options in sip.conf.The comments for these two settings 
in sip.conf.sample are completely and totally confuzing.  Try different 
compications and see if any of them make any difference.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Doug Lytle
Sent: Thursday, September 18, 2014 7:42 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk 11.9.0 PRI no ring indications

Doug Lytle wrote:
 I'm also planning, after hours, to move back to 11.12.0 with a make config 
 and start again.  Maybe moving back to 11.9 wasn't a good idea.

Well that didn't work.

Even started with a fresh set of configuration files.  A basic 
chan_dahdi.conf and a basic dahdi system.conf.

Audio passes fine, I can even specify a default music on hold to play 
during the dial (Thinking of playing a ringing sound).  I'm just not 
getting any ringing.

Is it possible the card is bad?

It's a Digium, Inc. Wildcard TE220 dual-span T1/E1/J1 card 3.3V 
(PCI-Express) (5th gen) (rev 02)

Doug

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

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

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

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


Re: [asterisk-users] Asterisk- VoIP Phones ring from Ext. 101 but that Ext. does not exist in extensions.conf

2014-09-16 Thread Eric Wieling
See: 
http://community.polycom.com/t5/VoIP/100-EXTERNAL-CALLS-UNWANTED-NUMERAL/td-p/50841

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of motty cruz
Sent: Tuesday, September 16, 2014 12:04 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Asterisk- VoIP Phones ring from Ext. 101 but that 
Ext. does not exist in extensions.conf

Hello,
a user outside the office regularly gets a call from ext. 101 but that 
extension does not exist in my extensions.conf. when the user pickup the phone 
no one answers. Any Idea how to fix this issue? that user uses Polycom SP 450,

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

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

Re: [asterisk-users] if statement recording - after hours

2014-09-11 Thread Eric Wieling
See ExecIf in the output of core show applications.  The IF function might be 
useful, see core show functions.   I assume the Asterisk Book also covers 
this.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joseph
Sent: Thursday, September 11, 2014 5:43 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] if statement recording - after hours

In my dial plan I have these two lines:

exten = 
_NXX,n,Set(recordfilename=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},MST,%C%y-%m-%d-%H%M)}.wav)
exten = _NXX,n,MixMonitor(${recordfilename},b)

How to add if statement to execute these line only after let say 5pm.  To 
record conversation only after 5pm.

-- 
Joseph

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

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

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

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


Re: [asterisk-users] Asterisk secure fine tune - stop attack

2014-09-04 Thread Eric Wieling
If we don't need to allow access from outside the USA we block access from all 
non-ARIN IP addresses by using iptables.   This takes care of at least 80% of 
attacks.

I enabled guest access and pointed all guest calls to an IVR which auto 
disconnects the call after a while (2 min seems good) if there is no response.  
 That took care of most of the remaining attacks.

I'm considering enabling auto create peer and routing calls to the same IVR as 
above.

We also use fail2ban, but mostly for non-SIP attacks.

Before enabling any guest access be ABSOLUTELY SURE you know how to do it 
without causing security issues.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Hashmat Khan
Sent: Thursday, September 04, 2014 3:45 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk secure fine tune - stop attack

dont forgot to put your trusted IPs into ignoreip list while configuring 
fail2ban

its very important when a customer (may be 100+ extns) are behind NAT and only 
present single public IP

Rgds
Hash

Date: Thu, 4 Sep 2014 08:42:11 -0700
From: motty.c...@gmail.commailto:motty.c...@gmail.com
To: asterisk-users@lists.digium.commailto:asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Asterisk secure fine tune - stop attack
Hi A J,
believe me, I wish i do as you suggested, however I have a few extensions 
outside the office with dynamic IPs, so that is not a possibility. Thanks for 
your suggestions, I will try fail2ban. I don't know how complicated is to 
implement that on production server.

Thanks,
-Motty

On Thu, Sep 4, 2014 at 8:19 AM, A J Stiles 
asterisk_l...@earthshod.co.ukmailto:asterisk_l...@earthshod.co.uk wrote:
On Thursday 04 Sep 2014, motty cruz wrote:
 Hi All,
 I see this kind of attack on our Asterisk Server, do you know how to block
 that IP?
Instead of blocking unwanted IPs, you should be permitting only wanted IPs.

--
AJS

Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .

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

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


-- _ -- 
Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
Asterisk? Join us for a live introductory webinar every Thurs: 
http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or 
update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Special functionality for Secretary/Boss

2014-09-04 Thread Eric Wieling
Sounds like you are running FreePBX.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Mitul Limbani
Sent: Thursday, September 04, 2014 6:34 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Special functionality for Secretary/Boss


Kevin,

With your dialplan with g option on external trunk, if the call finishes the 
boss's leg of call also gets disconnected. So the next instruction would make a 
call to secratary, however with no one on other end.

Mitul
On 04-Sep-2014 11:44 PM, Kevin Larsen 
kevin.lar...@pioneerballoon.commailto:kevin.lar...@pioneerballoon.com wrote:
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 wrote on 09/04/2014 11:57:40 AM:
  We are currently migrating from a Nortel pbx to Asterisk and we
 have been able to convert most of the functions that people are used to
 but there is one I have no clear idea how to do.  The scenario is:

  Boss calls secretary from outside the office to get connected to
 another outside destination.  The secretary dials the destination and
 then trasfers call to the boss.  When boss finishes with that person
 they want to send the call back to the secretary in order to make
 another connection or simply to talk to the secretary.

  The first part is not a problem, but after the boss finishes his
 call how can we send the call back to the secretary?  I was thinking of
 using a conference room but how would the secretary know when the boss
 has finished?  Anyone know how to handle this scenario?

I haven't tested this, but my initial thought would be to create a special 
context or extension that the secretary could route through when doing the call 
transfer. The Dial application could be called with the 'g' option to continue 
the dialplan at the next priority when the call hangs up. Something like a 
normal call transfer would just dial the number as normal, but for the special 
transfer, you could prepend the dialed number with a #.

For example (using a local US dialstring, change to fit your needs):

; This is a normal external call.
exten = _NXXNXXX,1,Dial(SIP/your_external_trunk/${EXTEN})
  same = n,Hangup()

; This is a call that should be transfered back to the secretary's extension 
when external call is finished
exten = _#NXXNXXX,1,NoOp(Special Dial for Boss/Secretary Transfer)
  same = n,Dial(SIP/your_external_trunk/${EXTEN:1},,g)
; First call has ended, now we go back to the secretary)
  same = n,Dial(SIP/1234)
  same = n,Hangup()

That's at least where I would start with my testing and then develop the 
solution from there.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk

2014-09-02 Thread Eric Wieling
Try Hangup(123) where 123 is whatever hangup cause you want to send back to 
the caller.   The calliing Asterisk server will get the valuse back in 
HANGUPCAUSE variable.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens
Sent: Tuesday, September 02, 2014 8:03 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Custom SIP-header not present in call Asterisk to 
Asterisk

Hello,

I have a situation where a call comes in to my Asterisk server B. This call 
comes from another Asterisk server A. I want to tell to this server A why my 
server B hangs up.

So just before hanging up, I add a custom SIP-header :

exten = s,n,SIPAddHeader(X-My-Hangup: MaxChan)
exten = s,n,Hangup()


But I notice that this extra SIP-header is not send within the SIP-reponse :

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

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

Re: [asterisk-users] Custom SIP-header not present in call Asterisk to Asterisk

2014-09-02 Thread Eric Wieling
321 is not a valid Asterisk hangup cause.  Valid hangupcauses are 1-127 (Q.831 
cause codes)  See 
https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jonas Kellens
Sent: Tuesday, September 02, 2014 12:41 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Custom SIP-header not present in call Asterisk to 
Asterisk


On 02-09-14 14:22, Eric Wieling wrote:
Try Hangup(123) where 123 is whatever hangup cause you want to send back to 
the caller.   The calliing Asterisk server will get the valuse back in 
HANGUPCAUSE variable.


Hello,

I have tried sending Hangup(321) on Asterisk server B to Asterisk A but when I 
read HangupCause on Asterisk A it always is '21'.

Good idea, but it does not seem to work.



Kind regards,

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

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

Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

2014-09-02 Thread Eric Wieling
As long as you are NOT transcoding video should work in Asterisk.


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Patrick Laimbock
Sent: Tuesday, September 02, 2014 6:39 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

On 02-09-14 20:18, Khalid Touati wrote:
 so it seems Asterisk Versions does not support video I guess

On a local LAN/Wifi I tried it briefly with Asterisk 11.12.0 and the 
Bria app on Android and iPhone. With SELinux and the firewall 
temporarily disabled I couldn't get it to work with either H264 or VP8.

HTH,
Patrick

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

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

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

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


Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

2014-09-02 Thread Eric Wieling
A co-worker was doing video, I dislike video.  The phones were Polycom VVX, The 
settings on our FreePBX box (office PBX) on the Settings / Asterisk SIP 
Settings / Video section we have Video: Enabled, H.263 and H.263p are the only 
two video codecs enabled.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Patrick Laimbock
Sent: Tuesday, September 02, 2014 7:54 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

On 02-09-14 21:15, Eric Wieling wrote:
 As long as you are NOT transcoding video should work in Asterisk.

Both apps were configured with identical (codec) settings so I don't see 
how it would require transcoding. If you did get it to work I would 
appreciate it if you could tell me which clients you used, the Asterisk 
version, the OS and the relevant Asterisk config.

Thanks,
Patrick


 -Original Message-
 From: asterisk-users-boun...@lists.digium.com 
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Patrick Laimbock
 Sent: Tuesday, September 02, 2014 6:39 PM
 To: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

 On 02-09-14 20:18, Khalid Touati wrote:
 so it seems Asterisk Versions does not support video I guess

 On a local LAN/Wifi I tried it briefly with Asterisk 11.12.0 and the
 Bria app on Android and iPhone. With SELinux and the firewall
 temporarily disabled I couldn't get it to work with either H264 or VP8.

 HTH,
 Patrick



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

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

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

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


Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

2014-09-02 Thread Eric Wieling
core show codecs does not show VP8 on my Asterisk 11.  I don't recall why we 
are not using H.264.  The novelty wore off long ago and few of our staff use 
video calling anymore.


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Patrick Laimbock
Sent: Tuesday, September 02, 2014 9:36 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Does Asterisk 1.8. Supports Video Calls

On 02-09-14 22:52, Eric Wieling wrote:
 A co-worker was doing video, I dislike video.  The phones were Polycom VVX, 
 The settings on our FreePBX box (office PBX) on the Settings / Asterisk SIP 
 Settings / Video section we have Video: Enabled, H.263 and H.263p are the 
 only two video codecs enabled.

Thanks Eric. The obvious difference is that your co-worker was using 
H.263/H.263p while Bria uses H.264 or VP8. videosupport=yes was present 
in my sip.conf so it might be the codec. Time for more tinkering.

Thanks,
Patrick

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

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

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

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


Re: [asterisk-users] RDNIS with tel: vs. sip: header

2014-08-29 Thread Eric Wieling
Looks like this was resolved recently.

https://reviewboard.asterisk.org/r/3349/


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Patrick Laimbock
Sent: Thursday, August 28, 2014 12:02 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] RDNIS with tel: vs. sip: header

On 28-08-14 11:57, Positively Optimistic wrote:
 Has anyone had success patching chan_sip.c so that Asterisk will
 recognize the tel: header for RDNIS information?


   exten = get_in_brackets(tmp);
  if (!strncasecmp(exten, sip:, 4)) {
  exten += 4;
  } else if (!strncasecmp(exten, sips:, 5)) {
  exten += 5;
  } else {
  ast_log(LOG_WARNING, Huh?  Not an RDNIS SIP header
 (%s)?\n, exten);
  return -1;
  }

 Audiocodes Mediant 2000 devices send this header as a tel:...

 *[Aug 28 02:25:42] WARNING[1283][C-1574] chan_sip.c: Huh?  Not an
 RDNIS SIP header (tel:41068558XX)?*
 *
 *
 *(number obscured for privacy purposes)*

Not a dev but have you tried something like this (hope the formatting 
stays sane):

exten = get_in_brackets(tmp);
   if (!strncasecmp(exten, sip:, 4)) {
 exten += 4;
   } else if (!strncasecmp(exten, tel:, 4)) {
 exten += 4;
   } else if (!strncasecmp(exten, sips:, 5)) {
 exten += 5;
   } else {
 ast_log(LOG_WARNING, Huh?  Not an RDNIS SIP header (%s)?\n, exten);
 return -1;
   }

HTH,
Patrick

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

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

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

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


Re: [asterisk-users] PRI timing settings

2014-08-20 Thread Eric Wieling
NXXNXX is the correct format of CallerID numbers in NANPA.   The leading 1 
is not part of any NANPA phone number.   Toll free area codes are also not 
valid for CallerID.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jeff LaCoursiere
Sent: Wednesday, August 20, 2014 2:41 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PRI timing settings

On 08/20/2014 07:58 AM, Scott L. Lykens wrote:

On Aug 19, 2014, at 5:56 PM, Jeff LaCoursiere 
j...@jeff.netmailto:j...@jeff.net wrote:


I wrote earlier today about a new PRI installation in the Caribbean, where all 
outbound calls are functioning fine *except* calls to Sprint phone numbers, 
which get rejected immediately as busy.

I don't know what expectations for CLID your carrier might have, or for that 
matter the upstream carrier, however, we found through our CLEC here in the US 
that while the CLEC was happy to take e.164 formatted numbers from us as CLID, 
Global Crossing would reject them further upstream resulting in our calls to 
many toll frees being rejected.

Switching to 10 digit CLID on all outbound calls through that PRI solved the 
problem.

I don't know if this is your problem but be sure your CLID is in the most 
simple format possible for your region to help rule it out.

sl


This makes me curious... what *is* the simplest format possible for NANPA 
numbers?  I'm sure there must be a spec to conform to.  Can anyone point me to 
it?

Cheers,

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

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

Re: [asterisk-users] PRI timing settings

2014-08-20 Thread Eric Wieling
CallerID Name doesn't really matter.  Either your carrier will remove it when 
handing the call off to the next hop or the terminating carrier will ignore any 
CallerID name data and do a name lookup in their own database using the 
CallerID number.   This is why your CallerID name can be different depending on 
which carrier is used for the receiving phone number.

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jeff LaCoursiere
Sent: Wednesday, August 20, 2014 3:03 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PRI timing settings


What about the text portion?  Should that never be sent?  I was indeed sending 
the '1', and I will remove that to see if it solves my problem, but I also have 
the company name in there.  I feel like a newb asking such questions, but I've 
never had this issue before :)

Company 1NXXNXX

Cheers,

j

On 08/20/2014 09:46 AM, Eric Wieling wrote:
NXXNXX is the correct format of CallerID numbers in NANPA.   The leading 1 
is not part of any NANPA phone number.   Toll free area codes are also not 
valid for CallerID.

From: 
asterisk-users-boun...@lists.digium.commailto:asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jeff LaCoursiere
Sent: Wednesday, August 20, 2014 2:41 PM
To: asterisk-users@lists.digium.commailto:asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PRI timing settings

On 08/20/2014 07:58 AM, Scott L. Lykens wrote:

On Aug 19, 2014, at 5:56 PM, Jeff LaCoursiere 
j...@jeff.netmailto:j...@jeff.net wrote:



I wrote earlier today about a new PRI installation in the Caribbean, where all 
outbound calls are functioning fine *except* calls to Sprint phone numbers, 
which get rejected immediately as busy.

I don't know what expectations for CLID your carrier might have, or for that 
matter the upstream carrier, however, we found through our CLEC here in the US 
that while the CLEC was happy to take e.164 formatted numbers from us as CLID, 
Global Crossing would reject them further upstream resulting in our calls to 
many toll frees being rejected.

Switching to 10 digit CLID on all outbound calls through that PRI solved the 
problem.

I don't know if this is your problem but be sure your CLID is in the most 
simple format possible for your region to help rule it out.

sl


This makes me curious... what *is* the simplest format possible for NANPA 
numbers?  I'm sure there must be a spec to conform to.  Can anyone point me to 
it?

Cheers,

j



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

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

Re: [asterisk-users] PRI timing settings

2014-08-20 Thread Eric Wieling
Do you also dial only 7 digits when calling from your cellphone when it works?  
 Have you tried using the whole number in your dial?


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jeff LaCoursiere
Sent: Wednesday, August 20, 2014 5:29 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] PRI timing settings

On 08/20/2014 12:04 PM, Andres wrote:

Ok, here is an intense debug trace.  I've replaced the phone numbers to protect 
the innocent.  The smoking gun seems to be this:

Ext: 1  Cause: Destination out of order (27)

Though I have no idea why... calling the same destination from my cell phone 
works fine.  We only send seven digits for local on-island calls like this, 
and calls to other carriers work fine with the same format.  I'm starting to 
doubt there is anything I can do to fix this... seems like an issue between my 
telco and Sprint?

Cheers,

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

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

  1   2   3   4   5   6   7   8   9   10   >