[Asterisk-Users] chan-capi: Sending digits on a bri (isdn)
d-channel
Armin Schindler
armin at melware.de
Mon Apr 3 01:37:05 MST 2006
Using Dial() for this is not correct, because the Asterisk Dial() command
is not just for dialing a number, it also then connects the dialing with the
dialed channel, which is not what you want.
I had a close look into the Asterisk application and I thought
app_senddtmf will help, but the app will not call the senddigit function of
the channels, it produces DTMF tones.
So what you are looking for is a app_senddigit, but as far as I can see this
is not existent in Asterisk!?
We could add this as a capicommand() to chan-capi, but the correct way would
be to provide this as a common app, which calls the correct function in
the channel driver.
Armin
On Sun, 2 Apr 2006, Raoul Bönisch wrote:
> Dear asterisk users!
>
> I want to control a hardware pbx with asterisk. What I need to do
> this is being able to press "hold" which can be done with
> capicommand(hold) and then send digits on a bri card which
> connects to my asterisk computer. So far I use
> Dial(CAPI/ISDN1/27:<<digits>>/bo,15) to do this. Are there better
> ways? Note that these are not dtmf, I'm afraid.
>
> I use an AVM Fritz!classic ISA card with the fcclassic kernel
> module on linux 2.6.16, asterisk version 1.2.4 on Debian unstable.
> To use the AVM card with asterisk I compiled the latest cvs tree of
> chan-capi-cm. The hardware pbx is a T-Eumex 312 (product of the
> german Telekom).
>
> What I basically do is pretending asterisk is an original isdn
> phone connected to the hardware pbx and it should send the proper
> key presses that the hardware pbx understands. E.g. I'd like to
> forward a call. Therefore asterisk would have to press "hold" when
> a call is active, then dial the number of the phone the call should
> be forwarded to, then press "*", "6", "1".
>
> I use this extension to do it:
>
> exten => 29,1,Answer
> exten => 29,2,Wait(3)
> exten => 29,3,Playback(echo-test)
> exten => 29,4,Wait(1)
> exten => 29,5,capicommand(hold)
> exten => 29,6,Dial(CAPI/ISDN1/27:12/bo,15)
> exten => 29,7,capicommand(retrieve)
> exten => 29,8,Playback(echo-test)
> exten => 29,9,Playback(Welcome)
> exten => 29,10,Wait(5)
> exten => 29,11,Hangup
>
> Note, that in Dial(CAPI/ISDN1/27:12/bo,15), the 12 is the internal
> number of the phone asterisk should forward the call to. Welcome and
> echo-test are just for testing purposes. I can hear the first output
> of echo-test when I call extension 29 and the call is properly put
> on "hold". Then phone number 12 rings as expected. However when I
> pick up phone number 12, the connections are hung up.
>
> I derive this from the following output of asterisk -r -vvv:
>
> -- CONNECT_IND
> (PLCI=0x101,DID=29,CID=14,CIP=0x4,CONTROLLER=0x1)
> == Started pbx on channel CAPI/ISDN1/29-20
> -- Executing Answer("CAPI/ISDN1/29-20", "") in new stack
> -- Executing Wait("CAPI/ISDN1/29-20", "3") in new stack
> Apr 2 00:16:41 WARNING[11926]: channel.c:1591
> ast_waitfor_nandfds: Thread -1230230608 Blocking
> 'CAPI/ISDN1/29-20', already blocked by thread 0 in procedure
> (null)
> -- Executing Playback("CAPI/ISDN1/29-20", "echo-test") in new
> stack
> -- Playing 'echo-test' (language 'de')
> -- Executing Wait("CAPI/ISDN1/29-20", "1") in new stack
> -- Executing capiCommand("CAPI/ISDN1/29-20", "hold") in new
> stack
> -- capiCommand: 'hold' '(null)'
> > ISDN1: sent HOLD for PLCI=0x101
> -- Executing Dial("CAPI/ISDN1/29-20",
> "CAPI/ISDN1/27:12/bo|15") in new stack
> > data = ISDN1/27:12/bo
> > capi request for interface 'ISDN1'
> == ISDN1: Call CAPI/ISDN1/12-21 with B3 overlap (pres=0x00,
> ton=0x41)
> -- Called ISDN1/27:12/bo
> Apr 2 00:16:48 WARNING[11926]: channel.c:1591
> ast_waitfor_nandfds: Thread -1230230608 Blocking
> 'CAPI/ISDN1/12-21', already blocked by thread 0 in procedure
> (null)
> -- ISDN1: received CONNECT_CONF PLCI = 0x201
> -- ISDN1: PLCI=0x101 put onhold
> -- CAPI/ISDN1/12-21 is making progress passing it to
> CAPI/ISDN1/29-20
> -- CAPI/ISDN1/12-21 is ringing
> -- ISDN1: attempting ALERT in state 10
> -- CAPI/ISDN1/12-21 answered CAPI/ISDN1/29-20
> > ISDN1: using PLCI=0x101 for retrieve
> > ISDN1: sent RETRIEVE for PLCI=0x101
> -- Attempting native bridge of CAPI/ISDN1/29-20 and
> CAPI/ISDN1/12-21
> -- ISDN1: activehangingup (cause=0)
> == Spawn extension (from-tk, 29, 6) exited non-zero on
> 'CAPI/ISDN1/29-20'
> == ISDN1: Interface cleanup PLCI=0x101
> == ISDN1: Interface cleanup PLCI=0x201
>
>
> Note the statement "ISDN1: activehangingup (cause=0)" which is
> what reports the call being hung up. This is not what I expect.
> The call should have been forwarded to phone number 12 and not
> hung up. How can I avoid this?
>
> Thanks in advance.
>
> Raoul
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list