Hello all,
I’m trying to integrate Asterisk with Kamailio. For now, my only aim is to use Kamailio as a SIP proxy, handling the user authentication and registration.
-Ubuntu 20.04.2 LTS on VirtualBox on MacOS
-Zoiper5
I used the below tutorials and this forum as a guide;
https://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
And managed to register endpoints and make calls on Asterisk using Realtime PJSIP. I also successfully installed Kamailio and was able to register endpoints and make calls (without the Asterisk). However once I integrated them together, I encountered a few problems.
When I enter the creds on the Zoiper it confirms that the endpoint is “registered” and I get 200 OK from the Kamailio. Also when I monitor my Kamailio I see the online endpoints. But when I do pjsip show endpoints they appear offline. Same goes for the pjsip show contacts. Below is the log from the Asterisk and Kamailio.
Kamailio Logs
{
"jsonrpc": "2.0",
"result": {
"Domains": [{
"Domain": {
"Domain": "location",
"Size": 1024,
"AoRs": [{
"Info": {
"AoR": "102",
"HashID": 3612366,
"Contacts": [{
"Contact": {
"Address": "sip:102@10.0.0.115:5060;ob",
"Expires": 188,
"Q": -1,
"Call-ID": "fGzIGyjWXb8XM3YPcmC2NO2a6UGoPGVQ",
"CSeq": 64116,
"User-Agent": "PJSUA v2.11-dev Darwin-20.5/x86_64",
"Received": "[not set]",
"Path": "[not set]",
"State": "CS_SYNC",
"Flags": 0,
"CFlags": 0,
"Socket": "udp:10.0.0.116:5060",
"Methods": 8159,
"Ruid": "uloc-60c6fe90-861-81",
"Instance": "[not set]",
"Reg-Id": 0,
"Server-Id": 0,
"Tcpconn-Id": -1,
"Keepalive": 0,
"Last-Keepalive": 1623688155,
"KA-Roundtrip": 0,
"Last-Modified": 1623688155
}
}, {
"Contact": {
"Address": "sip:102@10.0.0.115:41348;rinstance=a1757106a1dcc579;transport=UDP",
"Expires": 20,
"Q": -1,
"Call-ID": "Zqz3iI3qvNWdZuVDOE3dFA..",
"CSeq": 46,
"User-Agent": "Z 5.4.12 v2.10.13.2",
"Received": "[not set]",
"Path": "[not set]",
"State": "CS_SYNC",
"Flags": 0,
"CFlags": 0,
"Socket": "udp:10.0.0.116:5060",
"Methods": 5087,
"Ruid": "uloc-60c774a9-24fd-81",
"Instance": "[not set]",
"Reg-Id": 0,
"Server-Id": 0,
"Tcpconn-Id": -1,
"Keepalive": 0,
"Last-Keepalive": 1623688227,
"KA-Roundtrip": 0,
"Last-Modified": 1623688227
}
}]
}
}, {
"Info": {
"AoR": "101",
"HashID": 3612369,
"Contacts": [{
"Contact": {
"Address": "sip:101@10.0.0.100:44042;rinstance=6288a17193003a27;transport=UDP",
"Expires": 41,
"Q": -1,
"Call-ID": "g_mkaXbj512gbM-dBE5QyA..",
"CSeq": 106,
"User-Agent": "Z 5.4.12 v2.10.13.2-mod",
"Received": "[not set]",
"Path": "[not set]",
"State": "CS_DIRTY",
"Flags": 0,
"CFlags": 0,
"Socket": "udp:10.0.0.116:5060",
"Methods": 5087,
"Ruid": "uloc-60c7716f-21cf-2",
"Instance": "[not set]",
"Reg-Id": 0,
"Server-Id": 0,
"Tcpconn-Id": -1,
"Keepalive": 0,
"Last-Keepalive": 1623688248,
"KA-Roundtrip": 0,
"Last-Modified": 1623688248
}
}]
}
}
],
"Stats": {
"Records": 2,
"Max-Slots": 1
}
}
}]
},
"id": 46452
}
Asterisk Logs
<--- Received SIP request (411 bytes) from UDP:10.0.0.116:5060 --->
REGISTER sip:localhost:5080 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bKe186.b9964c33000000000000000000000000.0
To: <sip:102@localhost>
From: <sip:102@localhost>;tag=3393f0703fb0ccaca74109ff37de39f5-7c38ff3a
CSeq: 10 REGISTER
Call-ID: 5c48c0100ccf804b-9474@127.0.0.1
Max-Forwards: 70
Content-Length: 0
User-Agent: kamailio (5.5.0 (x86_64/linux))
Contact: <sip:102@localhost:5060>
Expires: 60
<--- Transmitting SIP response (547 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bKe186.b9964c33000000000000000000000000.0
Call-ID: 5c48c0100ccf804b-9474@127.0.0.1
From: <sip:102@localhost>;tag=3393f0703fb0ccaca74109ff37de39f5-7c38ff3a
To: <sip:102@localhost>;tag=z9hG4bKe186.b9964c33000000000000000000000000.0
CSeq: 10 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1623686053/447282fc71f803d6671d6eda7e038a7c",opaque="6e25258e10f76405",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.4.0
Content-Length: 0
If I try to make a call from my semi-registered endpoints I get 100-Trying followed by the 500 - Service Unavailable from both Kamailio and Asterisk. Below are the logs from Asterisk
<--- Received SIP request (1041 bytes) from UDP:10.0.0.116:5060 --->
INVITE sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Record-Route: <sip:10.0.0.116;lr;ftag=51ca0752>
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bKbd72.e074883d723e892e2f4d88e09655b471.0
Via: SIP/2.0/UDP 10.0.0.115:41348;received=10.0.0.115;branch=z9hG4bK-524287-1---4696a585dedddc45;rport=41348
Max-Forwards: 69
Contact: <sip:102@10.0.0.115:41348;transport=UDP>
To: <sip:101@10.0.0.116:5060>
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=51ca0752
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.12 v2.10.13.2
Allow-Events: presence, kpml, talk
Content-Length: 328
v=0
o=Z 1623687109485 1 IN IP4 10.0.0.115
s=Z
c=IN IP4 10.0.0.115
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (665 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bKbd72.e074883d723e892e2f4d88e09655b471.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---4696a585dedddc45
Record-Route: <sip:10.0.0.116;lr;ftag=51ca0752>
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
From: <sip:102@10.0.0.116>;tag=51ca0752
To: <sip:101@10.0.0.116>;tag=z9hG4bKbd72.e074883d723e892e2f4d88e09655b471.0
CSeq: 2 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1623687109/a11d3cc17fa0fb4140877e94cdcb47b9",opaque="4aceccb6629e4c9c",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.4.0
Content-Length: 0
<--- Received SIP request (358 bytes) from UDP:10.0.0.116:5060 --->
ACK sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bKbd72.e074883d723e892e2f4d88e09655b471.0
Max-Forwards: 69
To: <sip:101@10.0.0.116>;tag=z9hG4bKbd72.e074883d723e892e2f4d88e09655b471.0
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=51ca0752
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
CSeq: 2 ACK
Content-Length: 0
<--- Received SIP request (1339 bytes) from UDP:10.0.0.116:5060 --->
INVITE sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Record-Route: <sip:10.0.0.116;lr;ftag=51ca0752>
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bKcd72.8f6892a9c0174bbd1781fef8c8a8f14b.0
Via: SIP/2.0/UDP 10.0.0.115:41348;received=10.0.0.115;branch=z9hG4bK-524287-1---4b7566e6eb57a703;rport=41348
Max-Forwards: 69
Contact: <sip:102@10.0.0.115:41348;transport=UDP>
To: <sip:101@10.0.0.116:5060>
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=51ca0752
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
CSeq: 3 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.12 v2.10.13.2
Authorization: Digest username="102",realm="asterisk",nonce="1623687109/a11d3cc17fa0fb4140877e94cdcb47b9",uri="sip:101@10.0.0.116:5060;transport=UDP",response="b56c8dfd2856883ad465512e86a3953e",cnonce="f318efa24f1be2edc84a932fe2a6c79d",nc=00000001,qop=auth,algorithm=md5,opaque="4aceccb6629e4c9c"
Allow-Events: presence, kpml, talk
Content-Length: 328
v=0
o=Z 1623687109485 1 IN IP4 10.0.0.115
s=Z
c=IN IP4 10.0.0.115
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (462 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bKcd72.8f6892a9c0174bbd1781fef8c8a8f14b.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---4b7566e6eb57a703
Record-Route: <sip:10.0.0.116;lr;ftag=51ca0752>
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
From: <sip:102@10.0.0.116>;tag=51ca0752
To: <sip:101@10.0.0.116>
CSeq: 3 INVITE
Server: Asterisk PBX 18.4.0
Content-Length: 0
-- Executing [101@testing:1] NoOp("PJSIP/102-00000000", "") in new stack
-- Executing [101@testing:2] Dial("PJSIP/102-00000000", "") in new stack
-- No devices or endpoints to dial (technology/resource)
-- Auto fallthrough, channel 'PJSIP/102-00000000' status is 'CHANUNAVAIL'
<--- Transmitting SIP response (540 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bKcd72.8f6892a9c0174bbd1781fef8c8a8f14b.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---4b7566e6eb57a703
Record-Route: <sip:10.0.0.116;lr;ftag=51ca0752>
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
From: <sip:102@10.0.0.116>;tag=51ca0752
To: <sip:101@10.0.0.116>;tag=35ab10b7-63ad-4ecb-bd8a-316eb5a140fb
CSeq: 3 INVITE
Server: Asterisk PBX 18.4.0
Reason: Q.850;cause=34
Content-Length: 0
<--- Received SIP request (348 bytes) from UDP:10.0.0.116:5060 --->
ACK sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bKcd72.8f6892a9c0174bbd1781fef8c8a8f14b.0
Max-Forwards: 69
To: <sip:101@10.0.0.116>;tag=35ab10b7-63ad-4ecb-bd8a-316eb5a140fb
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=51ca0752
Call-ID: U3uG3IVPsvIZxR-3U4QbcQ..
CSeq: 3 ACK
Content-Length: 0
It is clear to me that my Kamailio is somehow able to use the Asterisk’s realtime db and authenticate however it seems the Asterisk is not aware that these users are registered. I’m not surprised that Asterisk complains “No devices or endpoints to dial (technology/resource)” since I could not see my endpoints on the CLI.
However the interesting part is; if I register an endpoint directly, by only using Asterisk (registering through port 5080), the kamailio-registered users are able to call the asterisk-registered ones (but not vice-versa). So although they appear offline from Asterisk’s side and not able to receive calls, they are able to make calls to other online users. Below are the logs from Asterisk for this scenario.
<--- Received SIP request (1041 bytes) from UDP:10.0.0.116:5060 --->
INVITE sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Record-Route: <sip:10.0.0.116;lr;ftag=722c1558>
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bK291b.f357491517345f60e00930360d573c92.0
Via: SIP/2.0/UDP 10.0.0.115:41348;received=10.0.0.115;branch=z9hG4bK-524287-1---1b5a025756044343;rport=41348
Max-Forwards: 69
Contact: <sip:102@10.0.0.115:41348;transport=UDP>
To: <sip:101@10.0.0.116:5060>
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=722c1558
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.12 v2.10.13.2
Allow-Events: presence, kpml, talk
Content-Length: 328
v=0
o=Z 1623688810957 1 IN IP4 10.0.0.115
s=Z
c=IN IP4 10.0.0.115
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (665 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bK291b.f357491517345f60e00930360d573c92.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---1b5a025756044343
Record-Route: <sip:10.0.0.116;lr;ftag=722c1558>
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
From: <sip:102@10.0.0.116>;tag=722c1558
To: <sip:101@10.0.0.116>;tag=z9hG4bK291b.f357491517345f60e00930360d573c92.0
CSeq: 2 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1623688811/41cd1e9dd1dca4b25cf96eaff94cf251",opaque="4be8ac5a643c8ec8",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.4.0
Content-Length: 0
<--- Received SIP request (358 bytes) from UDP:10.0.0.116:5060 --->
ACK sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bK291b.f357491517345f60e00930360d573c92.0
Max-Forwards: 69
To: <sip:101@10.0.0.116>;tag=z9hG4bK291b.f357491517345f60e00930360d573c92.0
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=722c1558
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
CSeq: 2 ACK
Content-Length: 0
<--- Received SIP request (1339 bytes) from UDP:10.0.0.116:5060 --->
INVITE sip:101@10.0.0.116:5060;transport=UDP SIP/2.0
Record-Route: <sip:10.0.0.116;lr;ftag=722c1558>
Via: SIP/2.0/UDP 10.0.0.116;branch=z9hG4bK391b.a683c4bac3da18d7a384f7cf517b6975.0
Via: SIP/2.0/UDP 10.0.0.115:41348;received=10.0.0.115;branch=z9hG4bK-524287-1---b09caa8639e8b115;rport=41348
Max-Forwards: 69
Contact: <sip:102@10.0.0.115:41348;transport=UDP>
To: <sip:101@10.0.0.116:5060>
From: <sip:102@10.0.0.116:5060;transport=UDP>;tag=722c1558
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
CSeq: 3 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.12 v2.10.13.2
Authorization: Digest username="102",realm="asterisk",nonce="1623688811/41cd1e9dd1dca4b25cf96eaff94cf251",uri="sip:101@10.0.0.116:5060;transport=UDP",response="a95f147a032daee8654274dd6ed3fd37",cnonce="53456f5a037bc4ef60a841e1ff9a4b97",nc=00000001,qop=auth,algorithm=md5,opaque="4be8ac5a643c8ec8"
Allow-Events: presence, kpml, talk
Content-Length: 328
v=0
o=Z 1623688810957 1 IN IP4 10.0.0.115
s=Z
c=IN IP4 10.0.0.115
t=0 0
m=audio 8000 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
<--- Transmitting SIP response (462 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bK391b.a683c4bac3da18d7a384f7cf517b6975.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---b09caa8639e8b115
Record-Route: <sip:10.0.0.116;lr;ftag=722c1558>
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
From: <sip:102@10.0.0.116>;tag=722c1558
To: <sip:101@10.0.0.116>
CSeq: 3 INVITE
Server: Asterisk PBX 18.4.0
Content-Length: 0
-- Executing [101@testing:1] NoOp("PJSIP/102-00000005", "") in new stack
-- Executing [101@testing:2] Dial("PJSIP/102-00000005", "PJSIP/101/sip:101@10.0.0.100:44042;transport=UDP;rinstance=059e5a3c5f9bffb6") in new stack
-- Called PJSIP/101/sip:101@10.0.0.100:44042;transport=UDP;rinstance=059e5a3c5f9bffb6
<--- Transmitting SIP request (947 bytes) to UDP:10.0.0.100:44042 --->
INVITE sip:101@10.0.0.100:44042;transport=UDP;rinstance=059e5a3c5f9bffb6 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116:5080;rport;branch=z9hG4bKPj58c17fc1-06ce-4a0a-904d-096cc39bd888
From: <sip:102@10.0.0.116>;tag=321199ea-3acd-42a5-89c1-659dca60b069
To: <sip:101@10.0.0.100;rinstance=059e5a3c5f9bffb6>
Contact: <sip:asterisk@10.0.0.116:5080>
Call-ID: 3d7c5fa4-c072-4d04-bf34-5b052ad06d1c
CSeq: 13112 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.4.0
Content-Type: application/sdp
Content-Length: 231
v=0
o=- 778574967 778574967 IN IP4 10.0.0.116
s=Asterisk
c=IN IP4 10.0.0.116
t=0 0
m=audio 12890 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<--- Received SIP response (328 bytes) from UDP:10.0.0.100:44042 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.116:5080;rport=5080;branch=z9hG4bKPj58c17fc1-06ce-4a0a-904d-096cc39bd888
To: <sip:101@10.0.0.100;rinstance=059e5a3c5f9bffb6>
From: <sip:102@10.0.0.116>;tag=321199ea-3acd-42a5-89c1-659dca60b069
Call-ID: 3d7c5fa4-c072-4d04-bf34-5b052ad06d1c
CSeq: 13112 INVITE
Content-Length: 0
<--- Received SIP response (535 bytes) from UDP:10.0.0.100:44042 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.0.116:5080;rport=5080;branch=z9hG4bKPj58c17fc1-06ce-4a0a-904d-096cc39bd888
Contact: <sip:101@10.0.0.100:44042>
To: <sip:101@10.0.0.100;rinstance=059e5a3c5f9bffb6>;tag=00ad4401
From: <sip:102@10.0.0.116>;tag=321199ea-3acd-42a5-89c1-659dca60b069
Call-ID: 3d7c5fa4-c072-4d04-bf34-5b052ad06d1c
CSeq: 13112 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.4.12 v2.10.13.2-mod
Allow-Events: presence, kpml, talk
Content-Length: 0
-- PJSIP/101-00000006 is ringing
<--- Transmitting SIP response (647 bytes) to UDP:10.0.0.116:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.0.116;rport=5060;received=10.0.0.116;branch=z9hG4bK391b.a683c4bac3da18d7a384f7cf517b6975.0
Via: SIP/2.0/UDP 10.0.0.115:41348;rport=41348;received=10.0.0.115;branch=z9hG4bK-524287-1---b09caa8639e8b115
Record-Route: <sip:10.0.0.116;lr;ftag=722c1558>
Call-ID: eSAgST8AWS9BGCkLJsDrzw..
From: <sip:102@10.0.0.116>;tag=722c1558
To: <sip:101@10.0.0.116>;tag=4210f8b6-ea80-4414-8739-0f664c53cb38
CSeq: 3 INVITE
Server: Asterisk PBX 18.4.0
Contact: <sip:10.0.0.116:5080>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Content-Length: 0
<--- Received SIP response (932 bytes) from UDP:10.0.0.100:44042 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.116:5080;rport=5080;branch=z9hG4bKPj58c17fc1-06ce-4a0a-904d-096cc39bd888
Require: timer
Contact: <sip:101@10.0.0.100:44042>
To: <sip:101@10.0.0.100;rinstance=059e5a3c5f9bffb6>;tag=00ad4401
From: <sip:102@10.0.0.116>;tag=321199ea-3acd-42a5-89c1-659dca60b069
Call-ID: 3d7c5fa4-c072-4d04-bf34-5b052ad06d1c
CSeq: 13112 INVITE
Session-Expires: 1800;refresher=uac
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
User-Agent: Z 5.4.12 v2.10.13.2-mod
Allow-Events: presence, kpml, talk
Content-Length: 316
v=0
o=Z 0 1 IN IP4 10.0.0.100
s=Z
c=IN IP4 10.0.0.100
t=0 0
m=audio 8000 RTP/AVP 0 106 9 8 3 101 98
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=sendrecv
> 0x7f5fb4047800 -- Strict RTP learning after remote address set to: 10.0.0.100:8000
<--- Transmitting SIP request (403 bytes) to UDP:10.0.0.100:44042 --->
ACK sip:101@10.0.0.100:44042 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.116:5080;rport;branch=z9hG4bKPj9db6ecdb-99ac-4661-bc96-3069ac37df80
From: <sip:102@10.0.0.116>;tag=321199ea-3acd-42a5-89c1-659dca60b069
To: <sip:101@10.0.0.100;rinstance=059e5a3c5f9bffb6>;tag=00ad4401
Call-ID: 3d7c5fa4-c072-4d04-bf34-5b052ad06d1c
CSeq: 13112 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 18.4.0
Content-Length: 0
> 0x7f5fb4047800 -- Strict RTP switching to RTP target address 10.0.0.100:8000 as source
-- PJSIP/101-00000006 answered PJSIP/102-00000005
> 0x7f5fb409c610 -- Strict RTP learning after remote address set to: 10.0.0.115:8000
MY CONFIG
/etc/asterisk/extconfig.conf
[settings]
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk
/etc/asterisk/extensions.conf
[testing]
exten => _1XX,1,NoOp()
same => n,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})
/etc/asterisk/extconfig.conf
[settings]
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk
/etc/asterisk/res_odbc.conf
[asterisk]
enabled =>yes
dsn =>asterisk
username =>root
password =>verysecretpassword
pre-connect =>yes
**/etc/odbc.ini **
[asterisk]
Driver= MySQL
Description= MySQL connection to ‘asterisk’ database
Server=localhost
Port=3306
Database=asterisk
UserName=root
Password=verysecretpassword
Socket= /var/run/mysqld/mysqld.sock
**/etc/odbcinst.ini **
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
UsageCount=2
[MySQL ODBC 8.0 Unicode Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
UsageCount=1
[MySQL ODBC 8.0 ANSI Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8a.so
UsageCount=1
I am terribly sorry for the extremely long post. Frankly, I’m surprised that I made this far. And I feel like I’m pretty close too. But I have been working on this issue for the last few days and I feel like I can’t generate new theories about why would my config not work. My suspicions is that there is something wrong with my kamailio.cfg? Your help is much appreciated