Hi,
We have 2 T1 connected to our Asterisk 13.4 and can only receive inbounds calls from one of the trunk because we cannot use the same ip address twice to identify anonymous requests.
The isdn to sip gateway has one ip address for both trunk and different port for each of the trunk.
The pjsip.conf below allows me to receive and make calls on TRUNK_1 but can only make outbound calls on TRUNK_2. I have tried setting up an anonymous endpoint in the pjsip file without success.
Is there any other way to accept inbound calls?
Here is my pjsip conf file:
;TRUNK 1 Inbound calls working from T1
[TRUNK_1]
type = aor
[color=#0000FF]contact = sip:XXX.XXX.XXX.40:5061[/color]
qualify_frequency = 60
[TRUNK_1]
type = identify
endpoint = TRUNK_1
[color=#00BF00]match = XXX.XXX.XXX.40[/color]
[TRUNK_1]
type = auth
username = username1
password = somepassword1
[TRUNK_1]
transport=transport-udp
type = endpoint
auth = TRUNK_1
outbound_auth = TRUNK_1
aors = TRUNK_1
context = FROM_PRI
dtmf_mode = info
disallow = all
allow = ulaw
ice_support = no
direct_media = no
;TRUNK 2 Inbound calls not working
[TRUNK_2]
type = aor
[color=#0000FF]contact = sip:XXX.XXX.XXX.40:5060[/color]
qualify_frequency = 60
[TRUNK_2]
type = identify
endpoint = TRUNK_2
;[color=#BF0000]match = XXX.XXX.XXX.40 (CANNOT USE SAME IP ADDRESS HERE)[/color]
[TRUNK_2]
type = auth
username = username2
password = somepassword2
[TRUNK_2]
transport=transport-udp
type = endpoint
auth = TRUNK_2
outbound_auth = TRUNK_2
aors = TRUNK_2
context = TO_PRI_2
dtmf_mode = info
disallow = all
allow = ulaw
ice_support = no
direct_media = no
jcolp
June 15, 2015, 12:13pm
2
What does the SIP messages show for an INVITE from trunk 2? (‘pjsip set logger on’ will turn on the logging). What is the dialplan logic? What is the device in use?
The gateway is a Mediatrix 3532 and the phone is a Cisco spa514G.
Here’s my dialplan for incoming call on TRUNK 2:
[TO_PRI_2]
exten => 7808310,1,NoOp()
same => n,Answer()
same => n,Dial(PJSIP/U_6986,20) ;Dial
same => n,Hangup()
Here is the logger:
<— Received SIP request (902 bytes) from UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] INVITE sip:7808310@xxx.xxx.xxx.52 SIP/2.0
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;branch=z9hG4bK7b455bc80bd2edb18
[Jun 15 08:23:40] Max-Forwards: 70
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] CSeq: 1546058195 INVITE
[Jun 15 08:23:40] Allow: INVITE, ACK, BYE, CANCEL, REFER, NOTIFY, UPDATE
[Jun 15 08:23:40] Contact: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.40:5060;transport=udp
[Jun 15 08:23:40] Min-SE: 1800
[Jun 15 08:23:40] Session-Expires: 3600
[Jun 15 08:23:40] Supported: sdp-anat
[Jun 15 08:23:40] Supported: timer
[Jun 15 08:23:40] Supported: replaces
[Jun 15 08:23:40] User-Agent: Mediatrix 3301-001/v2.0.31.571 3XXX-MX-D2000-156
[Jun 15 08:23:40] Content-Type: application/sdp
[Jun 15 08:23:40] Content-Length: 273
[Jun 15 08:23:40]
[Jun 15 08:23:40] v=0
[Jun 15 08:23:40] o=MxSIP 2059995793615410128 2108835271198510046 IN IP4 xxx.xxx.xxx.40
[Jun 15 08:23:40] s=-
[Jun 15 08:23:40] c=IN IP4 xxx.xxx.xxx.40
[Jun 15 08:23:40] t=0 0
[Jun 15 08:23:40] a=sendrecv
[Jun 15 08:23:40] m=audio 10002 RTP/AVP 0 124 125 126
[Jun 15 08:23:40] a=rtpmap:0 PCMU/8000
[Jun 15 08:23:40] a=rtpmap:124 CLEARMODE/8000
[Jun 15 08:23:40] a=rtpmap:125 X-CLEAR-CHANNEL/8000
[Jun 15 08:23:40] a=rtpmap:126 X-CCD/8000
[Jun 15 08:23:40]
[Jun 15 08:23:40] <— Transmitting SIP response (512 bytes) to UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] SIP/2.0 401 Unauthorized
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;rport=5060;received=xxx.xxx.xxx.40;branch=z9hG4bK7b455bc80bd2edb18
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52 ;tag=z9hG4bK7b455bc80bd2edb18
[Jun 15 08:23:40] CSeq: 1546058195 INVITE
[Jun 15 08:23:40] WWW-Authenticate: Digest realm=“asterisk”,nonce=“1434371020/6b2f926090720f7d47bdb975d150b8e8”,opaque=“1b62241761bd559e”,algorithm=md5,qop=“auth”
[Jun 15 08:23:40] Server: Asterisk PBX 13.4.0
[Jun 15 08:23:40] Content-Length: 0
[Jun 15 08:23:40]
[Jun 15 08:23:40]
[Jun 15 08:23:40] <— Received SIP request (391 bytes) from UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] ACK sip:7808310@xxx.xxx.xxx.52 SIP/2.0
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;branch=z9hG4bK7b455bc80bd2edb18
[Jun 15 08:23:40] Max-Forwards: 70
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52 ;tag=z9hG4bK7b455bc80bd2edb18
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] CSeq: 1546058195 ACK
[Jun 15 08:23:40] User-Agent: Mediatrix 3301-001/v2.0.31.571 3XXX-MX-D2000-156
[Jun 15 08:23:40] Content-Length: 0
[Jun 15 08:23:40]
[Jun 15 08:23:40]
[Jun 15 08:23:40] <— Received SIP request (1170 bytes) from UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] INVITE sip:7808310@xxx.xxx.xxx.52 SIP/2.0
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;branch=z9hG4bK1c62ea157e08f9560
[Jun 15 08:23:40] Max-Forwards: 70
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] CSeq: 1546058196 INVITE
[Jun 15 08:23:40] Allow: INVITE, ACK, BYE, CANCEL, REFER, NOTIFY, UPDATE
[Jun 15 08:23:40] Authorization: Digest username=“PBXTrunk”,realm=“asterisk”,nonce=“1434371020/6b2f926090720f7d47bdb975d150b8e8”,uri=“sip:7808310@xxx.xxx.xxx.52”,response=“0ad05ef9cf9c9e843776621c09d40540”,algorithm=md5,opaque=“1b62241761bd559e”,qop=auth,cnonce=“24f5d54a”,nc=00000001
[Jun 15 08:23:40] Contact: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.40:5060;transport=udp
[Jun 15 08:23:40] Min-SE: 1800
[Jun 15 08:23:40] Session-Expires: 3600
[Jun 15 08:23:40] Supported: sdp-anat
[Jun 15 08:23:40] Supported: timer
[Jun 15 08:23:40] Supported: replaces
[Jun 15 08:23:40] User-Agent: Mediatrix 3301-001/v2.0.31.571 3XXX-MX-D2000-156
[Jun 15 08:23:40] Content-Type: application/sdp
[Jun 15 08:23:40] Content-Length: 273
[Jun 15 08:23:40]
[Jun 15 08:23:40] v=0
[Jun 15 08:23:40] o=MxSIP 2059995793615410128 2108835271198510046 IN IP4 xxx.xxx.xxx.40
[Jun 15 08:23:40] s=-
[Jun 15 08:23:40] c=IN IP4 xxx.xxx.xxx.40
[Jun 15 08:23:40] t=0 0
[Jun 15 08:23:40] a=sendrecv
[Jun 15 08:23:40] m=audio 10002 RTP/AVP 0 124 125 126
[Jun 15 08:23:40] a=rtpmap:0 PCMU/8000
[Jun 15 08:23:40] a=rtpmap:124 CLEARMODE/8000
[Jun 15 08:23:40] a=rtpmap:125 X-CLEAR-CHANNEL/8000
[Jun 15 08:23:40] a=rtpmap:126 X-CCD/8000
[Jun 15 08:23:40]
[Jun 15 08:23:40] <— Transmitting SIP response (512 bytes) to UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] SIP/2.0 401 Unauthorized
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;rport=5060;received=xxx.xxx.xxx.40;branch=z9hG4bK1c62ea157e08f9560
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52 ;tag=z9hG4bK1c62ea157e08f9560
[Jun 15 08:23:40] CSeq: 1546058196 INVITE
[Jun 15 08:23:40] WWW-Authenticate: Digest realm=“asterisk”,nonce=“1434371020/6b2f926090720f7d47bdb975d150b8e8”,opaque=“76a637510b90023a”,algorithm=md5,qop=“auth”
[Jun 15 08:23:40] Server: Asterisk PBX 13.4.0
[Jun 15 08:23:40] Content-Length: 0
[Jun 15 08:23:40]
[Jun 15 08:23:40]
[Jun 15 08:23:40] <— Received SIP request (391 bytes) from UDP:xxx.xxx.xxx.40:5060 —>
[Jun 15 08:23:40] ACK sip:7808310@xxx.xxx.xxx.52 SIP/2.0
[Jun 15 08:23:40] Via: SIP/2.0/UDP xxx.xxx.xxx.40:5060;branch=z9hG4bK1c62ea157e08f9560
[Jun 15 08:23:40] Max-Forwards: 70
[Jun 15 08:23:40] From: “MIKE HOLMES” sip:4184553252@xxx.xxx.xxx.52 ;tag=1523b77026
[Jun 15 08:23:40] To: sip:7808310@xxx.xxx.xxx.52 ;tag=z9hG4bK1c62ea157e08f9560
[Jun 15 08:23:40] Call-ID: ea5e49b155250e1a
[Jun 15 08:23:40] CSeq: 1546058196 ACK
[Jun 15 08:23:40] User-Agent: Mediatrix 3301-001/v2.0.31.571 3XXX-MX-D2000-156
[Jun 15 08:23:40] Content-Length: 0
jcolp
June 15, 2015, 1:38pm
4
There’s nothing really identifying it as coming from a second port. The only thing to do is send them to the same context and direct accordingly.