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

2016-03-08 Thread Pete Mundy
>>  check the system and make sure there really is no firewall like I said

> You were right.

Stick around on the list long enough and you'll realise the truth... he always 
is ;-)

Pete


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

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