How to call to public numbers!?

I have finish install the new version of asterisk (1.4) from digium with the GUI, and i now can make internal calls trough my LAN normally. I have subscribed a SIP provider so i can deliver them the calls i want to make to “outside”. I have configured the trunk, but i still cant make calls to outside.

Is anything missing me!??? (like dial configs!)

remember, with asterisk a channel does not equal an extension.

You have channels- such as the SIP peer to your phone, or zaptel ports, or the SIP peer for your provider.

You then have extensions, things that can be dialed, which may (or may not) connect you to those channels.

Whatever extensions.conf context your extensions are in needs to be able to dial out…

Iron,

Im sorry…i didnt understand your explanation.

Using the proxy from my provider in my sip phone i can call to any number outside my company. But when i use my Asterisk Server, and after setting up a trunk to my provider i cant make those calls.

Thank you

what i mean is that the reason you cannot make calls is asterisk is not configured right.

on a standard old style pbx, like a key system or hybrid that would service a small office, a channel (the physical port that the phone plugs into) and an extension (what you push to dial that phone) will usually be the same thing. Dialing 204 dials the phone plugged into port 204.

With Asterisk this is not so. Asterisk separates channels (sip.conf entries) from extensions (extensions.conf entries)

so to make yourself able to dial out you need to give the phone an extension to do so.

Look at sip.conf, for the sip phones there is context=. this context is what the phones are ‘in’, when you pick up one it can dial ONLY any extension or pattern in that context, and any other context included in it.

Now look at the sip.conf entry for your provider. It should have a different entry for context.

The following example code is designed to teach you, not be copied verbatim.

Sip.conf

[provider]
blah blah blah
context=incoming

[phone1]
blah blah blah
context=phones

[phone2]
blah blah blah
context=phones

extensions.conf

[phones] ; the phones are in this context so they dial things in it

exten => 11,1,Dial(SIP/phone1,20)
exten => 11,2,VoiceMail(1234@default)

exten => 12,1,Dial(SIP/phone2,20)
exten => 12,2,VoiceMail(5555@default)

[incoming] ; the provider is in this context so an incoming call goes here
exten => s,1,Dial(SIP/phone1&SIP/phone2,20) ; when call comes in ring both phones 20 seconds
exten => s,2,Voicemail(1234@default) ; then go to voicemail

The above is probably similar to what you have.
Now for a phone in the [phones] context, it can ONLY dial 11 or 12.
If you want to make it able to dial out you can add something like

exten => _1NXXNXXXXXX,1,Dial(SIP/provider/${EXTEN})
_ means a pattern follows, and the 1nxx thing will match any USA 11 digit number. ${EXTEN} is whatever was dialed, so it will make the outgoing call using the provider.

does that help?

Yes…

Now i have it working

Thank You