No matching peer

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

No matching peer

Postby c20xh2 » Tue Mar 21, 2017 6:06 am

My inbound calls with twilio are not always successfull (half are rejected). Did a lot of try/error and finally find something that might be usefull. (system specs at the end of the post)

I'm pretty sure it's not coming from a NAT issue since I have been able to receive/send call on almost all of Twilios public IP.

The "PHONE NUMBER" used for both successfull and failed call is the same. What I don't understand is why asterisk is giving me

Code: Select all
[Mar 21 06:29:09] No matching peer for 'PHONE NUMBER' from '54.172.60.3:5060'


When the call is coming from the same provider and is made with the same phone.


Successful call:

Code: Select all
[Mar 21 06:27:19] <--- SIP read from UDP:54.172.60.2:5060 --->
[Mar 21 06:27:19] INVITE sip:RETRACTED SIP/2.0
[Mar 21 06:27:19] Record-Route: <sip:54.172.60.2:5060;lr;ftag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022>
[Mar 21 06:27:19] Organization: MetaSwitch
[Mar 21 06:27:19] Max-Forwards: 62
[Mar 21 06:27:19] To: <sip:RETRACTED;user=phone>
[Mar 21 06:27:19] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:19] CSeq: 1 INVITE
[Mar 21 06:27:19] Diversion: <sip:RETRACTED@public-vip.us1.twilio.com>;reason=unconditional
[Mar 21 06:27:19] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:19] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bK26ef.03f36b67.0
[Mar 21 06:27:19] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=172.18.10.74;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558972573182495
[Mar 21 06:27:19] Contact: "RETRACTED" <sip:RETRACTED@172.18.10.74:5060;transport=udp>
[Mar 21 06:27:19] Allow: OPTIONS,BYE,INVITE,ACK,CANCEL
[Mar 21 06:27:19] User-Agent: Twilio Gateway
[Mar 21 06:27:19] X-Twilio-AccountSid: ACcf42b68fd002addca69a6be86af201cf
[Mar 21 06:27:19] Content-Type: application/sdp
[Mar 21 06:27:19] X-Twilio-CallSid: CAb23f4ff429dcf8092b07f0dc191d301b
[Mar 21 06:27:19] Content-Length: 216
[Mar 21 06:27:19]
[Mar 21 06:27:19] v=0
[Mar 21 06:27:19] o=- 1083640434 1083640434 IN IP4 54.172.61.78
[Mar 21 06:27:19] s=Twilio Media Gateway
[Mar 21 06:27:19] c=IN IP4 54.172.61.78
[Mar 21 06:27:19] t=0 0
[Mar 21 06:27:19] m=audio 12820 RTP/AVP 0 101
[Mar 21 06:27:19] a=rtpmap:0 PCMU/8000
[Mar 21 06:27:19] a=rtpmap:101 telephone-event/8000
[Mar 21 06:27:19] a=ptime:20
[Mar 21 06:27:19] a=sendrecv
[Mar 21 06:27:19] <------------->
[Mar 21 06:27:19] --- (18 headers 10 lines) ---
[Mar 21 06:27:19] Sending to 54.172.60.2:5060 (NAT)
[Mar 21 06:27:19] Sending to 54.172.60.2:5060 (NAT)
[Mar 21 06:27:19] Using INVITE request as basis request - 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:19] Found peer 'twilio' for 'PHONE NUMBER' from 54.172.60.2:5060
[Mar 21 06:27:19]   == Using SIP RTP CoS mark 5
[Mar 21 06:27:19] Found RTP audio format 0
[Mar 21 06:27:19] Found RTP audio format 101
[Mar 21 06:27:19] Found audio description format PCMU for ID 0
[Mar 21 06:27:19] Found audio description format telephone-event for ID 101
[Mar 21 06:27:19] Capabilities: us - (ulaw), peer - audio=(ulaw)/video=(nothing)/text=(nothing), combined - (ulaw)
[Mar 21 06:27:19] Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[Mar 21 06:27:19] Peer audio RTP is at port 54.172.61.78:12820
[Mar 21 06:27:19] Looking for RETRACTED in trunkinbound (domain RETRACTED)
[Mar 21 06:27:19] list_route: hop: <sip:54.172.60.2:5060;lr;ftag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022>
[Mar 21 06:27:19] RDNIS for this call is RETRACTED (reason unconditional)
[Mar 21 06:27:19]
[Mar 21 06:27:19] <--- Transmitting (NAT) to 54.172.60.2:5060 --->
[Mar 21 06:27:19] SIP/2.0 100 Trying
[Mar 21 06:27:19] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bK26ef.03f36b67.0;received=54.172.60.2;rport=5060
[Mar 21 06:27:19] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=172.18.10.74;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558972573182495
[Mar 21 06:27:19] Record-Route: <sip:54.172.60.2:5060;lr;ftag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022>
[Mar 21 06:27:19] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:19] To: <sip:RETRACTED;user=phone>
[Mar 21 06:27:19] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:19] CSeq: 1 INVITE
[Mar 21 06:27:19] Server: Asterisk PBX 11.25.1-vici
[Mar 21 06:27:19] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:27:19] Supported: replaces, timer
[Mar 21 06:27:19] Contact: <sip:RETRACTED:5060>
[Mar 21 06:27:19] Content-Length: 0
[Mar 21 06:27:19]
[Mar 21 06:27:19]
[Mar 21 06:27:19] <------------>
[Mar 21 06:27:19]     -- Executing [RETRACTED@trunkinbound:1] AGI("SIP/twilio-000006af", "agi-DID_route.agi") in new stack
[Mar 21 06:27:19]     -- Launched AGI Script /usr/share/asterisk/agi-bin/agi-DID_route.agi
[Mar 21 06:27:19]     -- <SIP/twilio-000006af>AGI Script agi-DID_route.agi completed, returning 0
[Mar 21 06:27:19]     -- Executing [192*168*001*212*85026666666666900@default:1] Goto("SIP/twilio-000006af", "default,85026666666666900,1") in new stack
[Mar 21 06:27:19]     -- Goto (default,85026666666666900,1)
[Mar 21 06:27:19]     -- Executing [85026666666666900@default:1] Wait("SIP/twilio-000006af", "1") in new stack
[Mar 21 06:27:20]     -- Executing [85026666666666900@default:2] VoiceMail("SIP/twilio-000006af", "900,u") in new stack
[Mar 21 06:27:20] Audio is at 15486
[Mar 21 06:27:20] Adding codec 100003 (ulaw) to SDP
[Mar 21 06:27:20] Adding non-codec 0x1 (telephone-event) to SDP
[Mar 21 06:27:20]
[Mar 21 06:27:20] <--- Reliably Transmitting (NAT) to 54.172.60.2:5060 --->
[Mar 21 06:27:20] SIP/2.0 200 OK
[Mar 21 06:27:20] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bK26ef.03f36b67.0;received=54.172.60.2;rport=5060
[Mar 21 06:27:20] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=172.18.10.74;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558972573182495
[Mar 21 06:27:20] Record-Route: <sip:54.172.60.2:5060;lr;ftag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022>
[Mar 21 06:27:20] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:20] To: <sip:RETRACTED;user=phone>;tag=as63b77509
[Mar 21 06:27:20] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:20] CSeq: 1 INVITE
[Mar 21 06:27:20] Server: Asterisk PBX 11.25.1-vici
[Mar 21 06:27:20] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:27:20] Supported: replaces, timer
[Mar 21 06:27:20] Contact: <sip:RETRACTED:5060>
[Mar 21 06:27:20] Content-Type: application/sdp
[Mar 21 06:27:20] Content-Length: 243
[Mar 21 06:27:20]
[Mar 21 06:27:20] v=0
[Mar 21 06:27:20] o=root 1920461427 1920461427 IN IP4 RETRACTED
[Mar 21 06:27:20] s=Asterisk PBX 11.25.1-vici
[Mar 21 06:27:20] c=IN IP4 RETRACTED
[Mar 21 06:27:20] t=0 0
[Mar 21 06:27:20] m=audio 15486 RTP/AVP 0 101
[Mar 21 06:27:20] a=rtpmap:0 PCMU/8000
[Mar 21 06:27:20] a=rtpmap:101 telephone-event/8000
[Mar 21 06:27:20] a=fmtp:101 0-16
[Mar 21 06:27:20] a=ptime:20
[Mar 21 06:27:20] a=sendrecv
[Mar 21 06:27:20]
[Mar 21 06:27:20] <------------>
[Mar 21 06:27:20]
[Mar 21 06:27:20] <--- SIP read from UDP:54.172.60.2:5060 --->
[Mar 21 06:27:20] ACK sip:RETRACTED:5060 SIP/2.0
[Mar 21 06:27:20] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:20] CSeq: 1 ACK
[Mar 21 06:27:20] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:20] To: <sip:RETRACTED;user=phone>;tag=as63b77509
[Mar 21 06:27:20] Max-Forwards: 69
[Mar 21 06:27:20] User-Agent: Twilio
[Mar 21 06:27:20] X-Twilio-CallSid: CAb23f4ff429dcf8092b07f0dc191d301b
[Mar 21 06:27:20] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bK26ef.03f36b67.2
[Mar 21 06:27:20] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=54.172.61.78;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558973681674714
[Mar 21 06:27:20] Content-Length: 0
[Mar 21 06:27:20]
[Mar 21 06:27:20] <------------->
[Mar 21 06:27:20] --- (11 headers 0 lines) ---
[Mar 21 06:27:20]        > 0x7f68f401ba10 -- Probation passed - setting RTP source address to 54.172.61.78:12820
[Mar 21 06:27:20]     -- <SIP/twilio-000006af> Playing '/var/spool/asterisk/voicemail/default/900/unavail.gsm' (language 'en')
[Mar 21 06:27:25]
[Mar 21 06:27:25] <--- SIP read from UDP:54.172.60.2:5060 --->
[Mar 21 06:27:25] BYE sip:RETRACTED:5060 SIP/2.0
[Mar 21 06:27:25] CSeq: 2 BYE
[Mar 21 06:27:25] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:25] To: <sip:RETRACTED;user=phone>;tag=as63b77509
[Mar 21 06:27:25] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:25] Max-Forwards: 68
[Mar 21 06:27:25] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bKf5ef.af5df063.0
[Mar 21 06:27:25] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=54.172.61.78;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558978624525613
[Mar 21 06:27:25] Allow: PUBLISH,MESSAGE,UPDATE,PRACK,SUBSCRIBE,REFER,INFO,NOTIFY,REGISTER,OPTIONS,BYE,INVITE,ACK,CANCEL
[Mar 21 06:27:25] Allow-Events: calling-name,as-feature-event,call-info,presence,line-seize,dialog,refer,message-summary
[Mar 21 06:27:25] Reason: Q.850;cause=16;text=""
[Mar 21 06:27:25] User-Agent: Twilio Gateway
[Mar 21 06:27:25] X-Twilio-CallSid: CAb23f4ff429dcf8092b07f0dc191d301b
[Mar 21 06:27:25] Content-Length: 0
[Mar 21 06:27:25]
[Mar 21 06:27:25] <------------->
[Mar 21 06:27:25] --- (14 headers 0 lines) ---
[Mar 21 06:27:25] Sending to 54.172.60.2:5060 (NAT)
[Mar 21 06:27:25] Scheduling destruction of SIP dialog '7d99519e7c14a848db758f8eaf8c0029@0.0.0.0' in 6400 ms (Method: BYE)
[Mar 21 06:27:25]
[Mar 21 06:27:25] <--- Transmitting (NAT) to 54.172.60.2:5060 --->
[Mar 21 06:27:25] SIP/2.0 200 OK
[Mar 21 06:27:25] Via: SIP/2.0/UDP 54.172.60.2:5060;branch=z9hG4bKf5ef.af5df063.0;received=54.172.60.2;rport=5060
[Mar 21 06:27:25] Via: SIP/2.0/UDP 172.18.10.74:5060;rport=5060;received=54.172.61.78;branch=z9hG4bK5166cdba-f742-4f37-baa2-9e471446b022_6772d868_558978624525613
[Mar 21 06:27:25] From: "RETRACTED" <sip:RETRACTED>;tag=73227692_6772d868_5166cdba-f742-4f37-baa2-9e471446b022
[Mar 21 06:27:25] To: <sip:RETRACTED;user=phone>;tag=as63b77509
[Mar 21 06:27:25] Call-ID: 7d99519e7c14a848db758f8eaf8c0029@0.0.0.0
[Mar 21 06:27:25] CSeq: 2 BYE
[Mar 21 06:27:25] Server: Asterisk PBX 11.25.1-vici
[Mar 21 06:27:25] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:27:25] Supported: replaces, timer
[Mar 21 06:27:25] Content-Length: 0
[Mar 21 06:27:25]
[Mar 21 06:27:25]
[Mar 21 06:27:25] <------------>
[Mar 21 06:27:25]   == Spawn extension (default, 85026666666666900, 2) exited non-zero on 'SIP/twilio-000006af'
[Mar 21 06:27:25]     -- Executing [h@default:1] AGI("SIP/twilio-000006af", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Mar 21 06:27:25]     -- <SIP/twilio-000006af>AGI Script agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0--------------- completed, returning 0
[Mar 21 06:27:28] Reliably Transmitting (NAT) to 54.172.60.2:5060:
[Mar 21 06:27:28] OPTIONS sip:c20xh2.pstn.twilio.com SIP/2.0
[Mar 21 06:27:28] Via: SIP/2.0/UDP RETRACTED:5060;branch=z9hG4bK20a1de11;rport
[Mar 21 06:27:28] Max-Forwards: 70
[Mar 21 06:27:28] From: "asterisk" <sip:RETRACTED>;tag=as52be19a3
[Mar 21 06:27:28] To: <sip:c20xh2.pstn.twilio.com>
[Mar 21 06:27:28] Contact: <sip:RETRACTED:5060>
[Mar 21 06:27:28] Call-ID: 611956ef738184b244cb7d17065e2f96@RETRACTED:5060
[Mar 21 06:27:28] CSeq: 102 OPTIONS
[Mar 21 06:27:28] User-Agent: Asterisk PBX 11.25.1-vici
[Mar 21 06:27:28] Date: Tue, 21 Mar 2017 10:27:28 GMT
[Mar 21 06:27:28] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:27:28] Supported: replaces, timer
[Mar 21 06:27:28] Content-Length: 0
[Mar 21 06:27:28]
[Mar 21 06:27:28]
[Mar 21 06:27:28] ---
[Mar 21 06:27:28]
[Mar 21 06:27:28] <--- SIP read from UDP:54.172.60.2:5060 --->
[Mar 21 06:27:28] SIP/2.0 200 OK
[Mar 21 06:27:28] Via: SIP/2.0/UDP RETRACTED:5060;received=RETRACTED;branch=z9hG4bK20a1de11;rport=5060
[Mar 21 06:27:28] From: "asterisk" <sip:RETRACTED>;tag=as52be19a3
[Mar 21 06:27:28] To: <sip:c20xh2.pstn.twilio.com>;tag=6472875b7263899685b6eb92370e6190.2871
[Mar 21 06:27:28] Call-ID: 611956ef738184b244cb7d17065e2f96@RETRACTED:5060
[Mar 21 06:27:28] CSeq: 102 OPTIONS
[Mar 21 06:27:28] Server: Twilio Gateway
[Mar 21 06:27:28] Content-Length: 0
[Mar 21 06:27:28]
[Mar 21 06:27:28] <------------->
[Mar 21 06:27:28] --- (8 headers 0 lines) ---
[Mar 21 06:27:28] Really destroying SIP dialog '611956ef738184b244cb7d17065e2f96@RETRACTED:5060' Method: OPTIONS
[Mar 21 06:27:31] Really destroying SIP dialog '7d99519e7c14a848db758f8eaf8c0029@0.0.0.0' Method: BYE
[Mar 21 06:28:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Mar 21 06:28:02]   == Manager 'sendcron' logged on from 127.0.0.1
[Mar 21 06:28:02]   == Manager 'sendcron' logged off from 127.0.0.1
[Mar 21 06:28:07]   == Manager 'sendcron' logged on from 127.0.0.1
[Mar 21 06:28:07]   == Manager 'sendcron' logged off from 127.0.0.1
[Mar 21 06:28:12]   == Manager 'sendcron' logged off from 127.0.0.1
[Mar 21 06:28:28] Reliably Transmitting (NAT) to 54.172.60.2:5060:
[Mar 21 06:28:28] OPTIONS sip:c20xh2.pstn.twilio.com SIP/2.0
[Mar 21 06:28:28] Via: SIP/2.0/UDP RETRACTED:5060;branch=z9hG4bK4df565c8;rport
[Mar 21 06:28:28] Max-Forwards: 70
[Mar 21 06:28:28] From: "asterisk" <sip:RETRACTED>;tag=as4e8c4ba7
[Mar 21 06:28:28] To: <sip:c20xh2.pstn.twilio.com>
[Mar 21 06:28:28] Contact: <sip:RETRACTED:5060>
[Mar 21 06:28:28] Call-ID: 762f93a91065264d18f1a7296b8b3d09@RETRACTED:5060
[Mar 21 06:28:28] CSeq: 102 OPTIONS
[Mar 21 06:28:28] User-Agent: Asterisk PBX 11.25.1-vici
[Mar 21 06:28:28] Date: Tue, 21 Mar 2017 10:28:28 GMT
[Mar 21 06:28:28] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:28:28] Supported: replaces, timer
[Mar 21 06:28:28] Content-Length: 0
[Mar 21 06:28:28]
[Mar 21 06:28:28]
[Mar 21 06:28:28] ---
[Mar 21 06:28:28]
[Mar 21 06:28:28] <--- SIP read from UDP:54.172.60.2:5060 --->
[Mar 21 06:28:28] SIP/2.0 200 OK
[Mar 21 06:28:28] Via: SIP/2.0/UDP RETRACTED:5060;received=RETRACTED;branch=z9hG4bK4df565c8;rport=5060
[Mar 21 06:28:28] From: "asterisk" <sip:RETRACTED>;tag=as4e8c4ba7
[Mar 21 06:28:28] To: <sip:c20xh2.pstn.twilio.com>;tag=6472875b7263899685b6eb92370e6190.e443
[Mar 21 06:28:28] Call-ID: 762f93a91065264d18f1a7296b8b3d09@RETRACTED:5060
[Mar 21 06:28:28] CSeq: 102 OPTIONS
[Mar 21 06:28:28] Server: Twilio Gateway
[Mar 21 06:28:28] Content-Length: 0
[Mar 21 06:28:28]


Failed call:

Code: Select all

[Mar 21 06:29:09] <--- SIP read from UDP:54.172.60.3:5060 --->
[Mar 21 06:29:09] INVITE sip:RETRACTED SIP/2.0
[Mar 21 06:29:09] Record-Route: <sip:54.172.60.3:5060;lr;ftag=94075745_6772d868_49d570e4-4a62-414e-873a-69b998f57724>
[Mar 21 06:29:09] Organization: MetaSwitch
[Mar 21 06:29:09] Max-Forwards: 62
[Mar 21 06:29:09] To: <sip:RETRACTED;user=phone>
[Mar 21 06:29:09] From: "RETRACTED" <sip:RETRACTED>;tag=94075745_6772d868_49d570e4-4a62-414e-873a-69b998f57724
[Mar 21 06:29:09] CSeq: 1 INVITE
[Mar 21 06:29:09] Diversion: <sip:RETRACTED@public-vip.us1.twilio.com>;reason=unconditional
[Mar 21 06:29:09] Call-ID: 81d9d6819478e2ce1998a5871413ea4a@0.0.0.0
[Mar 21 06:29:09] Via: SIP/2.0/UDP 54.172.60.3:5060;branch=z9hG4bKc686.91e00bf1.0
[Mar 21 06:29:09] Via: SIP/2.0/UDP 172.18.11.197:5060;rport=5060;received=172.18.11.197;branch=z9hG4bK49d570e4-4a62-414e-873a-69b998f57724_6772d868_559080294077342
[Mar 21 06:29:09] Contact: "RETRACTED" <sip:RETRACTED@172.18.11.197:5060;transport=udp>
[Mar 21 06:29:09] Allow: OPTIONS,BYE,INVITE,ACK,CANCEL
[Mar 21 06:29:09] User-Agent: Twilio Gateway
[Mar 21 06:29:09] X-Twilio-AccountSid: ACcf42b68fd002addca69a6be86af201cf
[Mar 21 06:29:09] Content-Type: application/sdp
[Mar 21 06:29:09] X-Twilio-CallSid: CA8afbdebbde7649343c40bbbf4b4a8451
[Mar 21 06:29:09] Content-Length: 218
[Mar 21 06:29:09]
[Mar 21 06:29:09] v=0
[Mar 21 06:29:09] o=- 1753446976 1753446976 IN IP4 54.172.60.203
[Mar 21 06:29:09] s=Twilio Media Gateway
[Mar 21 06:29:09] c=IN IP4 54.172.60.203
[Mar 21 06:29:09] t=0 0
[Mar 21 06:29:09] m=audio 17200 RTP/AVP 0 101
[Mar 21 06:29:09] a=rtpmap:0 PCMU/8000
[Mar 21 06:29:09] a=rtpmap:101 telephone-event/8000
[Mar 21 06:29:09] a=ptime:20
[Mar 21 06:29:09] a=sendrecv
[Mar 21 06:29:09] <------------->
[Mar 21 06:29:09] --- (18 headers 10 lines) ---
[Mar 21 06:29:09] Sending to 54.172.60.3:5060 (NAT)
[Mar 21 06:29:09] Sending to 54.172.60.3:5060 (NAT)
[Mar 21 06:29:09] Using INVITE request as basis request - 81d9d6819478e2ce1998a5871413ea4a@0.0.0.0
[Mar 21 06:29:09] No matching peer for 'PHONE NUMBER' from '54.172.60.3:5060'
[Mar 21 06:29:09]
[Mar 21 06:29:09] <--- Reliably Transmitting (NAT) to 54.172.60.3:5060 --->
[Mar 21 06:29:09] SIP/2.0 401 Unauthorized
[Mar 21 06:29:09] Via: SIP/2.0/UDP 54.172.60.3:5060;branch=z9hG4bKc686.91e00bf1.0;received=54.172.60.3;rport=5060
[Mar 21 06:29:09] Via: SIP/2.0/UDP 172.18.11.197:5060;rport=5060;received=172.18.11.197;branch=z9hG4bK49d570e4-4a62-414e-873a-69b998f57724_6772d868_559080294077342
[Mar 21 06:29:09] From: "RETRACTED" <sip:RETRACTED>;tag=94075745_6772d868_49d570e4-4a62-414e-873a-69b998f57724
[Mar 21 06:29:09] To: <sip:RETRACTED;user=phone>;tag=as23993c14
[Mar 21 06:29:09] Call-ID: 81d9d6819478e2ce1998a5871413ea4a@0.0.0.0
[Mar 21 06:29:09] CSeq: 1 INVITE
[Mar 21 06:29:09] Server: Asterisk PBX 11.25.1-vici
[Mar 21 06:29:09] Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
[Mar 21 06:29:09] Supported: replaces, timer
[Mar 21 06:29:09] WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="49b0612c"
[Mar 21 06:29:09] Content-Length: 0
[Mar 21 06:29:09]
[Mar 21 06:29:09]
[Mar 21 06:29:09] <------------>


System Spec:

Code: Select all
1) Version of VICIDIAL

VERSION: 2.14-588a
BUILD: 170211-1041

2) loadavg

top - 02:36:24 up 2 days, 10:35, 2 users, load average: 0.09, 0.12, 0.10
Tasks: 109 total, 2 running, 107 sleeping, 0 stopped, 0 zombie

3) Server Specs

Cluster, Asterisk is running with 100gig HDD and 4 gig ram

4) Codecs used

Not sure right now , dtmfmode=rfc4733

5) VOIP or PSTN

VOIP

6) OS

PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"


Career Config :

Code: Select all
[twilio]
disallow=all
allow=ulaw
type=friend
context=trunkinbound
dtmfmode=rfc4733
canreinvite=no
host=c20xh2.pstn.twilio.com
fromuser= HIDDEN
nat=force_rport,comedia
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: No matching peer

Postby mflorell » Tue Mar 21, 2017 6:22 am

Have you tried another carrier?
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: No matching peer

Postby c20xh2 » Tue Mar 21, 2017 12:36 pm

I did not try any other provider yet,

Thing is the pricing of twilio really fit what I need and they seem to have an active support team. I'm currently trying to work the issue out with them but right now they receive a 401 from my asterisk box and that's about it.

When I look back at my stats saying that HALF my inbouds calls are rejected is a bit to much. 30% would be more close to reality. Outbound look good right now but I have a bunch of CHANUNAVAILB in my outbound report and need to take a look there.

Could this be a Codec issue ? Wrong sip.conf ? I would love to understand what is going on here and where i'm making a mistake.

If trying another provider is an important step to diagnose this issue I will surely take the time to do so.
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: No matching peer

Postby mflorell » Tue Mar 21, 2017 12:55 pm

I would suggest spending a few dollars(like $5) and getting a Vitelity account to test with.
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: No matching peer

Postby ambiorixg12 » Tue Mar 21, 2017 10:18 pm

Twilio is pretty good provider the issue with your system is that twilio send the calls using differents IP address and on your carrier you only have one of those IP (host=x.x.x.x). so tht why asterisk is asking for authentication with 401 when incoming call arrive with an IP different to the IP on the IP defined on yoru carrier settings.

Workaround

on sip general
1) allowguest=yes
2)context=trunkinbound

Or

2) create a sip peer entry for each twilio IP
ambiorixg12
 
Posts: 449
Joined: Tue Sep 17, 2013 10:35 pm

Re: No matching peer

Postby c20xh2 » Wed Mar 22, 2017 12:39 am

I would suggest spending a few dollars(like $5) and getting a Vitelity account to test with.


I just take a quick look at their website and it's very interesting, I will definitly make some test with them, thanks for the hint :) .

the calls using differents IP address and on your carrier you only have one of those IP (host=x.x.x.x). so tht why asterisk is asking for authentication with 401 when incoming call arrive with an IP different to the IP on the IP defined on yoru carrier settings.


This make sense, the part that I don't get is that twilio provide me with an hostname, could this be a DNS issue ?

Code: Select all
host=c20xh2.pstn.twilio.com


When I look at asterisk -vvvvr I can see calls that are rejected coming from a Twilio IP but couple of minute later the system accept a call coming from the same IP ...
Creating an entry for ALL twilio IP would be a hudge task, can asterisk accept ip range like 54.172.60.1/24 ?

I updated my sip general with allowguest=yes and made 20 test call, 20 accepted ! Could that create an opportunity for MiTM attacks ?

I still want to understand my issue here, not a big fan of "it's working right now so don't change anything ever because I don't understand my own system". Your input is really appreciated, thank you
c20xh2
 
Posts: 95
Joined: Mon Feb 20, 2017 2:28 am

Re: No matching peer

Postby teleinx » Mon Mar 27, 2017 3:55 pm

Twillio only supports one codec, G.711. But since you are working with their support they should be able to tell you why the rejected the calls.
VoIP carrier spesilizing in vici dial.
Outboud VoIP Termination | Inboud VoIP Origination | Carrier Data Services
Website: http://www.teleinx.com
skype: teleinx inc
teleinx
 
Posts: 54
Joined: Fri Apr 08, 2016 7:44 pm
Location: Miami, FL


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 62 guests