Question

I m beginner for asterisk, so I cannot transfer call from main line to asterisk line, can anyone help me?? I have Asterisk card which have 4 port, 2 for FXO and 2 for FXS and I attached 2 land-line on FXS port and plugged PSTN line in FXO port, I generated DAHDI extension for those two land-line one was 101 and second one is 102, I check both can call each-other successfully, using soft-phone also can call on 101 and 102 but problem is there when someone call on land-line they cannot ring and cannot attend the call, so please some give me dial plane.

I also configure

extension.conf

[incoming]
exten => s,1,Answer( )
exten => s,2,Background(enter-ext-of-person)
exten => 101,1,Dial(Dahdi/1,10)
exten => 101,2,Playback(vm-nobodyavail)
exten => 101,3,Hangup( )
exten => 101,102,Playback(tt-allbusy)
exten => 101,103,Hangup( )
exten => 102,1,Dial(SIP/Jane,10)
exten => 102,2,Playback(vm-nobodyavail)
exten => 102,3,Hangup( )
exten => 102,102,Playback(tt-allbusy)
exten => 102,103,Hangup( )
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup( )
[internal]
exten => 101,1,Dial(Dahdi/1,,r)
exten => tejas,1,Dial(Dahdi/1,,r)
exten => 102,1,Dial(Dahdi/chirag,,r)
exten => chirag,1,Dial(Dahdi/chirag,,r)

but still unsuccess.... so please help me....

for your more information I will paste some other .conf file


/etc/dahdi/system.conf

fxsks=1,2 
fxoks=3,4 
loadzone=in 
defaultzone=in 

As show in above file system.conf in this fxsks channels are 1 & 2 and fxoks channels are 3 & 4 but I also used freePBX for gui mode in this When I searched Connectivity => Dahdi then I got fxsks channels are 3 & 4 and fxoks channels are 1 & 2, which one is right???

/etc/asterisk/chan_dahdi.conf

[general] 
#include chan_dahdi_general.conf 
#include chan_dahdi_general_custome.conf 
[channels] 
language=en 
busydetect=yes 
busycount=10 
usecallerid=yes 
callwaiting=yes 
usecallingpres=yes 
threewaycalling=yes 
transfer=yes 
cancallforward=yes 
callreturn=yes 
echocancel=yes 
echocancelwhenbridged=no 
echotraining=no 
immediate=no 
faxdetect=no 
rxgain=0.0 
txgain=0.0 

#include chan_dahdi_channels_custem.conf 
#include chan_dahdi_groups.conf 
#include chan_dahdi_additional.conf 

/etc/asterisk/dahdi-channels.conf

;line="1 WCTDM/4/0 FXSKS (in use) (EC:MG2-INACTIVE)" 
signalling=fxs_ks 
callerid=asreceived 
group=0 
context=from-pstn 
channel=>1 
callerid= 
group= 
context=default 
;line="2 WCTDM/4/1 FXSKS (in use) (EC:MG2-INACTIVE)" 
signalling=fxs_ks 
callerid=asreceived 
group=0 
context=from-pstn 
channel=>2 
callerid= 
group= 
context=default 
;line="3 WCTDM/4/2 FXOKS (in use) (EC:MG2-INACTIVE)" 
signalling=fxo_ks 
callerid="channel 3" <4003> 
mailbox=4003 
group=5 
context=from-internal 
channel=>3 
callerid= 
mailbox= 
group= 
context=default 
;line="4 WCTDM/4/3 FXOKS (in use) (EC:MG2-INACTIVE)" 
signalling=fxo_ks 
callerid="channel 4" <4004> 
mailbox=4004 
group=5 
context=from-internal 
channel=>4 
callerid= 
mailbox= 
group= 
context=default 

I got one more conf file which name is Zapata which I post bellow..

etc/asterisk/zapata.conf.template

[channels] 
language=en 
#include zapata_additional.conf 
context=from-pstn 
signalling=fxs_ks 
faxdetect=incoming 
usecallerid=yes 
echocancel=yes 
echocancelwhenbridged=no 
echotraining=800 
group=0 
channel=1-2 

and more thing I done change just in extension.conf which I mentioned in starting of discussion

I want share some more information, I install freePBX in server PC based on CentOS without gui interface, and I used freePBX in other pc using IP address of server. And I made some extension based on SIP and Dahdi and its works successfully, If I call 101(Dahdi extension) from 105(SIP Extension) using soft-phone its work. But when I try to call from my phone to landline then Dahdi extension line not get ring. I also try to modify extension.conf file which I mentioned in above comment.. Tell one thing which way is better using freePBX or using modification in conf file?? Thanks....

Was it helpful?

Solution

Got it -- you don't have a context defined for from-pstn as specified in dahdi-channels.conf

Outside of freePBX the raw asterisk configuration would be, in your extensions.conf you'll need to add a section like this:

[from-pstn]
exten => _X.,1,Noop(Incoming call "from PSTN")
same =>      n,Answer()
same =>      n,Playback(demo-congrats)
same =>      n,Hangup()

In dahdi-channels.conf in the first two sections there's a definition of context=from-pstn which you'll need an accompanying context in your extensions.conf

The [bracketed] items are "contexts" in Asterisk, and specify a certain context in which the dialplan operates. More information can be found, especially, from the (free) book "Asterisk: The Future of Telephony"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top