[asterisk-users] Asterisk 13 High CPU usage

2016-08-06 Thread Chirag Desai
All,

I upgraded to asterisk 13.10. I have minimal load on the box. 20-30 calls a day.

Right now, there are no calls on the box at all.

top shows me this:

PR 20

NI 0

VIRT 1570540

RES 84620

SHR 26296

S S

%CPU 99.7

%MEM 8.4

TIME+ 3468:39

COMMAND asterisk

When I run this command
while true; do top -Hbc -p `pgrep asterisk` -n 1 && asterisk -rx "core show
threads"; sleep 1; done

I get this

PID USER  PR  NIVIRTRESSHR S %CPU %MEM TIME+ COMMAND
29079 root  20   0 1570540  84620  26296 R 37.5  8.4   1178:31 asterisk
29010 root  20   0 1570540  84620  26296 R 31.2  8.4   1197:07 asterisk
29047 root  20   0 1570540  84620  26296 R 31.2  8.4   1186:48 asterisk

Any ideas??




Previous message



Hi all,

I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours
after I upgraded).

On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually
happens a few hours after starting asterisk. A restart of asterisk gets the
CPU back down, but only for a little while.

There asterisk box has no call traffic flowing through it, just 15 or so
registrations.

I'm sure this is not best practise but for now I am using chan_sip and
pjsip at the same time. My pjsip endpoints are using TLS.

I am not sure where to start looking in order to debug the CPU usage by
asterisk and would very much appreciate some guidance.

Kind regards,

Chirag
-- 
_
-- 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 13 High CPU usage

2016-07-21 Thread Chirag Desai
Hi all,

I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours
after I upgraded).

On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually
happens a few hours after starting asterisk. A restart of asterisk gets the
CPU back down, but only for a little while.

There asterisk box has no call traffic flowing through it, just 15 or so
registrations.

I'm sure this is not best practise but for now I am using chan_sip and
pjsip at the same time. My pjsip endpoints are using TLS.

I am not sure where to start looking in order to debug the CPU usage by
asterisk and would very much appreciate some guidance.

Kind regards,

Chirag
-- 
_
-- 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] OPUS support in Asterisk 13

2016-03-24 Thread Chirag Desai
I hope so! Snom just added opus support in their latest firmware if that
counts for anything.

Hope digium figure it out.

Tzafrir, does your update support pass through only or transcoding too?

Thanks all,

Chirag
-- 
_
-- 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] OPUS support in Asterisk 13

2016-03-24 Thread Chirag Desai
Hi all,

Sorry if this has been asked before. I searched a lot, but found
conflicting answers, so hoping for some clarification.

My question is does Asterisk 13 support OPUS? If so which version exactly?

If asterisk 13 requires a patch, which is the correct one and where do I
get it?

Kind regards,

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

2016-03-05 Thread Chirag Desai
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.

Here's how I have my endpoint configured:

[test]
type=endpoint
context=dial_out
disallow=all
allow=alaw
allow=speex
allow=speex16
allow=speex32
allow=gsm
allow=ulaw
allow=g722
auth=test
aors=test
direct_media=no
media_encryption=sdes
media_encryption_optimistic=yes
rtp_symmetric=yes
force_rport=no
rewrite_contact=yes  ; necessary if endpoint does not know/register public
ip:port
ice_support=yes;This is specific to clients that support NAT traversal
   ;for media via ICE,STUN,TURN. See the wiki at:
   ;https://wiki.asterisk.org/wiki/x/D4FHAQ
   ;for a deeper explanation of this topic.

[test]
type=auth
auth_type=userpass
password=redacted
username=test

[test]
type=aor
remove_existing=yes
max_contacts=2
qualify_frequency=60

Looking forward to your thoughts.

Kind Regards,

C
-- 
_
-- 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] PJSIP TLS sometimes RTP, sometimes no RTP

2016-01-20 Thread Chirag Desai
Hi George,

I tried the nightly build and also Bria. I can replicate the same issue on both.

This morning I made many successful calls in succession. This evening
it was intermittent again.

Could it be the mobile network is blocking the RTP but it seems odd it
works sometimes and not others.

That said I have another setup with Kamailio which talks to the same
asterisk via pjsip. I get audio on this account every single time when
using mobile networks. It's very strange. It seems like PJSIP simply
doesn't set up the RTP when I connect to the asterisk directly.

Any other suggestions?


On Tue, Jan 19, 2016 at 5:05 PM, *George Joseph*  wrote:

> With the exception of media_encryption_optimistic=yes and ice_support  =
> no, my setup looks like yours and I'm not having any problems with
> CSipSimple, even with SRTP mode = mandatory.  I assume your server has a
> public IP address and there's no NAT involved on the server side?  Oddly
> enough, I have ICE and Aggressive ICE turned on in CSipSimple.
>
> CSipSimple in the Play store is a little stale.  Have you tried the
> "nightly" version?
-- 
_
-- 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] PJSIP TLS sometimes RTP, sometimes no RTP

2016-01-19 Thread Chirag Desai
Hi,

I have a PJSIP account configured as below. I am testing with the Echo Test
application on Asterisk 13 and using CSipSimple.

I can create a call with TLS and SRTP, however for some reason only 1 in
every 5 calls has audio.

When I connect over WiFi, I have audio every single time. When I connect
over 3G/4G I only get audio every now and then.

Sometimes pjsip shows: Probation passed - setting RTP source address to
[public ip:port] and I get audio when using a mobile network.

Most of the time though asterisk shows it's playing the demo echotest file,
but there doesn't appear to be any RTP and I hear no audio.

I'm using TLS and SRTP (SDES) Mandatory. I've tried various codecs too.
I've tried STUN and ICE but with little luck.

Ideas would be greatly appreciated!

Thanks!

[someuser]
type=endpoint
context=some_context
disallow=all
allow=speex
allow=gsm
allow=alaw
allow=ulaw
allow=speex16
allow=speex32
allow=g722
auth=someuser
aors=someuser
direct_media=no
media_encryption=sdes
media_encryption_optimistic=yes
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
ice_support=yes

[someuser]
type=auth
auth_type=userpass
password=[redacted]
username=someuser

[someuser]
type=aor
remove_existing=yes
max_contacts=1

Thanks

C
-- 
_
-- 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] No audio when using TLS/SRTP with Kamailio and Asterisk 13

2015-08-18 Thread Chirag Desai
Hi all,

I'm using Kamailio + Asterisk 13 (PJSIP), where Kamailio (using rtpengine)
acts as the registrar and forwards all calls to Asterisk.

This works fine when using udp / tcp and RTP. When switching to TLS/SRTP,
the call is set up correctly, however, I get no audio.

When I skip kamailio and connect my two endpoints to asterisk directly I
get a perfect call with SRTP.

The same is also true when I skip asterisk and have the call handled by
Kamailio (using RTPEngine).

In PJSIP my transports look like this:

[transport-tcp]
type=transport
protocol=tcp;udp,tcp,tls,ws,wss
bind=0.0.0.0:5060
local_net=[asterisk local ip]/17
external_media_address=[asterisk external ip]
external_signaling_address=[asterisk external ip]

[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5063
ca_list_file=/etc/asterisk/certificates/cert.crt
cert_file=/etc/asterisk/certificates/certificate.crt
priv_key_file=/etc/asterisk/certificates/key.key
method=tlsv1


My endpoint looks like this:

[kamailio]
type=endpoint
context=kam_out
disallow=all
allow=alaw
allow=g722
allow=ulaw
allow=gsm
aors=kamailio
direct_media=no
media_encryption=sdes
media_address=[Asterisk Local IP]
rtp_symmetric=yes
force_rport=no
rewrite_contact=yes
outbound_proxy=sip:[Kamailio Local IP]:5060\;transport=tcp\;lr

[kamailio]
type=identify
endpoint=kamailio
match=[Kamailio Local IP]/17

[kamailio]
type=aor
contact=sip:[Kamailio Local IP]:5060\;transport=tcp


My dialplan looks like this

[kam_out]

exten = 1001,1,Playback(demo-echotest)  ; Let them know what's going on
same = n,Echo ; Do the echo test
same = n,Playback(demo-echodone)  ; Let them know it's over
same = n,Hangup()


exten = _kb-.,1,NoOp(Calling a registred user with number ${EXTEN})
same = n,Set(callee=${PJSIP_HEADER(read,To)})
same = n,Set(callee=${callee:5})
same = n,Set(callee=${callee:0:-1}) ; removes the 
same = n,Dial(PJSIP/kamailio/sip:${callee})
same = n,Hangup()

When a call comes via kamailio it comes with a prefix of 'kb' if the value
is an extension e.g. 1000 - 1999. Otherwise users can dial a prefix of 45
e.g. 451001 to hit the Echo Test.

As mentioned the echo test works fine, however the actual call between two
endpoints has no audio. RTP debug shows nothing. PJSIP shows two channels
in a simple bridge, but no sound. Usually PJSIP says RTP Probation passed
and shows the IP address but in this case it does not.

I'm guessing the issue is something funny in PJSIP, although I'm not 100%
since it does work when I turn SRTP and TLS off.

For testing I'm using CsipSimple and a Snom 760. Both are set with SRTP
mandatory and are using TLS to talk to Kamailio.

When kamailio talks to asterisk it uses TCP over a local network.

I've been pulling my hair out for days. I really would appreciate any ideas
or some pointing in the right direction here.

Thanks in advance,

C
-- 
_
-- 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] PJSIP and Kamailio without registration

2015-03-12 Thread Chirag Desai
From: Matthew Jordan mjor...@digium.com


  If the INVITE request is not shown in the CLI with 'pjsip set logger
  on', then Asterisk is not actually receiving the request.
 
  Does a pcap show the message being sent to the correct IP/port? If you
  change the transports to bind to port 5060, does that change anything?



The sip message I included in my last message is what I see when I ngrep
on 5061, but asterisk doesn't see it. When I tell Kamailio to send the
message to 5060 chan_sip shows the invite in the CLI.

 My setup has chan_sip running on 5060 and pjsip (tcp and udp on 5061).

 I'll get PJSIP running on 5060 and see if that makes any difference.

UPDATE: I got PJSIP on 5060 and everything is working fine as expected and
I can see the calls from Kamalio. Is this a bug with asterisk not
recognising the traffic on 5061 even though the SIP messages are being
received by the server on that port and I can see it?
-- 
_
-- 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] PJSIP and Kamailio without registration

2015-03-12 Thread Chirag Desai
 From: Matthew Jordan mjor...@digium.com


  If the INVITE request is not shown in the CLI with 'pjsip set logger
  on', then Asterisk is not actually receiving the request.
 
  Does a pcap show the message being sent to the correct IP/port? If you
  change the transports to bind to port 5060, does that change anything?



The sip message I included in my last message is what I see when I ngrep on
5061, but asterisk doesn't see it. When I tell Kamailio to send the message
to 5060 chan_sip shows the invite in the CLI.

My setup has chan_sip running on 5060 and pjsip (tcp and udp on 5061).

I'll get PJSIP running on 5060 and see if that makes any difference.

-- C
-- 
_
-- 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] PJSIP and Kamailio without registration

2015-03-10 Thread Chirag Desai
OK, it stopped working.

It turns out the transport and endpoints in PJSIP are ok. I can send an
invite from my unregistered snom phone and I can see some activity in the
CLI.

However, when I dial from my snom to Kamailio and have it pass the message
to asterisk, PJSIP seems to ignore the sip messages even though they are
there.

Is there something wrong in the invite that I'm missing?

U 2015/03/10 22:47:43.539208 [kamailio public ip]:5060 - [asterisk public
ip]:5061
INVITE sip:1...@somedomain.com;user=phone SIP/2.0.
Record-Route: sip:[kamailio public ip];r2=on;lr=on;nat=yes.
Record-Route: sip:[kamailio public ip];transport=tcp;r2=on;lr=on;nat=yes.
Via: SIP/2.0/UDP 1
[kamailio public
ip];branch=z9hG4bKc10a.a307d27e5d7581c259704fcd865a69e2.0;i=1.
Via: SIP/2.0/TCP
[snomprivateip]:47153;received=[snompublicip];branch=z9hG4bK-cc9ldmdhvvdi;rport=47473.
From: sip:1...@somedomain.com;tag=tu0if9akzq.
To: sip:451...@somedomain.com;user=phone.
Call-ID: 8d74ff54e076-hajfjxwp1crj.
CSeq: 2 INVITE.
Max-Forwards: 16.
Contact: sip:1000@
[snom_private_ip]:47153;alias=[snom_public_ip]~47473~2;transport=tcp;line=snl8cukk;reg-id=1.
X-Serialnumber: [snom_mac_address].
P-Key-Flags: resolution=31x13, keys=4.
User-Agent: snom760/8.7.3.25.
Accept: application/sdp.
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK,
MESSAGE, INFO, UPDATE.
Allow-Events: talk, hold, refer, call-info.
Supported: timer, 100rel, replaces, from-change.
Session-Expires: 3600;refresher=uas.
Min-SE: 90.
Content-Type: application/sdp.
Content-Length: 598.

.
v=0.
o=root 1667335791 1667335791 IN IP4 [snom_private_ip].
s=call.
c=IN IP4 [snom_private_ip].
t=0 0.
m=audio 59358 RTP/AVP 9 0 8 3 97 98 99 100 106 107 108 109 18 101.
a=rtpmap:9 G722/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:97 G726-16/8000.
a=rtpmap:98 G726-24/8000.
a=rtpmap:99 G726-32/8000.
a=rtpmap:100 G726

My transports are:

[transport-udp]
type=transport
protocol=udp
bind:0.0.0.0:5061


[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0:5061

Ideas 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] PJSIP and Kamailio without registration

2015-03-09 Thread Chirag Desai
Joshua Colp wrote:

 Have you configured any transports? PJSIP does not create any by
 default, you have to explicitly configure them. Without them no traffic
 can come in or go out. You can also remove the explicit transport from
 the endpoint.

Yes I have two transports

[transport-udp]
type=transport
protocol=udp;udp,tcp,tls,ws,wss
bind=0.0.0.0:5061

[transport-tcp-kamailio]
type=transport
protocol=tcp
bind=0.0.0.0:5061

I've tried explicitly setting the IP in bind and leaving it as above.
Nothing seems to come into asterisk. Although, as mentioned I can see the
SIP messages when I ngrep 5061.

Kind Regards,

C
-- 
_
-- 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] PJSIP and Kamailio without registration

2015-03-09 Thread Chirag Desai
Hi,

I want to have Kamailio in front of one or more Asterisk boxes.

I don't think it is necessary for Kamailio and Asterisk to register with
one another. I'd like for PJSIP to recognise Kamailio by its IP address.

I have two boxes, both have public IP addresses, they also have private IP
addresses and can communicate with each other.

I have a Snom phone accessing Kamailio via its public IP address.

Kamailio sends traffic to asterisk on the private IPs.

Doing an ngrep on 5061 (where I have tcp and udp set up for pjsip) I can
see Kamailio sending traffic to the Asterisk box, however in the console I
see no activity. I have verbose and debug set to 10, and pjsip set logger
on.

I'm a bit stumped, I've tried everything I could think of, even configuring
everything to work on the public IP, but no luck.

Here's my PJSIP conf:

[kamailio]
type=endpoint
transport=transport-udp
context=from_kamailio
disallow=all
allow=alaw
allow=g722
allow=ulaw
aors=kamailio
direct_media=no
rtp_symmetric=no
force_rport=no
rewrite_contact=no

[kamailio]
type=identify
endpoint=kamailio
match=xxx.xxx.xxx.xxx (removed kamailios private IP)

[kamailio-mars]
type=aor
contact=sip:xxx.xxx.xxx.xxx:5060 (removed kamailios private IP).


My end goal is for all my phones to register to Kamailio. Kamailio should
pass calls (even for local phones) to Asterisk.

Thanks in advance for your help.

C
-- 
_
-- 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] PJSIP and Kamailio without registration

2015-03-09 Thread Chirag Desai
Chirag Desai wrote:

I've tried explicitly setting the IP in bind and leaving it as above.
Nothing seems to come into asterisk. Although, as mentioned I can see the
SIP messages when I ngrep 5061.

I got it working, I can see the sip traffic in the CLI now.

I was trying to match on the IP of kamailio, when really I should have been

matching on the domain name in the sip message (I believe in the TO field).

I can place a call now, but keep getting unauthorized. Not sure why

since the endpoint doesn't have any auth credentials.

Any ideas?
-- 
_
-- 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] PJSIP works on UDP but not TCP

2015-03-04 Thread Chirag Desai
Hi all,

I have Asterisk 13 running and I'm currently trying to get PJSIP working on
TCP.

My transport looks like this. My box is not behind NAT.

[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0:5061

My endpoint looks like this:

[user1]
type=endpoint
transport=transport-tcp
context=local_out
disallow=all
allow=alaw
allow=ulaw
allow=g722
auth=user1
aors=user1
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes

[user1]
type=auth
auth_type=userpass
password=123456
username=user1

[user1]
type=aor
remove_existing=yes
max_contacts=1

I have two endpoints user1 and user 2. Both are able to register fine.

With both endpoints I can call into asterisk and do an echo test without
issue or listen to music.

However, when trying to call one endpoint from another, nothing happens.

My dialplan is fine. Switching the transport to UDP allows me to call
between endpoints.

In TCP however, I can see PJSIP send an invite, but then receives no
responses.

I've spent all evening trying to figure it out and am a bit stumped now,
since changing to UDP works straight away.

I'm testing with a snom 760 and cSipSimple, calls don't work in either
direction and regardless of local network or mobile network.

Any help would be greatly appreciated.

Kind Regards,

Chirag
-- 
_
-- 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] PJSIP works on UDP but not TCP

2015-03-04 Thread Chirag Desai
Joshua Colp wrote:

 Chirag Desai wrote:
 * Joshua Colp wrote:
*  * snip
*  *   Remove transport=transport-tcp from your endpoints.
*   * Joshua...I did that but now my endpoints won't register.
*
 That should have no impact on things. Can you clarify what you mean by
 it doesn't register? What happens?

Ignore me...it's working! Thanks so much :)
-- 
_
-- 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] PJSIP works on UDP but not TCP

2015-03-04 Thread Chirag Desai
Joshua Colp wrote:

snip

 Remove transport=transport-tcp from your endpoints.


Joshua...I did that but now my endpoints won't register.

Kind Regards,

Chirag
-- 
_
-- 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] PJ SIP realtime with Kamailio / opensips

2015-01-21 Thread Chirag Desai
Hi all,

I saw Matt Jordan's recent Kamailio world talk and was interested in the
idea he proposed of stripping out authentication and registration from
asterisk and letting Kamailio handle it.

All of the tutorials I've seen (e.g. on asipto) show Kamailio forwarding
registrations to asterisk.

In order to do what Matt suggested would I be correct in assuming I would
have to use the asterisk database rather than the Kamailio database? I've
compared the two and the table structures are different.

If I use the asterisk database I guess asterisk still needs to be
responsible for handling authentication, registration and writing the
contacts to the database. If I use the Kamailio database how would I dial a
local extension from asterisk if I'm using multiple domains?

For example 1...@domaina.com - 2...@domaina.com

Or even

1...@domaina.com - 3...@domainb.com

How would pjsip find the contact to dial?

As far as I can tell asterisk will have no idea who is registered or how to
find them (contact details). Maybe I'm over thinking something simple, or
maybe I'm not. Either way I would love your thoughts on how this could be
done.

My Kamailio is public facing, but talks to asterisk over an internal
network. Asterisk can face the internet but I'd rather not.

Thanks in advance for your help,

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