Unable to receive calls - outbound okay

Cloud based hosted at RentPBX
CentOS release 6.7 (Final)
Freepbx 12.0.70
Asterisk 13.5.0
Trunk provider VoIP Innovations

Inbound trunk settings (these same settings work fine on other systems from same provider and earlier version of asterisk)

host=64.136.173.31
type=friend
context=default
disallow=all
allow=ulaw
dtmfmode=rfc2833
insecure=port,invite

I have an inbound route setup with the did in the exact format of the invite from the provider. I have the call terminated with a hold forever for testing to eliminate endpoint issues. There is also an any/any inbound route.

Asterisk is not accepting inbound calls.

Sitting at asterisk cli with sip debug on I see no activity. Wireshark pcap shows 3 invites and then a cancel all on inbound leg of call with no response from asterisk.

Any ideas?

Hi,

Try these settings instead:

host=64.136.173.31
type=friend
disallow=all
allow=ulaw&alaw
dtmfmode=rfc2833
insecure=port,invite
canreinvite=no
qualify=yes

Thank you,

Daniel Friedman
Trixton LTD.

I tried that and when I issue “sip show peers” I get:

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
Voip-Innovations 64.136.174.30 Yes Yes 5060 Unmonitored
inbound-VoIP-Innovations (Unspecified) Yes Yes 0 UNKNOWN

and no data from provider. With the original settings I get:

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
Voip-Innovations 64.136.174.30 Yes Yes 5060 Unmonitored
inbound-VoIP-Innovations 64.136.173.31 Yes Yes 5060 Unmonitored

And, I get invites from provider.

Thanks for trying. Any other ideas are welcome.

Hello,

I am not trying, I am telling you how to configure it. You should really treat the help you are getting here with more respect !

The UNMONITORED status is not good because you do not know for sure if the provider responses to the OPTIONS from the trunk.
If you see UNKNOWN status, it means that you have problem with your firewall or NAT port forwarding settings.
If you will use the context=default make sure that it is really exists in your pbx or delete it in order to use the default one of the Freepbx. If you get invites from your provider please send the logs to get a clearer view of what happening.

I would also suggest to check your firewall rules and port forwarding settings.

There is one last problem that you cannot see:

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
Voip-Innovations 64.136.174.30 Yes Yes 5060 Unmonitored
inbound-VoIP-Innovations (Unspecified) Yes Yes 0 UNKNOWN 

What is happening with the inbound-VoIP-Innovations trunk? where is its address? did you set the host?

Thank you,

Daniel Friedman
Trixton LTD.

I didn’t realize that thanking you for your suggestion and trying it out was disrespectful. The unknown was after applying your suggested settings. With the settings I was using, I get unmonitored. see below:

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
Voip-Innovations 64.136.174.30 Yes Yes 5060 Unmonitored
inbound-VoIP-Innovations 64.136.173.31 Yes Yes 5060 Unmonitored

Firewall has all sip ports open to both 64.136.174.30 and 64.136.173.31. Since it is hosted at RentPBX there is no hardware firewall and therefore no port forwarding.

I did a pcap and it shows a pattern of 3 invites, then a cancel, then 3 more invites etc. until it times out. So it doesn’t appear to be the trunk. Something with Asterisk?

I do have 6 other hosts set up with this provider with the same settings (see what they specify below) and all works just fine on other systems. I was trying context as a suggestion and it did not make any difference. I have tried default which should work and from-pstn which does exist and should also work.

host=64.136.173.31
type=friend
disallow=all
allow=ulaw
dtmfmode=rfc2833
insecure=port,invite

This is the only host I have with freepbx 12 and asterisk 13.

I want you to know that I do appreciate your time and I did try your solution without luck. I mean no disrespect.

Hi,

Can you send a log from the Asterisk console (core set debug peer Voip-Innovations and core set verbose 4)?
It will be really helpful.

Thank you,

Daniel Friedman
Trixton LTD.

Okay, I set:

CLI> sip set debug peer inbound-VoIP-Innovations
SIP Debugging Enabled for IP: 64.136.173.31

There was no response on the CLI>

I then exited the cli and ran tshark on eth0 and captured udp packets and saw the data from the provider. Somehow asterisk does not appear to be listening on eth0?

I’ll post a link for you to look at the dump from tshark if you like. I just sent you a link via email.

Hi,

Please send me an output of the command netstat -anop | grep asterisk

Thank you,

Daniel Friedman
Trixton LTD.

I just sent it to you.

Hello,

Your asterisk is listening on UDP 5061 instead of UDP 5060.
Please change it in the sip settings module and try again.

Make sure that you are not using PJSIP.

Thank you,

Daniel Friedman
Trixton LTD.

Okay, I changed it to 5060 and now:

tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 20113/asterisk off (0.00/0/0)
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 20113/asterisk off (0.00/0/0)
tcp 0 0 0.0.0.0:1720 0.0.0.0:* LISTEN 20113/asterisk off (0.00/0/0)
tcp 0 0 127.0.0.1:8088 0.0.0.0:* LISTEN 20113/asterisk off (0.00/0/0)
udp 0 0 0.0.0.0:5000 0.0.0.0:* 20113/asterisk off (0.00/0/0)
udp 0 0 0.0.0.0:2727 0.0.0.0:* 20113/asterisk off (0.00/0/0)
udp 0 0 0.0.0.0:4520 0.0.0.0:* 20113/asterisk off (0.00/0/0)
udp 0 0 0.0.0.0:5060 0.0.0.0:* 20113/asterisk off (0.00/0/0)
udp 0 0 0.0.0.0:4569 0.0.0.0:* 20113/asterisk off (0.00/0/0)
unix 2 [ ACC ] STREAM LISTENING 288103 20113/asterisk /var/run/asterisk/asterisk.ctl
unix 3 [ ] STREAM CONNECTED 288159 20113/asterisk
unix 3 [ ] STREAM CONNECTED 288156 20113/asterisk
unix 3 [ ] STREAM CONNECTED 288118 20113/asterisk

I also went into advanced settings and set: SIP channel driver to chan_sip instead of both chan_sip and chan_pjsip. I then restarted asterisk with an amportal resrtart.

I went to the asterisk cli and set:

ip set debug peer inbound-VoIP-Innovations
SIP Debugging Enabled for IP: 64.136.173.31

Nothing? Should I reboot the server?

Hi,

Did you send a call? raise the verbosity to 4 (core set verbose 4).

Thank you,

Daniel Friedman
Trixton LTD.

Yes I did and I am now able to route the inbound call (after 5 to 10 second delay into music on hold) so great there is some progress. But it also created a new problem as my phone will no longer register and the cli shows:
[2015-11-12 11:46:50] NOTICE[23064]: chan_sip.c:27875 handle_request_register: Registration from ‘“Abc Defdef” sip:[email protected]’ failed for ‘50.198.133.1:5062’ - Wrong password

Hi,

Good to hear that you progressed. Check your password in the extension settings and in your phone again. Can you send here your trunk settings screenshot?

Thank you,

Daniel Friedman
Trixton LTD.

Here is the trunk settings:

Hi,

Don’t you have another trunk with the same name?
Send me the screenshot of the whole trunk settings page.

Thank you,

Daniel Friedman
Trixton LTD.

Yes I have 2 trunks. I’ll take a couple of snapshots of each so you can see the whole page.

1st trunk below -----------------------------------------------------------------------------------------------------




2nd trunk below-------------------------------------------------------------------------------------------------------


Hi,

please add canreinvite=no to the trunks settings and send me the Asterisk console logs after an inbound call (core set verbose 4).

Please send me also the sip settings (sip show settings).

Thank you,

Daniel Friedman
Trixton LTD.

okay - I added canreinvite=no to both trunks

here are the sip settings

sip show settings

Global Settings:

UDP Bindaddress: 0.0.0.0:5060
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Path support : No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-12.0.74(13.5.0)
SDP Session Name: Asterisk PBX 13.5.0
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No

Network Settings:

SIP address remapping: Enabled using externaddr
Externhost:
Externaddr: 88.214.255.66:0
Externrefresh: 10
Localnet: 88.214.255.64/255.255.255.224

Global Signalling Settings:

Codecs: (ulaw|alaw|gsm|g726)
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70

Default Settings:

Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: No
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: No
Language:
Tone zone:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97
I’ll email the logs

Hi,

Please correct your NAT settings. Change your ip to a public one (not static). Please remove the context=from-pstn from the trunks.

Thank you,

Daniel Friedman
Trixton LTD.