Calling *21*NUMBER# for telephone redirection

Hi,

I’m setting up an asterisk in our company but have a problem with it:
From our ISDN provider, we get a free service to redirect incomming calls when we are not available in the building. To enable this we used to dial 021TELNUMBER#, the first 0 being a number to ask an ouside line (on our old PBX).

Whne I try to do this from within asterisk I allways get CHAN unavailable.

More info:
– Executing [s@macro-dialout-trunk:26] Set(“SIP/41-08252748”, “the_num=21TELNUMBER%23”) in new stack
– Executing [s@macro-dialout-trunk:27] Dial(“SIP/41-08252748”, “mISDN/g:isdn/21TELNUMBER%23|300|”) in new stack
– Called g:isdn/21TELNUMBER%23
P[ 1] empty_chan_in_stack: cannot empty channel 255
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:28] Goto(“SIP/41-08252748”, “s-CHANUNAVAIL|1”) in new stack

I also tried calling to an internal number and links that to the outgoing number (so the %23 thing doesn’t occur).

– Executing [s@macro-dial:7] Dial(“SIP/41-08214f10”, “mISDN/g:isdn/210498309617#||tr”) in new stack
– Called g:isdn/21TELNUMBER#
P[ 1] empty_chan_in_stack: cannot empty channel 255
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dial:8] Set(“SIP/41-08214f10”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [s@macro-exten-vm:10] Set(“SIP/41-08214f10”, “SV_DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [s@macro-exten-vm:11] GosubIf(“SIP/41-08214f10”, “0?docfu|1”) in new stack
– Executing [s@macro-exten-vm:12] GosubIf(“SIP/41-08214f10”, “0?docfb|1”) in new stack
– Executing [s@macro-exten-vm:13] Set(“SIP/41-08214f10”, “DIALSTATUS=CHANUNAVAIL”) in new stack
– Executing [s@macro-exten-vm:14] NoOp(“SIP/41-08214f10”, “Voicemail is novm”) in new stack
– Executing [s@macro-exten-vm:15] GotoIf(“SIP/41-08214f10”, “1?s-CHANUNAVAIL|1”) in new stack

Are you using asterisknow? or Trixbox? Either way I would assume that you have built a calling rule telling the system that when you dial 21N to dial that through your ISDN line?

We are using Asterisk 1.6.1.6 with mISDN. So o asterisknow or trixbox.

We have also tried with mISDNv2 en chan_lcr but then I got following error:

[Sep 15 08:47:04] NOTICE[4348]: chan_lcr.c:1720 lcr_request: [call=NULL ast=NULL] Received request from Asterisk. (data=outgoing/21TELNR#)
[Sep 15 08:47:04] NOTICE[4348]: chan_lcr.c:315 alloc_call: [call=0 ast=NULL] Call instance allocated.
[Sep 15 08:47:04] NOTICE[4348]: chan_lcr.c:1822 lcr_call: [call=NULL ast=lcr/4] Received call from Asterisk.
[Sep 15 08:47:04] NOTICE[4348]: chan_lcr.c:351 send_message: [call=NULL ast=NULL] Sending MESSAGE_NEWREF to socket.
[Sep 15 08:47:04] NOTICE[4239]: chan_lcr.c:1269 receive_message: [call=NULL ast=NULL] Received new ref by LCR, as requested from chan_lcr. (ref=4)
[Sep 15 08:47:04] NOTICE[4239]: chan_lcr.c:583 send_setup_to_lcr: [call=4 ast=lcr/4] Sending setup to LCR. (interface=outgoing dialstring=21TELNR#, cid=40)
[Sep 15 08:47:04] NOTICE[4239]: chan_lcr.c:351 send_message: [call=NULL ast=NULL] Sending MESSAGE_SETUP to socket.
[Sep 15 08:47:05] NOTICE[4239]: chan_lcr.c:1000 lcr_in_release: [call=4 ast=lcr/4] Incomming release from LCR, releasing ref. (cause=28)
[Sep 15 08:47:05] NOTICE[4239]: chan_lcr.c:1577 queue_send: [call=0 ast=lcr/4] Sending queued HANGUP to Asterisk.
[Sep 15 08:47:05] NOTICE[4348]: chan_lcr.c:2038 lcr_hangup: [call=0 ast=lcr/4] Received hangup from Asterisk thread.
[Sep 15 08:47:05] NOTICE[4348]: chan_lcr.c:2061 lcr_hangup: [call=0 ast=lcr/4] Freeing call instance, because we have no ref AND we are requesting no ref.
[Sep 15 08:47:05] NOTICE[4348]: chan_lcr.c:290 free_call: [call=0 ast=NULL] Call instance freed.
[Sep 15 08:47:05] WARNING[4348]: pbx.c:3839 __ast_pbx_run: Channel ‘SIP/40-09cb3178’ sent into invalid extension ‘600’ in context ‘from-sip’, but no invalid handler

Does nobody has any idea of how to solve this issue

Can you please paste your extensions.conf in here, so we can see what you have set for the context?

We are now trying with Dahdi and an analog line:

[extensions.conf]:

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

[globals]

[default]
include => from-sip

[from-sip]
include => misdnintern
include => misdnextern
include => out
include => omschakeling
include => queues
include => parkedcalls
include => conference

exten => 1234,1,Answer()
exten => 1234,2,Playback(pbx-invalid)
exten => 1234,3,Hangup()

exten => _XX,1,Answer()
exten => _XX,n,Dial(SIP/${EXTEN},,TtrkK)
exten => _XX,n,Hangup()


[out]
exten => 1,1,Answer()
exten => 1,n,Dial(DAHDI/1/0495042298,,A(hello-world)M(dtmf))
exten => 1,n,Goto(s-${DIALSTATUS},1)

exten => s-ANSWER,1,Background(hello-world)
exten => s-ANSWER,2,Hangup()

exten => s-NOANSWER,1,Background(pbx-invalidpark)
exten => s-NOANSWER,2,Hangup()

exten => s-UNKNOWN,1,Background(pbx-invalidpark)
exten => s-UNKNOWN,2,Hangup()

exten => s-.,1,BackGround(pbx-invalid)
exten => s-.,2,Hangup()

[misdnintern]
exten => _0X.,1,Answer()
exten => _0X.,n,Dial(DAHDI/g0/${EXTEN:1})
exten => _0X.,n,Hangup()

[misdnextern]

exten => 700,1,Dial(DAHDI/7/*21*0495042298#)

;exten => 11214911,1,Answer()
;exten => 11214911,2,Dial(SIP/50)
;exten => 11214911,3,Hangup()

exten => 11220419,1,Answer()
exten => 11220419,n,Set(CALLERID(num)=0${CALLERID(num)})
exten => 11220419,n,Queue(all,tr,,,45)
exten => 11220419,n,Hangup

[macro-dtmf]
exten => s,1,Background(vm-press)
exten => s,n,Background(digits/1)
exten => s,n,Read(NUMBER,,1)
exten => s,n,SayNumber($NUMBER)
exten => s,n,GotoIf($[ ${NUMBER} = 1 ]?100:200)
exten => s,100,Playback(auth-thankyou)
exten => s,200,Playback(vm-sorry)
exten => s,n,Hangup()

[omschakeling]

exten => _*21*X.,1,Dial(DAHDI/8/${exten})
exten => 600,1,Dial(DAHDI/8/*21*0498506822#)
exten => 604,1,Dial(dahdi/8/0495042298,,r)

It contains also a bit of test data