Hello!
Asterisk 13.6.0, outbound registration, problem with setting up handling of incoming calls.
I have a 1:1 NAT with whitelisted 5060 (sip) and rtp ports, realtime and a registered outbound trunk.
When I dial in, I get an INVITE, a 488 code and an ACK. And some stuff in between, but nothing catches my eye. I lost hours on this, still no clue. Any idea what might be the problem here?
[Jan 11 22:16:03] DEBUG[2761]: pjsip:0 <?>: sip_endpoint.c Processing incoming message: Request msg INVITE/cseq=10 (rdata0xb750321c)
<--- Received SIP request (994 bytes) from UDP:195.34.155.139:5060 --->
INVITE sip:012345678@XXX.XXX.XXX.XXX:5060 SIP/2.0
Via: SIP/2.0/UDP 195.34.155.139:5060;branch=z9hG4bK42j8be003861up802040.1
Max-Forwards: 31
From: "0666666666" <sip:0666666666@YYY.YYY.YYY.YYY>;tag=106BC4D6-56941B8D00012EF7-B6A6CB90
To: <sip:012345678@ZZZ.ZZZ.ZZZ.ZZZ>
CSeq: 10 INVITE
Call-ID: 3250064791112016221555@YYY.YYY.YYY.YYY_b2b-1
Contact: <sip:0666666666@195.34.155.139:5060;transport=udp>
P-Asserted-Identity: <sip:0666666666@YYY.YYY.YYY.YYY>
Content-Type: application/sdp
Content-Length: 470
v=0
o=AudiocodesGW 324996355 324996081 IN IP4 195.34.155.139
s=Phone-Call
c=IN IP4 195.34.155.139
t=0 0
m=audio 55238 RTP/AVP 8 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
m=image 55376 udptl t38
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxMaxBuffer:3000
a=T38FaxMaxDatagram:560
a=T38FaxRateManagement:transferredTCF
a=T38FaxUdpEC:t38UDPRedundancy
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139:5060' into...
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port '5060'.
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '0.0.0.0:5060' into...
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '0.0.0.0' and port '5060'.
[Jan 11 22:16:03] DEBUG[2755]: threadpool.c:508 grow: Increasing threadpool SIP's size by 5
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: sip_endpoint.c Distributing rdata to modules: Request msg INVITE/cseq=10 (rdata0xb7507d54)
[Jan 11 22:16:03] DEBUG[3146]: res_config_odbc.c:113 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_endpoint_id_ips WHERE id LIKE ? ORDER BY id
[Jan 11 22:16:03] DEBUG[3146]: res_config_odbc.c:129 custom_prepare: Parameter 1 ('id LIKE') = '%'
[Jan 11 22:16:03] DEBUG[3146]: res_odbc.c:1057 odbc_release_obj2: odbc_release_obj2(0x9007fbc) called (obj->txf = (nil))
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting 'siptrunk.upc.at' into...
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:226 ast_sockaddr_split_hostport: ...host 'siptrunk.upc.at' and port ''.
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139' into...
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port ''.
[Jan 11 22:16:03] DEBUG[3146]: acl.c:661 ast_append_ha: 195.34.155.139:0/255.255.255.255:0 sense 0 appended to ACL
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139' into...
[Jan 11 22:16:03] DEBUG[3146]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port ''.
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_endpoint_identifier_ip.c:108 ip_identify_match_check: Source address 195.34.155.139:5060 matches identify '0316225665'
[Jan 11 22:16:03] DEBUG[3146]: res_config_odbc.c:113 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_endpoints WHERE id = ?
[Jan 11 22:16:03] DEBUG[3146]: res_config_odbc.c:129 custom_prepare: Parameter 1 ('id') = '0316225665'
[Jan 11 22:16:03] DEBUG[3146]: res_odbc.c:1057 odbc_release_obj2: odbc_release_obj2(0x9007fbc) called (obj->txf = (nil))
[Jan 11 22:16:03] DEBUG[3146]: res_sorcery_realtime.c:119 sorcery_realtime_filter_objectset: Filtering out realtime field 'disallow' from retrieval
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [1800] in [-2147483648, 2147483647] gives [1800](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [90] in [-2147483648, 2147483647] gives [90](0)
[Jan 11 22:16:03] DEBUG[3146]: config.c:3544 ast_parse_arg: extract int from [0] in [-2147483648, 2147483647] gives [0](0)
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_endpoint_identifier_ip.c:143 ip_identify: Retrieved endpoint 0316225665
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: tsx0x93e22d4 ..Transaction created for Request msg INVITE/cseq=10 (rdata0xb7507d54)
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: tsx0x93e22d4 .Incoming Request msg INVITE/cseq=10 (rdata0xb7507d54) in state Null
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: tsx0x93e22d4 ..State changed from Null to Trying, event=RX_MSG
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 ...Transaction tsx0x93e22d4 state changed to Trying
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 .UAS dialog created
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 .Module mod-invite added as dialog usage, data=0x91c94bc
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 ..Session count inc to 2 by mod-invite
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: inv0xb730ffd4 .UAS invite session created for dialog dlg0xb730ffd4
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 .Module Session Module added as dialog usage, data=(nil)
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 ..Session count inc to 2 by Session Module
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:263 handle_incoming_sdp: Negotiating incoming SDP media stream 'audio' using audio SDP handler
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port ''.
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:429 ast_rtp_instance_new: Using engine 'asterisk' for RTP instance '0x93df20c'
[Jan 11 22:16:03] DEBUG[3147]: res_rtp_asterisk.c:2532 ast_rtp_new: Allocated port 14768 for RTP instance '0x93df20c'
[Jan 11 22:16:03] DEBUG[3147]: res_rtp_asterisk.c:2559 ast_rtp_new: Creating ICE session 0.0.0.0:14768 (14768) for RTP instance '0x93df20c'
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: icess0x93e088c ICE session created, comp_cnt=2, role is Unknown agent
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '10.0.2.9' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '10.0.2.9' and port ''.
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: icess0x93e088c Candidate 0 added: comp_id=1, type=host, foundation=Ha000209, addr=10.0.2.9:14768, base=10.0.2.9:14768, prio=0x7effffff (2130706431)
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:438 ast_rtp_instance_new: RTP instance '0x93df20c' is setup and ready to go
[Jan 11 22:16:03] DEBUG[3147]: res_rtp_asterisk.c:4766 ast_rtp_prop_set: Setup RTCP on RTP instance '0x93df20c'
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '10.0.2.9' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '10.0.2.9' and port ''.
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: icess0x93e088c Candidate 1 added: comp_id=2, type=host, foundation=Ha000209, addr=10.0.2.9:14769, base=10.0.2.9:14769, prio=0x7efffffe (2130706430)
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: icess0x93e088c Destroying ICE session 0x93e088c
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: stuse0x93f6aa8 STUN session 0x93f6ec4 destroy request, ref_cnt=4
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: stuse0x93f7a90 STUN session 0x93f7eac destroy request, ref_cnt=3
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: ice_session.c ICE session 0x93e088c destroyed
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: stun_session.c STUN session 0x93f6ec4 destroyed
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: stun_session.c STUN session 0x93f7eac destroyed
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:664 ast_rtp_codecs_payloads_set_m_type: Setting tx payload type 8 based on m type on 0xb74feb70
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:664 ast_rtp_codecs_payloads_set_m_type: Setting tx payload type 18 based on m type on 0xb74feb70
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:664 ast_rtp_codecs_payloads_set_m_type: Setting tx payload type 101 based on m type on 0xb74feb70
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:633 ast_rtp_codecs_payloads_copy: Copying payload 8 (0x93f6a74) from 0xb74feb70 to 0x93df3b8
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:633 ast_rtp_codecs_payloads_copy: Copying payload 18 (0x93fb0fc) from 0xb74feb70 to 0x93df3b8
[Jan 11 22:16:03] DEBUG[3147]: rtp_engine.c:633 ast_rtp_codecs_payloads_copy: Copying payload 101 (0x93fb0d4) from 0xb74feb70 to 0x93df3b8
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:273 handle_incoming_sdp: Media stream 'audio' handled by audio
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:263 handle_incoming_sdp: Negotiating incoming SDP media stream 'image' using image SDP handler
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: endpoint .Response msg 488/INVITE/cseq=10 (tdta0x93fb290) created
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: dlg0xb730ffd4 .Initial answer Response msg 488/INVITE/cseq=10 (tdta0x93fb290)
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2263 handle_outgoing_response: Method is INVITE, Response is 488 Not Acceptable Here
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: inv0xb730ffd4 .Sending Response msg 488/INVITE/cseq=10 (tdta0x93fb290)
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: dlg0xb730ffd4 ..Sending Response msg 488/INVITE/cseq=10 (tdta0x93fb290)
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: tsx0x93e22d4 ..Sending Response msg 488/INVITE/cseq=10 (tdta0x93fb290) in state Trying
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port ''.
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '0.0.0.0:5060' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '0.0.0.0' and port '5060'.
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139:5060' into...
[Jan 11 22:16:03] DEBUG[3147]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port '5060'.
<--- Transmitting SIP response (440 bytes) to UDP:195.34.155.139:5060 --->
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP 195.34.155.139:5060;rport=5060;received=195.34.155.139;branch=z9hG4bK42j8be003861up802040.1
Call-ID: 3250064791112016221555@YYY.YYY.YYY.YYY_b2b-1
From: "0666666666" <sip:0666666666@YYY.YYY.YYY.YYY>;tag=106BC4D6-56941B8D00012EF7-B6A6CB90
To: <sip:012345678@ZZZ.ZZZ.ZZZ.ZZZ>;tag=2a471cfc-4942-4be9-976a-a6e4fca4ef9f
CSeq: 10 INVITE
Server: Asterisk PBX 13.6.0
Content-Length: 0
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: tsx0x93e22d4 ...State changed from Trying to Completed, event=TX_MSG
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: dlg0xb730ffd4 ....Transaction tsx0x93e22d4 state changed to Completed
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2155 __print_debug_details: Function session_inv_on_state_changed called on event TSX_STATE
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2167 __print_debug_details: The state change pertains to the endpoint '0316225665()'
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2172 __print_debug_details: The inv session still has an invite_tsx (0x93e22d4)
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2187 __print_debug_details: There is no transaction involved in this state change
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2189 __print_debug_details: The current inv state is DISCONNCTD
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2345 session_inv_on_state_changed: Source of transaction state change is TX_MSG
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2275 handle_outgoing: Sending response
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2263 handle_outgoing_response: Method is INVITE, Response is 488 Not Acceptable Here
[Jan 11 22:16:03] DEBUG[3147]: pjsip:0 <?>: dlg0xb730ffd4 ......Session count dec to 3 by mod-invite
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2155 __print_debug_details: Function session_inv_on_tsx_state_changed called on event TSX_STATE
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2167 __print_debug_details: The state change pertains to the endpoint '0316225665()'
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2172 __print_debug_details: The inv session still has an invite_tsx (0x93e22d4)
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2178 __print_debug_details: The UAS INVITE transaction involved in this state change is 0x93e22d4
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2182 __print_debug_details: The current transaction state is Completed
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2184 __print_debug_details: The transaction state change event is TX_MSG
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2189 __print_debug_details: The current inv state is DISCONNCTD
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2275 handle_outgoing: Sending response
[Jan 11 22:16:03] DEBUG[3147]: res_pjsip_session.c:2263 handle_outgoing_response: Method is INVITE, Response is 488 Not Acceptable Here
[Jan 11 22:16:03] DEBUG[2761]: pjsip:0 <?>: sip_endpoint.c Processing incoming message: Request msg ACK/cseq=10 (rdata0xb750321c)
<--- Received SIP request (407 bytes) from UDP:195.34.155.139:5060 --->
ACK sip:012345678@XXX.XXX.XXX.XXX:5060 SIP/2.0
Via: SIP/2.0/UDP 195.34.155.139:5060;branch=z9hG4bK42j8be003861up802040.1
CSeq: 10 ACK
Max-Forwards: 31
From: "0666666666" <sip:0666666666@YYY.YYY.YYY.YYY>;tag=106BC4D6-56941B8D00012EF7-B6A6CB90
To: <sip:012345678@ZZZ.ZZZ.ZZZ.ZZZ>;tag=2a471cfc-4942-4be9-976a-a6e4fca4ef9f
Call-ID: 3250064791112016221555@YYY.YYY.YYY.YYY_b2b-1
Content-Length: 0
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '195.34.155.139:5060' into...
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '195.34.155.139' and port '5060'.
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:172 ast_sockaddr_split_hostport: Splitting '0.0.0.0:5060' into...
[Jan 11 22:16:03] DEBUG[2761]: netsock2.c:226 ast_sockaddr_split_hostport: ...host '0.0.0.0' and port '5060'.
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: sip_endpoint.c Distributing rdata to modules: Request msg ACK/cseq=10 (rdata0xb7507d54)
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: tsx0x93e22d4 .Incoming Request msg ACK/cseq=10 (rdata0xb7507d54) in state Completed
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: tsx0x93e22d4 ..State changed from Completed to Confirmed, event=RX_MSG
[Jan 11 22:16:03] DEBUG[3146]: pjsip:0 <?>: dlg0xb730ffd4 ...Transaction tsx0x93e22d4 state changed to Confirmed
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2155 __print_debug_details: Function session_inv_on_tsx_state_changed called on event TSX_STATE
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2167 __print_debug_details: The state change pertains to the endpoint '0316225665()'
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2172 __print_debug_details: The inv session still has an invite_tsx (0x93e22d4)
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2178 __print_debug_details: The UAS INVITE transaction involved in this state change is 0x93e22d4
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2182 __print_debug_details: The current transaction state is Confirmed
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2184 __print_debug_details: The transaction state change event is RX_MSG
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2189 __print_debug_details: The current inv state is DISCONNCTD
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2232 handle_incoming: Received request
[Jan 11 22:16:03] DEBUG[3146]: res_pjsip_session.c:2199 handle_incoming_request: Method is ACK
Bye,
Mara