Callforward is not forwarding externel lines!

Hallo

I configured callforward in asterisk but it only forwards the internal calls and not the external calls from ISDN lines.

Is there someone in the forum that allso had this problem and solved it? I am running asterisk 1.4.2, without webinterface.

Some help would be appreciated,
Thanks

Willy

PS:
I used the macro:
For asterisk 1.4

from :http://www.nslu2-linux.org/wiki/Optware/AsteriskStdextenMacro

[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
; ${ARG3} - Dial command arguments
;
exten => s,1,GotoIf(${DB_EXISTS(CFU/${ARG1})}?2:4) ; If CFU key not existing, ring the interface
exten => s,2,Dial(Local/${DB_RESULT}@default/n) ; Unconditional Forward
exten => s,3,Voicemail(${ARG1},u) ; If CFU failed, send to voicemail w/ unavail announce
exten => s,4,Dial(${ARG2},30,${ARG3}) ; Ring the interface, 30 seconds maximum
exten => s,5,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,GotoIf(${DB_EXISTS(CFNA/${ARG1})}?2:3) ; If CFNA key not existing, goto voicemail
exten => s-NOANSWER,2,Dial(Local/${DB_RESULT}@default/n) ; Forward on No Answer
exten => s-NOANSWER,3,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,4,Goto(s,4) ; If they press #, return to ring the interface

exten => s-BUSY,1,GotoIf(${DB_EXISTS(CFB/${ARG1})}?2:3) ; If CFB key not existing, goto voicemail
exten => s-BUSY,2,Dial(Local/${DB_RESULT}@default/n) ; Forward on Busy
exten => s-BUSY,3,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,4,Goto(s,4) ; If they press #, return to ring the interface

exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1}@default) ; If they press *, send the user into VoicemailMain

Hi

(Local/${DB_RESULT}@default/n)

is your problem.

it will dial the number in the default context.

your outgoing wont be in this context i guess. This will need changing to suit your dialplan

Ian

Hi Ian

Thank you,
but is the local in “Dial(Local/${DB_RESULT}@default/n)” not the local to point to the local asterisk datatabase “astdb” ?

Willy

No The Local is the Local channel so this has to be a valid context that has the required number in it, Thats why internal works

Ian

Thank you Ian,

So, as I am soooo new to asterisk, what would i have to fill in instead of local?

Could you please point me to te part of the dialplan that matters here, then I can try solving it myselve witch I prefer, or I can send you that part if i do not find it.

Willy

You may want to post relevant portions of zapata.conf and extensions.conf, especially the [default] context.

Below you can see an part of the things that I think are relavant to tha callforward in my dialplan.
I do not find a [default] context other that in voicemail.conf (see below)

voicemail.conf
[general]
#include vm_general.inc
#include vm_email.inc
[default]

;Without voicemail:
9245 => 9999,xxxxx,attach=no|saycid=no|envelope=no|delete=no|nextaftercmd=no
9291 => 9999,yyyyy,attach=no|saycid=no|envelope=no|delete=no|nextaftercmd=no
9354 => 9999,zzzzz,attach=no|saycid=no|envelope=no|delete=no|nextaftercmd=no

;With Voicemail

9391 => 9999,iiiiii,iiiiiii@emailadress.org,attach=yes|saycid=no|envelope=no|delete=yes|nextaftercmd=no
9438 => 9999,jjjjjj,jjjjjjj@emailadress.org,attach=yes|saycid=no|envelope=no|delete=yes|nextaftercmd=no
8242 => 9999,kkkkkk,kkkkkkk@emailadress.org,attach=yes|saycid=no|envelope=no|delete=yes|nextaftercmd=no


Complete zapata.conf
:Zapata telephony interface
[trunkgroups]
[channels]

context=default

switchtype=national
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
echocancel=yes
context = zap-in
signalling = fxs_ks
channel => 1,2


[macro-stdexten] ;this is, I think, very relevant

exten => s,1,GotoIf(${DB_EXISTS(CFU/${ARG1})}?2:4) ; If CFU key not existi
exten => s,2,Dial(Local/${DB_RESULT}@users/n,20,); Unconditional Forward
exten => s,3,Voicemail(${ARG1},u) ; If CFU failed, send to voicema
exten => s,4,Dial(${ARG2},30,) ; Ring the interface, 30 seconds
exten => s,5,Goto(s-${DIALSTATUS},1) ; Jump based on status

[apps]

;Call Forward Unconditional as in my dialplan.

exten => _21X.,1,Set(DB(CFU/${CALLERID(num)})=${EXTEN:4})
exten => _21X.,2,Playback(call-fwd-unconditional)
exten => _21X.,3,Playback(has-been-set-to)
exten => _21X.,4,SayDigits(${EXTEN:4})
exten => _21X.,5,Hangup

Thank you for helping,

Willy

Note that [default] is not a special predefined context. So if zapata.conf calls for it, it must be defined somewhere in your dial plan.

Is your system handling incoming calls at all?

Yep. Very relevant. First of all, I notice that this Dial line uses a different destination as in your original posting - Local/${DB_RESULT}@default/n. So I assume that [users] context is defined and that’s how internal calls work. (It helps to clarify what is “internal” in your configuration. FXS?)

If so, the reason why external (FXO) calls are not forwarded is because Asterisk can’t find a context to handle the calls at all.

Thank you all,

It is fixed by a frend. Now I can start learning the right way, from the beinning now that things are working propperly.

Thanks again,

Willy