VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
djchillerz at gmail.com Guest
|
Posted: Mon Mar 09, 2015 4:23 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
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 |
|
Back to top |
|
|
jcolp at digium.com Guest
|
Posted: Mon Mar 09, 2015 4:27 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
Chirag Desai wrote:
<snip>
Quote: | 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).
|
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.
--
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 |
|
Back to top |
|
|
djchillerz at gmail.com Guest
|
Posted: Mon Mar 09, 2015 4:33 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
Joshua Colp wrote:
Quote: | > Have you configured any transports? PJSIP does not create any by
Quote: | 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 |
|
Back to top |
|
|
djchillerz at gmail.com Guest
|
Posted: Mon Mar 09, 2015 5:15 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
Quote: | Chirag Desai wrote:>I've tried explicitly setting the IP in bind and leaving it as above.
Quote: | 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 beenmatching 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 whysince the endpoint doesn't have any auth credentials.Any ideas? |
|
|
|
Back to top |
|
|
djchillerz at gmail.com Guest
|
Posted: Tue Mar 10, 2015 6:12 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
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:1000@somedomain.com ([email]sip%3A1000@somedomain.com[/email]);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:1000@somedomain.com ([email]sip%3A1000@somedomain.com[/email])>;tag=tu0if9akzq.
To: <sip:451000@somedomain.com ([email]sip%3A451000@somedomain.com[/email]);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. |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Thu Mar 12, 2015 9:58 am Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
On Tue, Mar 10, 2015 at 6:11 PM, Chirag Desai <djchillerz@gmail.com> wrote:
Quote: | 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:1000@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:1000@somedomain.com>;tag=tu0if9akzq.
To: <sip:451000@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
|
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?
--
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://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 |
|
Back to top |
|
|
djchillerz at gmail.com Guest
|
Posted: Thu Mar 12, 2015 4:59 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
Quote: | From: Matthew Jordan <mjordan@digium.com (mjordan@digium.com)>
Quote: | 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 |
|
Back to top |
|
|
djchillerz at gmail.com Guest
|
Posted: Thu Mar 12, 2015 5:12 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
Quote: | From: Matthew Jordan <mjordan@digium.com (mjordan@digium.com)>
Quote: | Quote: | 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?
|
|
|
Quote: | 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.
|
Quote: | My setup has chan_sip running on 5060 and pjsip (tcp and udp on 5061).
|
Quote: | 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? |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Thu Mar 12, 2015 7:22 pm Post subject: [asterisk-users] PJSIP and Kamailio without registration |
|
|
On Thu, Mar 12, 2015 at 5:11 PM, Chirag Desai <djchillerz@gmail.com> wrote:
Quote: |
Quote: | From: Matthew Jordan <mjordan@digium.com>
Quote: | Quote: | 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?
|
|
|
Quote: | 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?
|
I suspect not. We run the PJSIP stack on multiple ports quite often. I
would guess that there's something else going on here.
--
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|