localhost*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time sip.mydivert.com:5060 N 001102183 105 Registered Mon, 27 Dec 2010 01:18:03
1 SIP registrations.
But it does not seem to be in peers:
localhost*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
6000 (Unspecified) D N A 5060 UNKNOWN
6001/6001 192.168.0.22 D N A 60884 OK (114 ms)
8000/8000 192.168.0.15 D N A 4082 UNREACHABLE
mydivert/001102183 78.46.43.9 N 5060 UNREACHABLE
4 sip peers [Monitored: 1 online, 3 offline Unmonitored: 0 online, 0 offline]
When I dial to this trunk I receive the response below:
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/6001-00000009”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/6001-00000009”, “SIP/mydivert/00905556960917,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:20] NoOp(“SIP/6001-00000009”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20”) in new stack
So no invites are going out of my device. Are you familiar to these? Especially why I can not see mydivert in peers? Why this trunk seem to be busy. I can not find a way out.
But it NEVER worked. I installed the asterisk settings for freepbx and it worked the first time. I don’t know what I did wrong but I may try and look at it.
In the meantime, can anyone point me to some resources to register phones off of a LAN but to connect to freepbx/asterisk.
On my system I have edited sip_nat.conf by hand. No, don’t edit the peers by hand. Do that in FreePBX gui.
You can do it ALL through the gui if you install the Asterisk SIP Settings module. I forgot about that as I don’t use it.
So again, to recap:
Edit sip_nat.conf by hand and put in the block we discussed above, then restart. Remove those lines from your mydivert trunk config in the FreePBX gui.
OR
Install Asterisk SIP Settings and set up the NAT options there. You would click
NAT: yes
IP Configuration: Dynamic IP
Dynamic Host: ulasyuce.dyn…whatever 120 Refresh rate
192.168.0.0 / 255.255.255.0 for Local Networks
then configure the rest of the stuff on the screen as you need it.
You need to see your external IP address in those SIP OPTIONS packets you’re sending to the provider. I mentioned that you need to configure NAT in the [general] section of sip.conf (or sip_nat.conf for FreePBX) and it looks like you’re still trying to do it in the trunk config.
[root@localhost asterisk]# cat sip_registrations.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
I was not changing conf files manually, i was only changing from web gui shoud I do it?
I can not touch sip.conf so should I change sip_additional.conf(which gui changes too)?
It already has the modifications I have done, you can see it as follows
[root@localhost asterisk]# cat sip_additional.conf
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
[mydivert]
disallow=all externhost=ulasyuce.dyndns-remote.com
externrefresh=120
localnet=192.168.0.0/255.255.255.0
localnet=127.0.0.0/255.255.255.0
nat=yes
username=0xxx
type=friend
srvlookup=yes
secret=xxxx
qualify=3600
qualify=yes
insecure=port,invite host=sip.mydivert.com
fromuser=xxxxx
dtmfmode=rfc2833
context=from-trunk
canreinvite=no
authuser=xxxxx
allow=alaw
allow=ulaw
allow=gsm
allow=slinear
allow=ilbc
sendrpid=yes
I see an option message with from : unknown , I am not sure if this is the problem. Other then OPTION message and 200 ok messages there is nothing else in these logs.
In wireshark logs there is only incoming messages and there is no outgoing messages to that service provider.
Yeah, your NAT config is not correct. The Contact header and Call-ID header should have your public IP address.
You don’t put the NAT stuff in the trunk config. Since you’re using FreePBX it goes in the sip_nat.conf (which gets included as part of the sip.conf general block).
localnet=192.168.0.120 is not right. Use a block something like this:
I’m having the same issue with Eurotech GSM gateway. After looking at the packets, I see all there is is OPTIONS back and forth between the gw and Asterisk.
So, when I try to make a call through the gw, wireshark doesn’t show it going to the gw at all. Wireshark and sip debug would show 3 IPs had this worked, my PC (softphone), Asterisk server and Eurotech GW IP. But I see PC and Asterisk IP only during calls.
And I get a CHANUVAIL congested hangupcause 20 message.
All the aforementioned IPs are in an office behind a router. And no firewalls between them.
Sounds like you have your outbound route set up incorrectly, since your call is not even attempting to use the trunk. It’s a different topic than this one, so I recommend starting a new thread. The OPTIONS packets you see are Asterisk’s pings to check that the trunk is alive.