Configuring extensions.conf and sip.conf

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Configuring extensions.conf and sip.conf

Postby alemono95 » Mon Jan 04, 2016 12:29 am

Hi to everyone!
I'm trying to set up asterisk to make inbound and outbound calls, without good results..
Here's my sip.conf
Code: Select all
[40]
type = friend
host = dynamic
port = 5060
context = out
secret = password
nat = yes
canreinvite = no
dtmfmode = rfc2833
mailbox = 40
deny = 0.0.0.0/0.0.0.0
permit = 192.168.1.0/255.255.255.0

[41]
type = friend
host = dynamic
port = 5060
context = out
secret = password
nat = yes
canreinvite = no
dtmfmode = rfc2833
mailbox = 41
deny = 0.0.0.0/0.0.0.0
permit = 192.168.1.0/255.255.255.0

and here my extensions.conf
Code: Select all
    [general]
    static = yes
    writeprotect = no
    autofallthrough = no

    [default]
    ; Segreteria Telefonica
    exten => 777,1,VoiceMailMain(${EXTEN@default})
    exten => 777,2,Hangup()

    ; Definizione interni
    exten => 40,1,Macro(intcall,40);
    exten => 41,1,Macro(intcall,41);

   [from-pstn]
exten=> s,1,Answer()
   exten=> s,2,Dial(SIP/${ARG1})

    [macro-intcall]
    exten => s,1,Dial(SIP/${ARG1},30)
    exten => s,2,VoiceMail(${ARG1})
    exten => s,3,Hangup()

*Note that there isn't an outbound rule, because i'm setting up the inbound rules; if you now how to setu up it help me ;) *

Can you help me with this issues?
I'm new with asterisk!
Can you post the right code? I would like only to make and receive calls..

Thank you so much!
Ale
alemono95
Newsterisk
 
Posts: 9
Joined: Mon Dec 28, 2015 6:44 am

Re: Configuring extensions.conf and sip.conf

Postby david55 » Mon Jan 04, 2016 4:34 am

You have no devices in a context for which extensions are defined in extensions.conf.

autofallthrough=no has been a very unusual setting since autofallthrough was introduced.

In addition:

type=friend is usually a bad idea.

Are the phones really inside NAT and the PABX outside?
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Configuring extensions.conf and sip.conf

Postby alemono95 » Mon Jan 04, 2016 10:54 am

No phones and server are in the same network...
I corrected those errors but it doesn't work!
Can you post me an example of a sip.conf file and an extensions.conf file?
I think that the error is in the extensions..

Thank you

Ale
alemono95
Newsterisk
 
Posts: 9
Joined: Mon Dec 28, 2015 6:44 am

Re: Configuring extensions.conf and sip.conf

Postby david55 » Mon Jan 04, 2016 10:58 am

Samples come with the source distribution.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: Configuring extensions.conf and sip.conf

Postby ambiorixg12 » Mon Jan 04, 2016 12:41 pm

it seems default is the context used for internal calls, so change the context in your sip peers from out to default
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic

Re: Configuring extensions.conf and sip.conf

Postby alemono95 » Tue Jan 05, 2016 12:54 am

ambiorixg12 wrote:it seems default is the context used for internal calls, so change the context in your sip peers from out to default

I tried to change it, but it didn't work!

i also looked on the web and also on the example in extensions.conf but i can't do it..
Is there something like a log to see if the fxo module is properly configurated and it receive calls?

Thanks
alemono95
Newsterisk
 
Posts: 9
Joined: Mon Dec 28, 2015 6:44 am

Re: Configuring extensions.conf and sip.conf

Postby david55 » Tue Jan 05, 2016 2:19 am

Asterisk has extensive logging capabilities. Look at the result of

help core set debug
and
help core set verbose

Also look at the file logger.conf

Individual channel technologies also have CLI commands to enable protocol logging.

https://wiki.asterisk.org/wiki/display/ ... nformation
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest