Can't receive incoming calls

9 posts / 0 new
Last post
bartigas
bartigas's picture
Can't receive incoming calls

Hello,

I just setup a FreePBX in the datacenter and am using X-Lite to test everything. I'm having a difficult time getting FreePBX to pass through an incoming call. I can make outgoing calls without a problem. When I try to call in to the system I get "The number you have dialed is not in service, please check the number and try again." Here are the details:

For security reasons I blanked out the last two octets of the ip addresses, the last 4 numbers of the phone number and the passwords.

h = ip address digit for FreePBX
i = ip address digit for SER Proxy server
j = ip address digit for provider's ip
n = called phone number (in)
p = calling phone number (out)
x = password character

-------------------------------------------------------------------------------
Trunk Settings:
-------------------------------------------------------------------------------
Outbound Caller ID:561935nnnn

Trunk Name: test

Peer Details:
host=208.115.iii.iii
username=1561935nnnn
secret=xxxxxx
type=peer
insecure=very

User Context: 1561935nnnn

User Details:
secret=xxxxxx
type=peer
context=from-trunk
permit=208.115.iii.iii

Register String: 1561935nnnn:xxxxxx@208.115.iii.iii
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
CLI Output
--------------------------------------------------------------------------------

<--- SIP read from 208.115.III.III:5060 --->
INVITE sip:s@208.115.HHH.HHH SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKef4c.0be495b3.0
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK5344ecfc;rport=5060
From: ;tag=as7db4c12a
To:
Contact:
Call-ID:

CSeq: 102 INVITE
User-Agent: TSG_GLOBAL_COBRA
Max-Forwards: 16
Remote-Party-ID: ;privacy=off;screen=no
Date: Tue, 24 Nov 2009 23:16:34 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
X-ANI-II: N/A
Content-Type: application/sdp
Content-Length: 291

v=0
o=root 31343 31343 IN IP4 209.247.22.141
s=session
c=IN IP4 209.247.22.141
t=0 0
m=audio 60022 RTP/AVP 0 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
--- (18 headers 14 lines) ---
Sending to 208.115.III.III : 5060 (no NAT)
Using INVITE request as basis request -

Found peer 'test1'
Found RTP audio format 0
Found RTP audio format 18
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x104 (ulaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 209.247.22.141:60022
Looking for s in from-sip-external (domain 208.115.HHH.HHH)
list_route: hop:

<--- Transmitting (no NAT) to 208.115.III.III:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKef4c.0be495b3.0;received=208.115.III.III
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK5344ecfc;rport=5060
Record-Route:
From: ;tag=as7db4c12a
To:
Call-ID:

CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact:
Content-Length: 0

<------------>
-- Executing [s@from-sip-external:1] GotoIf("SIP/test1-00000038", "0?from-trunk||1") in new stack
-- Executing [s@from-sip-external:2] Set("SIP/test1-00000038", "TIMEOUT(absolute)=15") in new stack
-- Channel will hangup at 2009-11-24 23:50:14 UTC.
-- Executing [s@from-sip-external:3] Answer("SIP/test1-00000038", "") in new stack
Audio is at 208.115.HHH.HHH port 16422
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
freepbx*CLI>
<--- Reliably Transmitting (no NAT) to 208.115.III.III:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKef4c.0be495b3.0;received=208.115.III.III
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK5344ecfc;rport=5060
Record-Route:
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Call-ID:

CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact:
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 2396 2396 IN IP4 208.115.HHH.HHH
s=session
c=IN IP4 208.115.HHH.HHH
t=0 0
m=audio 16422 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
-- Executing [s@from-sip-external:4] Wait("SIP/test1-00000038", "2") in new stack
freepbx*CLI>
<--- SIP read from 208.115.III.III:5060 --->
ACK sip:s@208.115.HHH.HHH SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 208.115.III.III;branch=0
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK0ce5f15c;rport=5060
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Contact:
Call-ID:

CSeq: 102 ACK
User-Agent: TSG_GLOBAL_COBRA
Max-Forwards: 16
Remote-Party-ID: ;privacy=off;screen=no
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 208.115.III.III:5060:
REGISTER sip:208.115.III.III SIP/2.0
Via: SIP/2.0/UDP 208.115.HHH.HHH:5060;branch=z9hG4bK5f44933f;rport
From: ;tag=as11990e7a
To:
Call-ID:

CSeq: 113 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username="1561935NNNN", realm="208.115.III.III", algorithm=MD5, uri="sip:208.115.III.III", nonce="4b0c9c07044289f6b80ed101108139cb8e4b02fc", response="3c33c6fe8851a79e24666866e121997d"
Expires: 120
Contact:
Event: registration
Content-Length: 0

---
freepbx*CLI>
<--- SIP read from 208.115.III.III:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 208.115.HHH.HHH:5060;branch=z9hG4bK5f44933f;rport=5060
From: ;tag=as11990e7a
To:
Call-ID:

CSeq: 113 REGISTER
Server: Sip EXpress router (0.9.6 (i386/linux))
Content-Length: 0
Warning: 392 208.115.III.III:5060 "Noisy feedback tells: pid=1231 req_src_ip=208.115.HHH.HHH req_src_port=5060 in_uri=sip:208.115.III.III out_uri=sip:208.115.III.III via_cnt==1"

<------------->
--- (9 headers 0 lines) ---

<--- SIP read from 208.115.III.III:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 208.115.HHH.HHH:5060;branch=z9hG4bK5f44933f;rport=5060
From: ;tag=as11990e7a
To: ;tag=d013a8929d2f93884fadca19e2cdf071.0fd6
Call-ID:

CSeq: 113 REGISTER
Contact: ;expires=120
Server: Sip EXpress router (0.9.6 (i386/linux))
Content-Length: 0
Warning: 392 208.115.III.III:5060 "Noisy feedback tells: pid=1231 req_src_ip=208.115.HHH.HHH req_src_port=5060 in_uri=sip:208.115.III.III out_uri=sip:208.115.III.III via_cnt==1"

<------------->
--- (10 headers 0 lines) ---
Scheduling destruction of SIP dialog '1ff72a6e4ac4f5ae5702274d5c218606@208.115.HHH.HHH' in 32000 ms (Method: REGISTER)
-- Executing [s@from-sip-external:5] Playback("SIP/test1-00000038", "ss-noservice") in new stack
-- Playing 'ss-noservice' (language 'en')
freepbx*CLI>
<--- SIP read from 208.115.III.III:5060 --->
INVITE sip:s@208.115.HHH.HHH SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKff4c.68fc73a3.0
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK735853aa;rport=5060
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Contact:
Call-ID:

CSeq: 103 INVITE
User-Agent: TSG_GLOBAL_COBRA
Max-Forwards: 16
Remote-Party-ID: ;privacy=off;screen=no
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 31343 31344 IN IP4 69.25.JJJ.JJJ
s=session
c=IN IP4 69.25.JJJ.JJJ
t=0 0
m=audio 34882 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------->
--- (16 headers 12 lines) ---
Sending to 208.115.III.III : 5060 (no NAT)
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 69.25.JJJ.JJJ:34882

<--- Transmitting (no NAT) to 208.115.III.III:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKff4c.68fc73a3.0;received=208.115.III.III
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK735853aa;rport=5060
Record-Route:
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Call-ID:

CSeq: 103 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact:
Content-Length: 0

<------------>
Audio is at 208.115.HHH.HHH port 16422
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<--- Reliably Transmitting (no NAT) to 208.115.III.III:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKff4c.68fc73a3.0;received=208.115.III.III
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK735853aa;rport=5060
Record-Route:
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Call-ID:

CSeq: 103 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact:
Content-Type: application/sdp
Content-Length: 242

v=0
o=root 2396 2397 IN IP4 208.115.HHH.HHH
s=session
c=IN IP4 208.115.HHH.HHH
t=0 0
m=audio 16422 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
freepbx*CLI>
<--- SIP read from 208.115.III.III:5060 --->
ACK sip:s@208.115.HHH.HHH SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 208.115.III.III;branch=0
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK309adca6;rport=5060
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Contact:
Call-ID:

CSeq: 103 ACK
User-Agent: TSG_GLOBAL_COBRA
Max-Forwards: 16
Remote-Party-ID: ;privacy=off;screen=no
Content-Length: 0

<------------->
--- (13 headers 0 lines) ---
freepbx*CLI>
<--- SIP read from 208.115.III.III:5060 --->
BYE sip:s@208.115.HHH.HHH SIP/2.0
Record-Route:
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKcf4c.a3539d85.0
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK4d3efe30;rport=5060
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Call-ID:

CSeq: 104 BYE
User-Agent: TSG_GLOBAL_COBRA
Max-Forwards: 16
Remote-Party-ID: ;privacy=off;screen=no
X-TSG_GLOBAL-HangupCause: Normal Clearing
X-TSG_GLOBAL-HangupCauseCode: 16
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 208.115.III.III : 5060 (no NAT)

<--- Transmitting (no NAT) to 208.115.III.III:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 208.115.III.III;branch=z9hG4bKcf4c.a3539d85.0;received=208.115.III.III
Via: SIP/2.0/UDP 69.25.JJJ.JJJ:5060;branch=z9hG4bK4d3efe30;rport=5060
Record-Route:
From: ;tag=as7db4c12a
To: ;tag=as004063a2
Call-ID:

CSeq: 104 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0

<------------>
== Spawn extension (from-sip-external, s, 5) exited non-zero on 'SIP/test1-00000038'
-- Executing [h@from-sip-external:1] NoOp("SIP/test1-00000038", "Hangup") in new stack
-- Executing [h@from-sip-external:2] Set("SIP/test1-00000038", "DID=s") in new stack
-- Executing [h@from-sip-external:3] Goto("SIP/test1-00000038", "s|1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/test1-00000038", "0?from-trunk|s|1") in new stack
-- Executing [s@from-sip-external:2] Set("SIP/test1-00000038", "TIMEOUT(absolute)=15") in new stack
-- Channel will hangup at 2009-11-24 23:50:19 UTC.
-- Executing [s@from-sip-external:3] Answer("SIP/test1-00000038", "") in new stack
== Spawn extension (from-sip-external, s, 3) exited non-zero on 'SIP/test1-00000038'
Really destroying SIP dialog '2ad2cf6439d534062f7b5525233433b3@69.25.JJJ.JJJ' Method: BYE
freepbx*CLI>
<--- SIP read from 216.199.214.66:58395 --->

--------------------------------------------------------------------------------

What baffles me is the "INVITE sip:s@208.115.III.III SIP/2.0" on my other commercial pbx it shows the phone number (ie.

), why doesn't this show an s?

Any help would be greatly appreciated, I'm begining to devlop a flat spot on my forehead from banging it against the wall.

Thank in advance,

Brian

Cliffster
Cliffster's picture
look into the context

I don't understand it very well, but I had to change my context from context=from-pstn to context=from-zaptel

Hope that helps,

Cliffster

bartigas
bartigas's picture
No Luck

I tried that and it still didn't work. Same result as before.

Cliffster
Cliffster's picture
what do the logs say?

I always bring up a PuTTY session to it and look at the logs using tail:
tail -f --lines=400 /var/log/asterisk/full

What kind of trunk are you using and how do you have inbound routes setup?

You did good getting the outbound calls to work. Dial plans and patterns take a bit of real thinking. Smile

Cliffster
Cliffster's picture
If it is a SIP Trunk you might need this

Mine is a Zap trunk but

Check allow unauthenticated SIP calls. Under the General Settings tab

Cliffster
Cliffster's picture
oop

oop

Cliffster
Cliffster's picture
Allow Anonymous Inbound SIP Calls

Allow Anonymous Inbound SIP Calls

bartigas
bartigas's picture
Figured it out! :-D

Hey Cliffster thanks so much for all of your assistance. It actually turned out to be a problem with the sip register string.

I had: Register String: 1561935nnnn:xxxxxx@208.115.iii.iii

It needed to be: Register String: 1561935nnnn:xxxxxx@208.115.iii.iii/1561935nnnn

I also needed to turn on Allow Anonymous Inbound SIP Calls.

We're using termination and origination from our provider going straight into a SER server which basically turns it into trunks and shoots it out to a number of servers and devices.

Thanks again for your help, it was much appreciated.

Brian

SkykingOH
SkykingOH's picture
Anonymous SIP is not to eliminate the need to setup trunk

Why don't you setup a peer to the OpenSER box?

host=IP of SER
insecure=very
type=friend
disallow=all
allow=ulaw

This config will authenticate the SIP packets to the peer bases on the IP address only.