PJSIP Trunk issues

Hello
We have 3 servers connected together via PJSIP
Master server and Slave 1 /2 server.
Master server also has several generic (chan_sip) trunks.
Slave server has IP phones connected.
Each slave server is registering with Master. Server 2 is behind the NAT. Master is not.
PJSIP trunk is using TLS.

  1. Issues with INVITE auth.
    For some reason we cannot use fromuser= and fromdomain= values in the endpoint section on the slave, because in this case, the original (IP Phone) caller ID is lost in the Master server CDR database.
    So when Master server receives a call from Slave, the is a NOTICE message generated and it is flooding the log. ([Feb 27 15:38:09] NOTICE[7255] res_pjsip/pjsip_distributor.c: Request ‘INVITE’ from ‘"" sip:+0111@192.168.54.19’ failed for ‘192.168.54.19:51216’ (callid: 3f0310e6-0978-45a3-9f9c-e0a6d71c4aed) - No matching endpoint found)
    This is not an error, because WWW authentication is used.
    How to completely disable this message? (We cannot change verbose level)

  2. Issues with audio coming from Slave 2
    Slave2 makes call to Master extension. Master sever dials out a chan_sip trunk.
    In the tcpdump i see that correct IP:port packets are sending from Slave to Master, but Master server doesn’t passes anything to chan_sip trunk. Every endpoint is configured with directmedia=no parameter.

btw, setting identify_by=auth_username on the master has no effect on ‘NOTICE’ message.

Have you tried adding these options to slaves servers

send_pai
send_rpid

and on master

trust_id_inbound

No effect at all.
How to disable this notice messages and to force WWW-auth?

[Feb 28 17:01:58] INVITE sip:0188@master:5061 SIP/2.0
[Feb 28 17:01:58] Via: SIP/2.0/TLS 195.58.25.218:5061;rport;branch=z9hG4bKPjbdb4337b-4420-4dc5-98ed-348d25db989d;alias
[Feb 28 17:01:58] From: “” sip:+0299@192.168.54.19;tag=7247daca-2cb0-4c50-889f-13debc3b713d
[Feb 28 17:01:58] To: sip:0188@master
[Feb 28 17:01:58] Contact: sip:asterisk@195.58.25.218:5061;transport=TLS
[Feb 28 17:01:58] Call-ID: cb61fbec-398c-463c-aacb-c94601fce6d5
[Feb 28 17:01:58] CSeq: 15234 INVITE
[Feb 28 17:01:58] Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
[Feb 28 17:01:58] Supported: 100rel, timer, replaces, norefersub
[Feb 28 17:01:58] Session-Expires: 1800
[Feb 28 17:01:58] Min-SE: 90
[Feb 28 17:01:58] Max-Forwards: 70
[Feb 28 17:01:58] User-Agent: Asterisk PBX 13.30.0
[Feb 28 17:01:58] Content-Type: application/sdp
[Feb 28 17:01:58] Content-Length: 263
[Feb 28 17:01:58]
[Feb 28 17:01:58] v=0
[Feb 28 17:01:58] o=- 1268399118 1268399118 IN IP4 195.58.25.218
[Feb 28 17:01:58] s=Asterisk
[Feb 28 17:01:58] c=IN IP4 195.58.25.218
[Feb 28 17:01:58] t=0 0
[Feb 28 17:01:58] m=audio 17810 RTP/AVP 8 0 101
[Feb 28 17:01:58] a=rtpmap:8 PCMA/8000
[Feb 28 17:01:58] a=rtpmap:0 PCMU/8000
[Feb 28 17:01:58] a=rtpmap:101 telephone-event/8000
[Feb 28 17:01:58] a=fmtp:101 0-16
[Feb 28 17:01:58] a=ptime:20
[Feb 28 17:01:58] a=maxptime:150
[Feb 28 17:01:58] a=sendrecv
[Feb 28 17:01:58]
[Feb 28 17:01:58] NOTICE[31738]: res_pjsip/pjsip_distributor.c:666 log_failed_request: Request ‘INVITE’ from ‘"" sip:+0111@192.168.54.19’ failed for ‘192.168.54.19:46572’ (callid: cb61fbec-398c-463c-aacb-c94601fce6d5) - No matching endpoint found
[Feb 28 17:01:58] <— Transmitting SIP response (626 bytes) to TLS:192.168.54.19:46572 —>
[Feb 28 17:01:58] SIP/2.0 401 Unauthorized
[Feb 28 17:01:58] Via: SIP/2.0/TLS 195.58.25.218:5061;rport=46572;received=192.168.54.19;branch=z9hG4bKPjbdb4337b-4420-4dc5-98ed-348d25db989d;alias
[Feb 28 17:01:58] Call-ID: cb61fbec-398c-463c-aacb-c94601fce6d5
[Feb 28 17:01:58] From: “” sip:+0299@192.168.54.19;tag=7247daca-2cb0-4c50-889f-13debc3b713d
[Feb 28 17:01:58] To: sip:0188@master;tag=z9hG4bKPjbdb4337b-4420-4dc5-98ed-348d25db989d
[Feb 28 17:01:58] CSeq: 15234 INVITE
[Feb 28 17:01:58] WWW-Authenticate: Digest realm=“asterisk”,nonce=“1582898518/d986528a1bfdbadd9d4eb337406d082c”,opaque=“074684b82940e5d0”,algorithm=md5,qop=“auth”
[Feb 28 17:01:58] Server: Asterisk PBX 13.31.0
[Feb 28 17:01:58] Content-Length: 0
[Feb 28 17:01:58]
[Feb 28 17:01:58]
[Feb 28 17:01:58] <— Received SIP request (513 bytes) from TLS:192.168.54.19:46572 —>
[Feb 28 17:01:58] ACK sip:0188@master:5061 SIP/2.0
[Feb 28 17:01:58] Via: SIP/2.0/TLS 195.58.25.218:5061;rport;branch=z9hG4bKPjbdb4337b-4420-4dc5-98ed-348d25db989d;alias
[Feb 28 17:01:58] From: “” sip:+0299@192.168.54.19;tag=7247daca-2cb0-4c50-889f-13debc3b713d
[Feb 28 17:01:58] To: sip:0188@master;tag=z9hG4bKPjbdb4337b-4420-4dc5-98ed-348d25db989d
[Feb 28 17:01:58] Call-ID: cb61fbec-398c-463c-aacb-c94601fce6d5
[Feb 28 17:01:58] CSeq: 15234 ACK
[Feb 28 17:01:58] Max-Forwards: 70
[Feb 28 17:01:58] User-Agent: Asterisk PBX 13.30.0
[Feb 28 17:01:58] Content-Length: 0
[Feb 28 17:01:58]
[Feb 28 17:01:58]
[Feb 28 17:01:58] <— Received SIP request (1355 bytes) from TLS:192.168.54.19:46572 —>
[Feb 28 17:01:58] INVITE sip:0188@master:5061 SIP/2.0
[Feb 28 17:01:58] Via: SIP/2.0/TLS 195.58.25.218:5061;rport;branch=z9hG4bKPjf9540ee6-beab-461f-a8da-53ab843675a3;alias
[Feb 28 17:01:58] From: “” sip:+0299@192.168.54.19;tag=7247daca-2cb0-4c50-889f-13debc3b713d
[Feb 28 17:01:58] To: sip:0188@master
[Feb 28 17:01:58] Contact: sip:asterisk@195.58.25.218:5061;transport=TLS
[Feb 28 17:01:58] Call-ID: cb61fbec-398c-463c-aacb-c94601fce6d5
[Feb 28 17:01:58] CSeq: 15235 INVITE
[Feb 28 17:01:58] Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
[Feb 28 17:01:58] Supported: 100rel, timer, replaces, norefersub
[Feb 28 17:01:58] Session-Expires: 1800
[Feb 28 17:01:58] Min-SE: 90
[Feb 28 17:01:58] Max-Forwards: 70
[Feb 28 17:01:58] User-Agent: Asterisk PBX 13.30.0
[Feb 28 17:01:58] Authorization: Digest username=“ekt01asterisk02”, realm=“asterisk”, nonce=“1582898518/d986528a1bfdbadd9d4eb337406d082c”, uri=“sip:0188@master:5061”, response=“daec2858df9bdb3f616c37189cfc183b”, algorithm=md5, cnonce=“0aa69c6107a244a2896166ba9875c92e”, opaque=“074684b82940e5d0”, qop=auth, nc=00000001
[Feb 28 17:01:58] Content-Type: application/sdp
[Feb 28 17:01:58] Content-Length: 263
[Feb 28 17:01:58]
[Feb 28 17:01:58] v=0
[Feb 28 17:01:58] o=- 1268399118 1268399118 IN IP4 195.58.25.218
[Feb 28 17:01:58] s=Asterisk
[Feb 28 17:01:58] c=IN IP4 195.58.25.218
[Feb 28 17:01:58] t=0 0
[Feb 28 17:01:58] m=audio 17810 RTP/AVP 8 0 101
[Feb 28 17:01:58] a=rtpmap:8 PCMA/8000
[Feb 28 17:01:58] a=rtpmap:0 PCMU/8000
[Feb 28 17:01:58] a=rtpmap:101 telephone-event/8000
[Feb 28 17:01:58] a=fmtp:101 0-16
[Feb 28 17:01:58] a=ptime:20
[Feb 28 17:01:58] a=maxptime:150
[Feb 28 17:01:58] a=sendrecv
[Feb 28 17:01:58]

show the other part of the logs after this INVITE request please

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.