Calling a number in format +1NXXNXXXXXX from Skype for Business through FreePBX

I can make all kinds of calls, inbound from outside to DID assigned on Skype for Business through FreePBX, I can call from FreePBX extension to Skype for Business ext, I can call from that extension to any number outside.

But only when I am trying to call from Skype for Business to outside through freePBX it says the number doesn’t exist check the number and try again.

I am calling from INVITE 3072481662 to +13201009553
The 307 number is assigned on Skype for Business DID.
Target Number: 3201009553 is PSTN Number

My Skype for Business server is 192.168.20.25
My FreePBX IP is 10.0.1.3

Call Logs are attached:>

freepbx*CLI> sip set debug on
SIP Debugging enabled

<— SIP read from TCP:192.168.20.25:54060 —>
INVITE sip:[email protected];user=phone SIP/2.0
FROM: "adminM"sip:+13072481662;[email protected];user=phone;epid=075CFA3A59;tag=ba65c54576
TO: sip:[email protected];user=phone
CSEQ: 83955 INVITE
CALL-ID: b2e83a43-1878-4d99-9d59-c86ade39cc93
MAX-FORWARDS: 70
VIA: SIP/2.0/TCP 192.168.20.25:54060;branch=z9hG4bKdcd9998b
CONTACT: sip:SBG-FE01.SkypeForBusiness.net:5060;transport=Tcp;maddr=192.168.20.25;ms-opaque=72f0d0298b3a73fe
CONTENT-LENGTH: 345
SUPPORTED: 100rel
USER-AGENT: RTCC/6.0.0.0 MediationServer
CONTENT-TYPE: application/sdp
ALLOW: ACK
P-ASSERTED-IDENTITY: "adminM"sip:[email protected],tel:+13072481662;ext=44124
Privacy: id
Allow: CANCEL,BYE,INVITE,PRACK,UPDATE

v=0
o=- 27555 1 IN IP4 192.168.20.25
s=session
c=IN IP4 192.168.20.25
b=CT:1000
t=0 0
m=audio 54564 RTP/AVP 97 101 13 0 8
c=IN IP4 192.168.20.25
a=rtcp:54565
a=label:Audio
a=sendrecv
a=rtpmap:97 RED/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=ptime:20
<------------->
— (16 headers 18 lines) —
Sending to 192.168.20.25:54060 (NAT)
Sending to 192.168.20.25:54060 (NAT)
Using INVITE request as basis request - b2e83a43-1878-4d99-9d59-c86ade39cc93
No matching peer for ‘+13072481662;ext=44124’ from ‘192.168.20.25:54060’
Found RTP audio format 97
Found RTP audio format 101
Found RTP audio format 13
Found RTP audio format 0
Found RTP audio format 8
Found unknown media description format RED for ID 97
Found audio description format telephone-event for ID 101
Found audio description format CN for ID 13
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Capabilities: us - (ulaw|alaw|gsm|g726|g722), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x3 (telephone-event|CN|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.20.25:54564
Looking for +13201009553 in from-sip-external (domain 10.0.1.3)
sip_route_dump: route/path hop: sip:SBG-FE01.SkypeForBusiness.net:5060;transport=Tcp;maddr=192.168.20.25;ms-opaque=72f0d0298b3a73fe

<— Transmitting (NAT) to 192.168.20.25:54060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.20.25:54060;branch=z9hG4bKdcd9998b;received=192.168.20.25;rport=54060
From: "adminM"sip:+13072481662;[email protected];user=phone;epid=075CFA3A59;tag=ba65c54576
To: sip:[email protected];user=phone
Call-ID: b2e83a43-1878-4d99-9d59-c86ade39cc93
CSeq: 83955 INVITE
Server: FPBX-14.0.5.25(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:[email protected]:5060;transport=tcp
Content-Length: 0

<------------>
[2019-02-20 14:05:18] WARNING[18850][C-000001c8]: Ext. s:6 @ from-sip-external: “Rejecting unknown SIP connection from 192.168.20.25”
Audio is at 19398
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to 192.168.20.25:54060 —>
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.20.25:54060;branch=z9hG4bKdcd9998b;received=192.168.20.25;rport=54060
From: "adminM"sip:+13072481662;[email protected];user=phone;epid=075CFA3A59;tag=ba65c54576
To: sip:[email protected];user=phone;tag=as3fb52f4e
Call-ID: b2e83a43-1878-4d99-9d59-c86ade39cc93
CSeq: 83955 INVITE
Server: FPBX-14.0.5.25(13.22.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:[email protected]:5060;transport=tcp
Content-Type: application/sdp
Content-Length: 278

v=0
o=root 1366665202 1366665202 IN IP4 66.23.202.104
s=Asterisk PBX 13.22.0
c=IN IP4 66.23.202.104
t=0 0
m=audio 19398 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>

<— SIP read from TCP:192.168.20.25:54060 —>
ACK sip:[email protected]:5060;transport=tcp SIP/2.0
FROM: sip:+13072481662;[email protected];user=phone;epid=075CFA3A59;tag=ba65c54576
TO: sip:[email protected];user=phone;tag=as3fb52f4e
CSEQ: 83955 ACK
CALL-ID: b2e83a43-1878-4d99-9d59-c86ade39cc93
MAX-FORWARDS: 70
VIA: SIP/2.0/TCP 192.168.20.25:54060;branch=z9hG4bK69fead56
CONTENT-LENGTH: 0
USER-AGENT: RTCC/6.0.0.0 MediationServer

Anyone could help with this? I feel its something related with this message “[2019-02-20 14:05:18] WARNING[18850][C-000001c8]: Ext. s:6 @ from-sip-external: “Rejecting unknown SIP connection from 192.168.20.25””

The problem is I am not sure which step is wrong since my Skype for business trunk contains the correct IP.

I would appreciate any help.

Thank you

I don’t that I’m fully understanding what’s going on, but this is a message from YOUR PBX.

This snippet tells me that your call is connecting through the system using the “from-sip-external” context and there isn’t a trunk using that address. Because of that, the call is rejected because the address isn’t external, it’s internal. It sounds like one of your pieces is using the wrong context for one of the inbound legs.

Hi Dave,

I know thats what I am also wondering about, I have two trunks, one is skype for Business which is the call initiating from and in the outbound section of the trunk I have the following settings
host=192.168.20.25
transport=tcp
type=friend
qualify=yes
promiscredir=yes
port=5060
insecure=very
canreinvite=yes
context=from-internal

I tried removing context as well but nothing changed. it’s really very strange.

Hello, What am I missing here exactly?
I really have checked everything and couldn’t know whats the cause of the rejection. the IP is mentioned in the trunk and context is from internal yet still says from external.

Anyone can help?

Just for anyone who might have a similar problem I solved my problem by removing context from Lync trunk, created an empty inbound route that goes to SIP trunk provider and calls started working.

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