* don't send Q.931 DISCONNECT after Hangup


#1

Hello

model:
SIP hardphone <-> * PBX <-> ISDN line & analog line

problem:

for outgoing and incomming calls
when SIP hardphone hangup

  • don’t generate DISCONNECT Q.931 message
    i get that message from ISDN network (usually 60-90 sec. - normal provider conf.) but, in that time, calle telephone is locked

PC.conf:
2.6.15.4 i686 GNU/Linux (Debian 3.1)
Junghanns quadBRI ISDN controller: Cologne Chip Designs GmbH: Unknown device 08b4 (rev 01)
Subsystem: Cologne Chip Designs GmbH: Unknown device b520
TDM: Network controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
Asterisk 1.2.4
bristuff-0.3.0-PRE-1l
libpri-1.2.2
zaptel-1.2.3

Analog line works fine.

Good people, do You have any solution, clues, sugestions ?
Thanks for any replay.

Configs and example log below:
Asterisk.conf:
zaptel.conf:

bchan=1,2
bchan=3
bchan=4,5
dchan=6
bchan=7,8
dchan=9
bchan=10,11
dchan=12
span=1,1,3,ccs,ami
span=2,1,3,ccs,ami
span=3,1,3,ccs,ami
span=4,1,3,ccs,ami
fxsks=13
fxsks=14
fxsks=15
fxsks=16
loadzone=pl
defaultzone=pl

zapata.conf

[channels] language=pl signalling = bri_cpe_ptmp switchtype=euroisdn overlapdial=no pridialplan=local priindication=inband busydetect=no callprogress=no immediate=no callwaiting=no callwaitingcallerid=no threewaycalling=no transfer=yes cancallforward=no callreturn=no useincomingcalleridonzaptransfer=yes callerid=asreceived usecallerid=yes hidecallerid=no restrictcid=no usecallingpres=yes relaxdtmf=no echocancel = yes echocancelwhenbridged=yes echotraining=no rxgain=0.0 txgain=0.0 prilocaldialplan = local nationalprefix = 0 internationalprefix = 00 context = line1 group = 1 channel => 1-2 context = line2 group = 2 channel => 4-5 context = line3 resetinterval = 60 group = 3 channel => 7-8 context = line4 group = 4 channel => 10-11 signalling=fxs_ks echotraining=400 group=6 context=fax channel => 15 signalling=fxs_ks echotraining=400 callerid=asreceived group=5 context=line5 rxgain=5.0 txgain=5.0 channel => 13
example log:
[size=75]
call start:
13:03:21 logger.c: 3 > Protocol Discriminator: Q.931 (8) len=33
13:03:21 logger.c: 3 > Call Ref: len= 1 (reference 56/0x38) (Originator)
13:03:21 logger.c: 3 > Message type: SETUP (5)
13:03:21 logger.c: 3 > Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
13:03:21 logger.c: 3 > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
13:03:21 logger.c: 3 > Ext: 1 User information layer 1: A-Law (35)
13:03:21 logger.c: 3 > Channel ID (len= 3) [ Ext: 1 IntID: Implicit, Other Spare: 0, Preferred Dchan: 0
13:03:21 logger.c: 3 > ChanSel: B1 channel ]
13:03:21 app_queue.c: Device ‘SIP/XYZ’ changed to state ‘2’ (In use)
13:03:21 app_queue.c: Device ‘Zap/7’ changed to state ‘2’ (In use)
13:03:21 logger.c: 3 > Calling Number (len= 7) [ Ext: 0 TON: Subscriber Number (4) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)

call end (in *):
13:04:00 chan_sip.c: **** Received BYE (8) - Command in SIP BYE
13:04:00 channel.c: Didn’t get a frame from channel: SIP/XYZ-2743
13:04:00 channel.c: Bridge stops bridging channels SIP/XYZ-2743 and Zap/7-1
13:04:00 channel.c: Hanging up channel 'Zap/7-1’
13:04:00 chan_zap.c: zt_hangup(Zap/7-1)
13:04:00 chan_zap.c: Set option AUDIO MODE, value: ON(1) on Zap/7-1
13:04:00 chan_zap.c: Hangup: channel: 7 index = 0, normal = 28, callwait = -1, thirdcall = -1
13:04:00 chan_zap.c: Not yet hungup… Calling hangup once with icause, and clearing call
13:04:00 logger.c: 3 NEW_HANGUP : Calling q931_hangup, ourstate Active, peerstate Connect Request
13:04:00 chan_zap.c: disabled echo cancellation on channel 7
13:04:00 chan_zap.c: Set option TDD MODE, value: OFF(0) on Zap/7-1
13:04:00 chan_zap.c: Updated conferencing on 7, with 0 conference users
13:04:00 chan_zap.c: Set option AUDIO MODE, value: OFF(0) on Zap/7-1
13:04:00 chan_zap.c: disabled echo cancellation on channel 7
13:04:00 logger.c: – Hungup 'Zap/7-1’
13:04:00 app_dial.c: Exiting with DIALSTATUS=ANSWER.
13:04:00 pbx.c: Spawn extension (outgoing,10,11) exited non-zero on 'SIP/XYZ-2743’
13:04:00 pbx.c: Launching 'Hangup’
13:04:00 logger.c: – Executing Hangup(“SIP/XYZ-2743”, “”) in new stack
13:04:00 pbx.c: Spawn extension (outgoing,h,1) exited non-zero on 'SIP/XYZ-2743’
13:04:00 pbx.c: Function result is '“XYZ” <500>'
13:04:00 pbx.c: Function result is '500’
13:04:00 pbx.c: Function result is '10’
13:04:00 pbx.c: Function result is 'outgoing’
13:04:00 pbx.c: Function result is 'SIP/XYZ-2743’
13:04:00 pbx.c: Function result is 'Zap/7-1’
13:04:00 pbx.c: Function result is 'Hangup’
13:04:00 pbx.c: Function result is '(null)'
13:04:00 pbx.c: Function result is '2006-03-24 13:03:21’
13:04:00 pbx.c: Function result is '2006-03-24 13:03:30’
13:04:00 pbx.c: Function result is '(null)'
13:04:00 pbx.c: Function result is '39’
13:04:00 pbx.c: Function result is '30’
13:04:00 pbx.c: Function result is ‘ANSWERED’
13:04:00 pbx.c: Function result is ‘DOCUMENTATION’
13:04:00 pbx.c: Function result is ‘(null)‘
13:04:00 pbx.c: Function result is ‘asterisk-11619-1143201801.2301’
13:04:00 pbx.c: Function result is ‘1234567890’
13:04:00 devicestate.c: Changing state for Zap/7 - state 1 (Not in use)
13:04:00 app_queue.c: Device ‘Zap/7’ changed to state ‘1’ (Not in use)
13:04:00 cdr_addon_mysql.c: cdr_mysql: inserting a CDR record.
13:04:00 cdr_addon_mysql.c: cdr_mysql: SQL command as follows: INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,
lastdata,duration,billsec,disposition,amaflags,accountcode,userfield) VALUES (‘2006-03-24 13:03:21’,’“XYZ” <500>’,‘500’,‘10’,‘outgoing’, ‘
SIP/XYZ-2743’,‘Zap/7-1’,‘Hangup’,’’,39,30,‘ANSWERED’,3,’’,‘1234567890’)
13:04:00 channel.c: Hanging up channel 'SIP/XYZ-2743’
13:04:00 chan_sip.c: Hangup call SIP/XYZ-2743, SIP callid 518224-c0a80135-13c4-7d6dd-1e9f5696-16d1@192.168.1.31)
13:04:00 chan_sip.c: update_call_counter(XYZ) - decrement call limit counter
13:04:00 chan_sip.c: Updating call counter for incoming call
13:04:00 chan_sip.c: Checking device state for peer XYZ
13:04:00 devicestate.c: Changing state for SIP/XYZ - state 1 (Not in use)
13:04:00 app_queue.c: Device ‘SIP/XYZ’ changed to state ‘1’ (Not in use)

13:04:14 logger.c: 3 < Protocol Discriminator: Q.931 (8) len=28
13:04:14 logger.c: 3 < Call Ref: len= 1 (reference 184/0xB8) (Terminator)
13:04:14 logger.c: 3 < Message type: INFORMATION (123)
13:04:14 logger.c: 3 < Display (len=22) [ Used: 4 Charging Units ]

13:04:29 logger.c: 3 < Protocol Discriminator: Q.931 (8) len=28
13:04:29 logger.c: 3 < Call Ref: len= 1 (reference 184/0xB8) (Terminator)
13:04:29 logger.c: 3 < Message type: INFORMATION (123)
13:04:29 logger.c: 3 < Display (len=22) [ Used: 5 Charging Units ]

… long long time …

call end (ISDN):

14:32:27 logger.c: 3 < Protocol Discriminator: Q.931 (8) len=38
14:32:27 logger.c: 3 < Call Ref: len= 1 (reference 184/0xB8) (Terminator)
14:32:27 logger.c: 3 < Message type: DISCONNECT (69)
14:32:27 logger.c: 3 < Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
14:32:27 logger.c: 3 < Ext: 1 Cause: Unknown (16), class = Normal Event (1) ]
14:32:27 logger.c: 3 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
14:32:27 logger.c: 3 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
14:32:27 logger.c: 3 < Display (len=24) [ Used: 366 Charging Units ]

14:32:27 logger.c: 3 NEW_HANGUP : Calling q931_hangup, ourstate Diisconnect Indication, peerstate Disconnect Request

14:32:27 logger.c: 3 > Protocol Discriminator: Q.931 (8) len=8
14:32:27 logger.c: 3 > Call Ref: len= 1 (reference 56/0x38) (Originator)
14:32:27 logger.c: 3 > Message type: RELEASE (77)
14:32:27 logger.c: 3 > Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
14:32:27 logger.c: 3 > Ext: 1 Cause: Unknown (16), class = Normal Event (1) ]
14:32:28 logger.c: 3 < Protocol Discriminator: Q.931 (8) len=8

14:32:28 logger.c: 3 < Call Ref: len= 1 (reference 184/0xB8) (Terminator)
14:32:28 logger.c: 3 < Message type: RELEASE COMPLETE (90)
14:32:28 logger.c: 3 < Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
14:32:28 logger.c: 3 < Ext: 1 Cause: Unknown (16), class = Normal Event (1) ]

14:32:28 logger.c: 3 NEW_HANGUP : Calling q931_hangup, ourstate Null, peerstate Null
14:32:28 logger.c: 3 NEW_HANGUP : Destroying the call, ourstate Null, peerstate Null[/size]


#2

I have got the same problem. Have you resolved the problem?

Thanks.


#3

What is your SIP hardware phone?
This looks like problem of phone.

I had oposite problems. When I dial landline - hangup worked only from SIP phone side. Problem was with missing reverce polarity of landline


#4

the SIP Hardphone id Welltech Lanphone 201.

But Asterisk know to stop the call

13:04:00 channel.c: Didn't get a frame from channel: SIP/XYZ-2743 13:04:00 channel.c: Bridge stops bridging channels SIP/XYZ-2743 and Zap/7-1 13:04:00 channel.c: Hanging up channel 'Zap/7-1'
But quadBRI don’t generate DISCONNECT…
I have no idea, maybe there is some error in drivers ?

Thanks for replay

PS. rrc2 : i didn’t resolve this yet.


#5

bira_more:
thats, what i know, ISDN(Q931) don’t use polarity reversing to generate disconnect. Q931 sends ‘DISCONNECT’ message to Provider PBX (but correct me if i’m wrong)


#6

[quote=“fdragowski”]bira_more:
thats, what i know, ISDN(Q931) don’t use polarity reversing to generate disconnect. Q931 sends ‘DISCONNECT’ message to Provider PBX (but correct me if i’m wrong)[/quote]

sure, because ISDN uses DSS1 signalling, a digital packet signalling messages, so no “analog” changing of polarity is needed… :smile:


#7

Fdragowski,

[quote]
bchan=1,2
bchan=3
bchan=4,5
dchan=6
bchan=7,8
dchan=9
bchan=10,11
dchan=12[/quote]

is thisline here correct ?

bchan=3

Shouldnt it be a d-channel ?


#8

Im not sure about poland, but did you try changing the framing ?

like
span=1,1,3,ccs,hdb3,crc4


#9

bchan=3 - it’s wrong, but i make mistake in copying it here, in config there is dchan=3.

i didn’t try changing the framing.
Now i lost access to this * server, our client cut off my remote access.
I don’t know if i will have a chance to resolve this problem.

Thanks for help.


#10

Well, if your customer cancelled the remoteaccess, he obv. needs no more help, so i wont bother… :smiling_imp: