How to allow outgoing calls through the pstn

Hello everybody i have a big problem i dont know how make outgoing calls to the pstn, i can receive incoming calls. but i need make local calls, can somebody help me please

somebody know some configuration for that please.

thank you
Regards

I am not an expert in Asterisk, but I will try. I have some configurations running.

My first question is how you are connected to the PSTN line?

I am not an expert in Asterisk, but I will try. I have some configurations running.

My first question is how you are connected to the PSTN line?

thank you for try, well i have a spa3102+pap2+asterisk

i have 4 extension
20000 and 20100 for the pap2

20200 for the analogo phone connected to spa3102 in port phone and the port line i have conected the pstn line.

and 20300 for a softphone

i can call to whatever extension and i can receive calls from pstn line too, but for some reason i can not do outgoing calls to the pstn, i want do calls to pstn from all extension but now i can do that,

i got a error on asterisk CLI when i try dial some local number

-- Executing [2788099@users:1] Dial("SIP/20000-081f5f00", "SIP/spa400/2788099") in new stack
-- Called spa400/2788099
-- Got SIP response 482 "Loop Detected" back from 200.30.165.18
-- Now forwarding SIP/20000-081f5f00 to 'Local/2788099@incoming-calls' (thanks to SIP/spa400-081f9e78)

[Jan 29 21:03:03] NOTICE[23179]: chan_local.c:571 local_alloc: No such extension/context 2788099@incoming-calls creating local channel
[Jan 29 21:03:03] NOTICE[23179]: app_dial.c:505 wait_for_answer: Unable to create local channel for call forward to ‘Local/2788099@incoming-calls’ (cause = 0)
== Everyone is busy/congested at this time (1:0/0/1)
== Auto fallthrough, channel ‘SIP/20000-081f5f00’ status is ‘CHANUNAVAIL’

I have the following conf in extensions.conf

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[globals]
CONSOLE=Console/dsp

;----------------------------------------example-----------------------------------------

[macro-phone]
exten => s,1,Dial(SIP/${MACRO_EXTEN},25)
exten => s,n,Goto(${DIALSTATUS},1)

exten => ANSWER,1,Hangup
exten => CANCEL,1,Hangup
exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)

[stations]
exten => 20000,1,Macro(phone)
exten => 20100,1,Macro(phone)
exten => 20200,1,Macro(phone)
exten => 20300,1,Macro(phone)

[long-distance]
exten => _NXXNXXXXXX,1,Dial(SIP/spa400/1${EXTEN})
exten => _1NXXNXXXXXX,1,Dial(SIP/spa400/${EXTEN})

[local]
exten => _NXXXXXX,1,Dial(SIP/spa400/${EXTEN})

[incoming-calls]
exten => spa400,1,Goto(stations,20200,1)

[users]
include => stations
include => local
include => long-distance
include => incoming-calls

;----------------------------------------------END----------------------------------------

thank you so much for your help

Regards

Check this topic, it helped me a lot:
forums.digium.com/viewtopic.php? … highlight= .
Cheers.

Marco Bruni

Thank you for your help

best regards

Sorry, but I can’t help you with this one. I have a SPA-1001 but that not for PSTN lines.

For the PSTN I am using the DIGIUM card.

I hope you can solve your Asterisk problems!

Hello everybody I resolved the problem with asterisk making outgoing calls but now, i can not receive calls from PSTN, asterisk show me a NOTICE, and i think that is the port 5061 that is not opened,

bit i dont know how open ports in Debian can anyone help me please

here is the messages that asterisk show

[Jan 30 16:16:41] NOTICE[2981] chan_sip.c:7422 sip_reg_timeout – Registration for spa400@ip de asterisk timed out, trying again (Attempt #1)

if anybody can help me please

Thank you
Regards