[Asterisk-bugs] [Asterisk 0009449]: "Dial(mISDN/g:te/${EXTEN})" don't set up L2Link but "Dial(mISDN/1/${EXTEN}" works
noreply at bugs.diguim.com
noreply at bugs.diguim.com
Fri Jun 29 03:08:28 CDT 2007
email_notification_title_for_action_bugnote_submitted
======================================================================
http://bugs.digium.com/view.php?id=9449
======================================================================
Reported By: ibc
Assigned To: crich
======================================================================
Project: Asterisk
Issue ID: 9449
Category: Channels/chan_misdn
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.4.2
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: No
======================================================================
Date Submitted: 04-03-2007 06:43 CDT
Last Modified: 06-29-2007 03:08 CDT
======================================================================
Summary: "Dial(mISDN/g:te/${EXTEN})" don't set up L2Link but
"Dial(mISDN/1/${EXTEN}" works
Description:
Asterisk 1.4.2 with Junghans QuadBri BRI-ISDN card handled with mISDN.
I have 3 BRI's in PTP mode configured as a "te" group in misdn.conf and
incoming calls work perfectly.
Outgoing calls dialing the "te" group fail but outgoings calls dialing any
mISDN port work. The following example shows what I mean:
- 940 exten is: Dial(mISDN/g:te/675511308)
- 941 exten is: Dial(mISDN/1/675511308)
- "te" group is:
[te]
ports=1,2,3
context=entrantes-analogicas
msns=*
I dial 940 and it fails:
-------------------------------------------
asterisk*CLI> misdn show stacks
BEGIN STACK_LIST:
* Port 1 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
* Port 2 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
* Port 3 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
-- Executing [940 at desde-usuarios:1] Dial("SIP/ibc-tfno-ip-b5907340",
"mISDN/g:te/675511308") in new stack
P[ 1] Port Down L2:0 L1:1
P[ 2] Port Down L2:0 L1:1
P[ 3] Port Down L2:0 L1:1
[Apr 3 12:16:08] WARNING[23210]: chan_misdn.c:5256 chan_misdn_log: Could
not create channel on port:-1 with extensions:675511308
-------------------------------------------
I dial 941 and it works:
-------------------------------------------
asterisk*CLI> misdn show stacks
BEGIN STACK_LIST:
* Port 1 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
* Port 2 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
* Port 3 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
-- Executing [941 at desde-usuarios:1] Dial("SIP/ibc-tfno-ip-b5900c90",
"mISDN/1/675511308") in new stack
P[ 0] maxnum:2 -- Called 1/675511308
P[ 1] channel already in use:1
-- mISDN/1-u271 is proceeding passing it to SIP/ibc-tfno-ip-b5900c90
-------------------------------------------
If I call instantly 940 it works because there is at least one port with
L2Link UP (port 1):
-------------------------------------------
asterisk*CLI> misdn show stacks
BEGIN STACK_LIST:
* Port 1 Type TE Prot. PTP L2Link UP L1Link:UP Blocked:0 Debug:0
* Port 2 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
* Port 3 Type TE Prot. PTP L2Link DOWN L1Link:UP Blocked:0 Debug:0
-- Executing [940 at desde-usuarios:1] Dial("SIP/ibc-tfno-ip-b5900c90",
"mISDN/g:te/675511308") in new stack
P[ 0] maxnum:2 -- Called g:te/675511308
P[ 1] channel already in use:1
-- mISDN/1-u275 is proceeding passing it to SIP/ibc-tfno-ip-b5900c90
-------------------------------------------
So my conclusion is:
- Dialing directly to a mISDN port works well and sets up port L2Link.
- Dialing to a mISDN group JUST works if there is a port with L2Link UP.
======================================================================
----------------------------------------------------------------------
jasperroel - 06-29-07 03:08
----------------------------------------------------------------------
After some playing, we found the 'problem' in channels/chan_misdn.c. Local
revision: 68733 (Asterisk v1.4.5)
The function misdn_check_l2l1, line number 5062 contains a check to see if
the line we are calling from is a mISDN channel. While this is a good
thing, we are using the function to check if the line we are calling (which
is a mISDN line) is up, not the line we are calling from (which is a SIP
connection from our LAN).
The function would keep returning -1 because of this check. Because the
*chan is not used anywhere else in this function, we disabled the check
(line 5065 - 5068) and recompiled Asterisk.
And presto, it now works great!
We ended up with the following piece of code:
[macro-outbound]
exten => s,1,misdn_check_l2l1(g:outsidelines|1)
exten => s,n,Dial(mISDN/g:outsidelines/${ARG1})
Hope this helps!
Issue History
Date Modified Username Field Change
======================================================================
06-29-07 03:08 jasperroel Note Added: 0065890
======================================================================
More information about the Asterisk-bugs
mailing list