sip_nat.conf owned by Asterisk

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#1
Hi to evryone, I wish you an happy 2009!!!

I've got a question... the file "sip_nat.conf" that I need to create on my PBX must be owned by Asterisk... but when I make "ls -l" from the shell... I see that "sip_nat.conf" is created by root...

Is it a probolem or not?... If it is, how can I build that file as Asterisk instead of root?

Thank you very much...

Mirko
 

telecomtechnician

Joined
Jan 8, 2008
Messages
422
Likes
0
Points
16
#2
Hi Mirko

sip_nat.conf is an included file in sip.conf, I cannot say much about the owner of the file, but I have worked with it the way it is and had no problems.

What is the issue if it belongs are not to asterisk? do you know the function of this file? it is a really important file for the external registrations in sip to work or not.

Waiting for your comments

David Medina
 

donhwyo

Joined
Aug 8, 2008
Messages
293
Likes
0
Points
0
#3
cd /etc/asterisk
chown asterisk:asterisk sip_nat.conf

Don
 

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#4
telecomtechnician said:
Hi Mirko

sip_nat.conf is an included file in sip.conf, I cannot say much about the owner of the file, but I have worked with it the way it is and had no problems.

What is the issue if it belongs are not to asterisk? do you know the function of this file? it is a really important file for the external registrations in sip to work or not.

Waiting for your comments

David Medina
Hi, my issue is that when I get an incoming call.. the call drops down after 10 seconds... I don't think it is a "sip_nat.conf" problem, because when I call from my mobile to the VoIP line, my internal extension rings... I catch the call and the audio is OK... but after 10/12 seconds my extension drops the call, and the call's timer on my mobile goes on like the call isn't dropped.

I'm going crazy during the last 2 weeks, because my PBX worked well in the past 2 month, and now I can't find the bug...

Mirko
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#5
defaultexpirey are changed, or not exist maybe into sip.conf - [general]?
Also, look you have "qualify" directive information.
Else, look at the default gateway, ethernet device (100/Full).
Asterisk restart after the call down?

Enable the debug mode :)
CLI>sip debug peer Extension

And look at the result.
 

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#6
defaultexpirey are changed, or not exist maybe into sip.conf - [general]?
No, in "sip.conf" section [general], I've got only:
jbenable=yes
jbforce=yes

and all the include lines... but they are all #include....
The only file that I really include is sip_nat.conf.

Also, look you have "qualify" directive information.
Yes, I've got all the qualify=yes, in the extension and in the trunk settings (both peer and user).

Else, look at the default gateway, ethernet device (100/Full).
My gateway is 192.168.1.1 (my Router)... What do you mean with (100/Full)?

Asterisk restart after the call down?
I think no... but now I try...and I'll tell you..

Enable the debug mode :)
CLI>sip debug peer Extension
And look at the result.
Ok...

Thank you for the help...
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#7
What do you mean with (100/Full)?
Ethernet Device:
10/100 Mb and Alf or Full duplex.

If you have a ethernet connection that use a 100Mb/Full Duplex to a switch that have a 100/Alf Duplex, you can have several collisions ethernet (error). So you must use the 100/Full everywhere (ethernet device, and switch).
 

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#8
danardf said:
Ethernet Device:
10/100 Mb and Alf or Full duplex.

If you have a ethernet connection that use a 100Mb/Full Duplex to a switch that have a 100/Alf Duplex, you can have several collisions ethernet (error). So you must use the 100/Full everywhere (ethernet device, and switch).
Ah, ok... I think my switch is Full-Duplex...
It is a D-Link, and the model is "di-634m".
I have watched the Data Sheet but I haven't nothing like full or half duplex.
Where can I get the confirm?

For the sip.conf file:
Is right that I only include the sip_nat.conf?

Because this is my file:

; do not edit this file, this is an auto-generated file by freepbx
; all modifications must be done from the web gui

[general]
;
; enable and force the sip jitterbuffer. If these settings are desired
; they should be set in the sip_general_custom.conf file as this file
; will get overwritten during reloads and upgrades.
;
jbenable=yes
jbforce=yes

; These will all be included in the [general] context
;
include sip_nat.conf
#include sip_general_additional.conf
#include sip_general_custom.conf
#include sip_registrations_custom.conf
#include sip_registrations.conf

; These should all be expected to come after the [general] context
;
#include sip_custom.conf
#include sip_additional.conf
#include sip_custom_post.conf


And I see that sip_general_additional.conf and sip_additional.conf are not included...
 

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#9
This is my Debug result (but I can't get a lot of information from this...):


-- fixed jitterbuffer destroyed on channel SIP/101-082be000
== Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/xxxxxxxxxxx-082b8578' in macro 'dial'
== Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/xxxxxxxxxxx-082b8578' in macro 'exten-vm'
== Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/xxxxxxxxxxx-082b8578'
-- Executing [h@macro-dial:1] Macro("SIP/xxxxxxxxxxx-082b8578", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/xxxxxxxxxxx-082b8578", "w") in new stack
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/xxxxxxxxxxx-082b8578", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/xxxxxxxxxxx-082b8578", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/xxxxxxxxxxx-082b8578", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/xxxxxxxxxxx-082b8578", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/xxxxxxxxxxx-082b8578", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/xxxxxxxxxxx-082b8578' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/xxxxxxxxxxx-082b8578'
-- fixed jitterbuffer destroyed on channel SIP/xxxxxxxxxxx-082b8578
info-solutions*CLI>
<--- SIP read from 192.168.1.69:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.74:5060;branch=z9hG4bK6ed0d265;rport=5060
From: "asterisk" <sip:asterisk@192.168.1.74>;tag=as3efd90f8
To: <sip:101@192.168.1.69:5060>;tag=422308430
Call-ID: 372dc23508d5444554f109bc6c46779d@192.168.1.74
CSeq: 102 NOTIFY
Contact: <sip:101@192.168.1.69:5060>
Supported: replaces
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
Really destroying SIP dialog '372dc23508d5444554f109bc6c46779d@192.168.1.74' Method: NOTIFY
info-solutions*CLI>
<--- SIP read from 192.168.1.69:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.74:5060;branch=z9hG4bK2708cd40;rport=5060
From: "my mobile" <sip:MY MOBILE@192.168.1.74>;tag=as6880e3d3
To: <sip:101@192.168.1.69:5060>;tag=1841551108
Call-ID: 603d428f006e7f0e713781c4655211fb@192.168.1.74
CSeq: 103 BYE
Contact: <sip:101@192.168.1.69:5060>
Supported: replaces
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0
 

Mirko87

Joined
Oct 20, 2008
Messages
128
Likes
0
Points
0
#10
I've just solved my issue...:laugh: :laugh: :laugh:

After 2 weeks of hard thinking...and testing...:woohoo:

It was a my error!!!...

In sip.conf... I've deleted the # from the "include sip_nat.conf"...
It is a stupid error, but the # is a comment in Python, and 2 years ago I've written a lot of scripts ".py". Now, I thinked that # was a comment here in Asterisk... but I was wrong!!!

Thank you to every one that helped me...

Oh my God.. It is the most unbelivable debug of my entire life... Damned #!!!!!!

Mirko
 

Members online

No members online now.

Forum statistics

Threads
30,952
Messages
130,980
Members
17,654
Latest member
janko67
Top