Re: [asterisk-users] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
You were right. I had non-default rtp ports open in iptables. Edited
rtp.conf et voila. Everything seems to be working.

Thanks so much for your patience and guidance!

Have a lovely eening.
-- 
_
-- 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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Joshua Colp

Chirag Desai wrote:

So I see:

EXTERNAL_SNOM_IP -> EXTERNAL_ASTERISK_IP   (UDP,  length 218, src:
60798, dst 11128)

EXTERNAL_ASTERISK_IP -> INTERNAL_SNOM_IP   (UDP, length 218, src: 11128
dst 60478

So i see udp from the phone, but there's no audio.


If "rtp set debug on" shows no packets being received then they are not 
being read off the socket, so I'd check the system and make sure there 
really is no firewall like I said. Once packets start getting received 
then we'll change the target address and audio will flow.


It may even be that when using TCP or UDP you have some sort of helper 
which is opening up the right firewall ports and when TLS is in use it 
can't see the traffic and thus doesn't.


--
Joshua Colp
Digium, Inc. | 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 --
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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
So I see:

EXTERNAL_SNOM_IP -> EXTERNAL_ASTERISK_IP   (UDP,  length 218, src: 60798,
dst 11128)

EXTERNAL_ASTERISK_IP -> INTERNAL_SNOM_IP   (UDP, length 218, src: 11128 dst
60478

So i see udp from the phone, but there's no audio.


I do also see some packets ::

EXTERNAL_ASTERISK_IP -> EXTERNAL_SNOM_IP (ICMP, length 246, Destination
unreachable (Host administratively prohibited)
-- 
_
-- 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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Joshua Colp

Chirag Desai wrote:

In the PCAP I can see asterisk sending UDP packets to my local IP
192.168.0.5


If you don't see anything arriving from the remote side and we've told 
them the right IP address and ICE is not actually negotiated... then 
that leans more towards something remote unless there actually is a 
firewall.


--
Joshua Colp
Digium, Inc. | 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 --
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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
In the PCAP I can see asterisk sending UDP packets to my local IP
192.168.0.5

It's funny, when I switch to TCP on 5060 audio seems to work fine. The
moment I go to 5063 on TLS everything goes a bit awry. Any further input is
greatly appreciated.
-- 
_
-- 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 now available with bundled pjproject!

2016-03-07 Thread George Joseph
On Mon, Mar 7, 2016 at 2:53 PM, Jean-Denis Girard 
wrote:

> Hi,
>
> Le 07/03/2016 09:28, George Joseph a écrit :
> > PLEASE TRY THIS!!  I'd love some feedback BEFORE 13.8.0 is released.
>
> I have tried GIT-master-ee5a944M on my Fedora 23 test server, and got:
>
> [pjproject] Unpacking /tmp/pjproject-2.4.5.tar.bz2
> [pjproject] Applying patches and custom files
> [pjproject] Configuring with --prefix=/opt/pjproject
> --with-external-speex --with-external-gsm --with-external-srtp
> --with-external-pa --disable-video --disable-v4l2 --disable-sound
> --disable-resample --disable-opencore-amr --disable-ilbc-codec
> --without-libyuv --disable-g7221-codec --enable-epoll
> aconfigure: error: Unable to use PortAudio. If PortAudio development
> files are not available in the default locations, use CFLAGS and LDFLAGS
> env var to set the include/lib paths
> Makefile:57: recipe for target 'build.mak' failed
> make: *** [build.mak] Error 1
> failed
>
> So I installed portaudio-devel (it was not needed before), and then
> compilation / installation were ok. When restarting Asterisk, SELinux
> blocked an access to /usr/bin/portaudio.
>
> Can't we simply disable portaudio? I have changed --with-external-pa to
> --disable-pa in third-party/pjproject/Makefile.rules, and it seems to
> compile / work fine.
>

​Good catch on PortAudio.  I'll add the --disable-pa,​


>
> I have a question for servers without Internet access : is it enough to
> copy pjproject-2.4.5.tar.bz2 to /tmp or will there be other dependencies?
>

​No other dependencies.  Putting it in /tmp should be fine.​


>
> I made a couple of test calls without problem (with or without portaudio).
>
>
> Thanks for your work,
>


​Thanks for testing!​


> --
> Jean-Denis Girard
>
> SysNuxSystèmes   Linux   en   Polynésie   française
> http://www.sysnux.pf/ Tél: +689 40.50.10.40 / GSM: +689 87.79.75.27
>
>
> --
> _
> -- 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] Tapping into an existing audio stream rather than starting a new mp3Player?

2016-03-07 Thread Jonathan H
>From what I can tell from the Wiki page at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MP3Player,
if someone dials in and starts playing a stream, mp3player will load
up the URL and inject it into the current call.

But what about if 20 or 30 people call in, and it's firing off 30
copies of mp3Player? Won't that start to degrade bandwidth?

In an ideal world, I was wondering it there was any way of all callers
"tapping into" the same audio socket, and if there were no callers,
the player would be inactive, and the first "new" caller would kick
the stream into life again.

Does that make any sense at all?

Thanks!

Asterisk 13.7.2 (but excited about 13.8 with bundled PJsip!) on Ubuntu
15.10 Wiley.

-- 
_
-- 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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Joshua Colp

Chirag Desai wrote:

I'm dialling from the snom and every few calls asterisk sends media to
the phones external IP and it works!

And then now and again it sends the media to the phones internal IP and
I hear nothing. I'm really at a loss.


In the non-working case check the IP address in the SDP, if it's the 
external then we've told the phone to send it to the right place. After 
that do a packet capture and see if the packets are arriving on the 
machine. If not then look outside the machine at things.


--
Joshua Colp
Digium, Inc. | 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 --
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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
I'm dialling from the snom and every few calls asterisk sends media to the
phones external IP and it works!

And then now and again it sends the media to the phones internal IP and I
hear nothing. I'm really at a loss.
-- 
_
-- 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 now available with bundled pjproject!

2016-03-07 Thread Jean-Denis Girard
Hi,

Le 07/03/2016 09:28, George Joseph a écrit :
> PLEASE TRY THIS!!  I'd love some feedback BEFORE 13.8.0 is released.

I have tried GIT-master-ee5a944M on my Fedora 23 test server, and got:

[pjproject] Unpacking /tmp/pjproject-2.4.5.tar.bz2
[pjproject] Applying patches and custom files
[pjproject] Configuring with --prefix=/opt/pjproject
--with-external-speex --with-external-gsm --with-external-srtp
--with-external-pa --disable-video --disable-v4l2 --disable-sound
--disable-resample --disable-opencore-amr --disable-ilbc-codec
--without-libyuv --disable-g7221-codec --enable-epoll
aconfigure: error: Unable to use PortAudio. If PortAudio development
files are not available in the default locations, use CFLAGS and LDFLAGS
env var to set the include/lib paths
Makefile:57: recipe for target 'build.mak' failed
make: *** [build.mak] Error 1
failed

So I installed portaudio-devel (it was not needed before), and then
compilation / installation were ok. When restarting Asterisk, SELinux
blocked an access to /usr/bin/portaudio.

Can't we simply disable portaudio? I have changed --with-external-pa to
--disable-pa in third-party/pjproject/Makefile.rules, and it seems to
compile / work fine.

I have a question for servers without Internet access : is it enough to
copy pjproject-2.4.5.tar.bz2 to /tmp or will there be other dependencies?

I made a couple of test calls without problem (with or without portaudio).


Thanks for your work,
-- 
Jean-Denis Girard

SysNuxSystèmes   Linux   en   Polynésie   française
http://www.sysnux.pf/ Tél: +689 40.50.10.40 / GSM: +689 87.79.75.27



signature.asc
Description: OpenPGP digital signature
-- 
_
-- 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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Joshua Colp

Chirag Desai wrote:




Joshua Colp wrote:

Have you done a packet capture to see if the RTP from the remote device
is hitting the machine to narrow things down?



Nope. When I run with RTP encryption on it seems that rewrite_contact
does not work in PJSIP.

When I turn off RTP some calls get media, some don't. If you look at the
SIP trace it seems like the rewrite_contact doesn't always take affect.


The rewrite_contact shows as working fine in the SIP trace. The log 
shows the message as received over the socket, before modification. If 
it wasn't working then the BYE would be going to the internal IP 
address+port.


Nothing stands out in the signaling.

--
Joshua Colp
Digium, Inc. | 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 --
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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
> Joshua Colp wrote:
>>
>> Have you done a packet capture to see if the RTP from the remote device
>> is hitting the machine to narrow things down?
>>
>>
>>
Nope. When I run with RTP encryption on it seems that rewrite_contact does
not work in PJSIP.

When I turn off RTP some calls get media, some don't. If you look at the
SIP trace it seems like the rewrite_contact doesn't always take affect.
-- 
_
-- 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] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Chirag Desai
> Joshua Colp wrote:
>
> There should be nothing different, except for how you configure things.
> What is the full PJSIP configuration? What is the environment where
> Asterisk is running? Is ICE actually in use on the other side? What is
> the full SIP trace?
>


The full configuration is here:

http://pastebin.com/XqZG1m5X

I am connection over TLS / SRTP on port 5063.
When I put in a stun server asterisk sends media to the phone's external IP.

The asterisk is has a public IP and internal IP. It is internet facing, and
is not behind NAT.

When I had ICE enabled on the snom, it didnt seem to make any difference.
PJ showed an ICE error.

The sip trace is here:

http://pastebin.com/fDxbk289

Thanks for your help.
-- 
_
-- 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] Asterisk now available with bundled pjproject!

2016-03-07 Thread George Joseph
The current Asterisk 13 and master git branches have a new feature that
will be included in 13.8.0:  The ability to compile and run Asterisk with a
bundled version of pjproject.
​​

Why would you want to do this?  Several reasons:

   - Predictability:  When built with the
   ​bundled
pjproject, you're always certain of the version you're running against,
   no matter where it's installed.
   - Scalability:  The default pjproject configuration is optimized for
   client applications. The bundled version's configuration is optimized for
   server use.
   - Usability:  Several feature patches, which have been submitted
   upstream to pjproject but not yet released, have been included in the
   bundled version.
   - Safety:  If a security or critical issue is identified in pjproject,
   it can be patched and made available with a new release of Asterisk instead
   of
   ​having to ​
   waiting for a new release of pjproject
   ​​
   .
   - Maintainability:  You don't need to build and install separate
   packages.
   - Supportability:  When asking others for help, there's no question
   about which version of pjproject you're using and what options it was
   compiled with.
   - Compatibility:  This is especially important from a development
   perspective because it means we can be sure that new pjproject APIs that
   have been introduced
   ​,​
   or old ones that have been deprecated
   ​,​
   are handled and tested appropriately in Asterisk.
   - Reliability:  You can be sure that Asterisk was tested against the
   bundled version.


So now that you're sold, here's how you use it:

All you have to do is add the "--with-pjproject-bundled" option to your
./configure command line and remove any other "--with-pjproject" option you
may have specified.  The configure and make processes will download the
correct version of pjproject, patch it, configure it, build it and finally
link Asterisk to it statically.  No changes in runtime configuration are
required.

Still not sold?  The default behavior hasn't changed so as long as you
haven't specified "--with-pjproject-bundled", your build and deploy process
remains as is.

PLEASE TRY THIS!!  I'd love some feedback BEFORE 13.8.0 is released.
-- 
_
-- 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] Pass variable to voicemail script

2016-03-07 Thread Telium Technical Support
>If you are talking about the 'externnotify' parameter in
voicemail.conf, the variables are passed simply as @ARGV.

 

I'm referring to the mailcmd= setting in voicemail.conf.  Asterisk runs this
when emailing a voicemail (with attachment)

-- 
_
-- 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] Pass variable to voicemail script

2016-03-07 Thread Tech Support
Hello;

If you are talking about the 'externnotify' parameter in voicemail.conf,
the variables are passed simply as @ARGV.

Regards;

John V.

 

Tech Support

Tech Support

VoIP Business Solutions

240-215-3479 x325

  supp...@voipbusiness.us

 

 

 

 

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Michelle
Dupuis
Sent: Saturday, March 05, 2016 11:06 PM
To: Asterisk Users List
Subject: [asterisk-users] Pass variable to voicemail script

 

I have a custom voicemail script which reformats and forwards the attached
voicemail wav file to the recipient.

 

I would like to make use of a channel variable in my script; is there a way
to pass a channel variable to this voicemail script?

-- 
_
-- 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] Pass variable to voicemail script

2016-03-07 Thread Rodrigo Ramírez Norambuena
March 6 2016 1:06 AM, "Michelle Dupuis"  wrote:
> I have a custom voicemail script which reformats and forwards the attached 
> voicemail wav file to
> the recipient.
> 
> I would like to make use of a channel variable in my script; is there a way 
> to pass a channel
> variable to this voicemail script?

How you call the custom script?

--
Rodrigo Ramírez Norambuena
http://www.rodrigoramirez.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

Re: [asterisk-users] Differences between Chan_SIP and PJSIP with NAT and STUN

2016-03-07 Thread Joshua Colp

Chirag Desai wrote:

I have two accounts on Asterisk 13. One uses chan_sip and the other pjsip.

In my snom 760 the setup for these two accounts is identical.

When I call echo test from the account using chan_sip audio comes
through fine.

When I call echo test from the account using pjsip there is no audio.

With rtp set debug on, I can see that audio is being sent to the snom's
internal IP 192.168.0.x

I can add a stun server in the config for this account and RTP flows to
the Public IP and I get audio.

I was wondering why there is a difference between pjsip and chan_sip so
that one works without stun and the other requires it.  Does anybody
know why? Maybe my settings are off in pjsip.


There should be nothing different, except for how you configure things. 
What is the full PJSIP configuration? What is the environment where 
Asterisk is running? Is ICE actually in use on the other side? What is 
the full SIP trace?


--
Joshua Colp
Digium, Inc. | 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 --
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