Route incoming calls to a SIP

Hi everybody, I’ve configured Asterisk and I’d like to automatically route the calls made from an external phone number to one of my sip clients in my own network. So the person in this SIP can act as a receptionist and transfer the calls to anyone in the network.

I guess your external line will be connected to analog card using zap, if so , then in your zapata.conf land the call from out side to an extension , say , from_outside.
in your extensions.conf add:
[from_outside]
exten => s,1,Dial(SIP/reception,20)
exten => s,2,VoiceMail(600@default)

replace reception with the sip client for your reception, adjust the second line to work with your voice mail , if you will use any.
regards
Vaio

look if it is right.

zapata.conf

[trunkgroups]
; define any trunk groups

[channels]
;hardware channels

;default
usercallerid=yes
hide callerid=no
call waiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes

;define channels
context=incoming ; incoming calls go to [incoming] extensions.conf
signaling=fxs_ks ; Use FXS signaling for an FXO channel
channel => 1 ; PSTN attached to port 1

and my extensions.conf:

[general]
autofallthrough=no

[globals]
include => ext-local
include => xlite
include => 401
include => 402
include => incoming

[default]

[ext-local]
exten =>401,1,Dial(SIP/401,15)
exten =>401,2,Hangup
exten =>402,1,Dial(SIP/402,15)
exten =>402,2,Hangup

[incoming]
exten => s,1,Dial(SIP/401,20)
exten => s,2,VoiceMail(600@default)

thanks for the help

it didn’t work. Somebody can help me and tell me what is wrong?

Can you dial the following extension 401 from your local system ?

Thanks,
Suresh.

[quote=“agni_suresh896”]Can you dial the following extension 401 from your local system ?

Thanks,
Suresh.[/quote]
Form SIP 402 I can call SIP 401

Is the extensions reaching voicemail ?