Random call hangup problem/ call does not disconnect


#1

Hi,

The problem I could not understand is whenever the SIP device hangs up, the call does not end. Sometime the call stays active(stays on hold) for long time costing user.

Following is one of the setting and call information. Most of the time what happens is when the SIP user (like linksys pap-2na) hangups up the phone, I see “Music class default requested but no musiconhold loaded.” and the call does not end for some time. In the following call, without conversation, the CDR recorded ~8 mins long call. I have tried disabling music on hold but I could not fix the problem. I have even tried recording the conversation (audio) and I hear the dialing of phone number, I can hear phone ringing, I can hear the user hanging up the phone and still I can hear phone ringing, then no audio after few moments of call being hanged up by user; in the remaining length of call, there is no audible noise/tone/audio.

What could be the problem? How do I troubleshoot more? What could be the possible fix/solution?

My setting information:
Asterisk 1.6.2.7 on dedicated server
SIP Phone: Linksys PAP-2NA

sip.conf

[1111]
type=friend
username=1111
accountcode=1111
regexten=1111
callerid=1234567890
amaflags=billing
secret=secret
nat=yes
dtmfmode=RFC2833
qualify=yes
canreinvite=yes
disallow=all
allow=g729
allow=g723
allow=gsm
allow=ulaw
allow=alaw
host=dynamic
context=a2billing
rtptimeout=10
rtpholdtimeout=10
regseconds=0
cancallforward=yes

[Oct 2 23:00:33] VERBOSE[21373] pbx.c: – Executing [93793226471@a2billing17-sip-iax:1] AGI(“SIP/4569160095-0000079b”, “a2billing17.php,1”) in new stack
[Oct 2 23:00:33] VERBOSE[21373] res_agi.c: – Launched AGI Script /var/lib/asterisk/agi-bin/a2billing17.php
[Oct 2 23:00:33] NOTICE[21373] channel.c: Dropping incompatible voice frame on SIP/4569160095-0000079b of format g729 since our native format has changed to 0x1 (g723)
[Oct 2 23:00:33] VERBOSE[21373] res_agi.c: – AGI Script Executing Application: (MixMonitor) Options: (1286074833.2036.wav,b)
[Oct 2 23:00:33] VERBOSE[21373] res_agi.c: – AGI Script Executing Application: (DIAL) Options: (SIP/sip_trunk/0000193793226471,60,RgL(3000000:61000:30000))
[Oct 2 23:00:33] VERBOSE[21373] app_dial.c: – Limit Data for this call:
[Oct 2 23:00:33] VERBOSE[21373] netsock.c: == Using SIP RTP CoS mark 5
[Oct 2 23:00:33] VERBOSE[21373] app_dial.c: – Called sip_trunk/0000193793226471
[Oct 2 23:00:34] VERBOSE[21373] app_dial.c: – SIP/sip_trunk-0000079c is making progress passing it to SIP/4569160095-0000079b
[Oct 2 23:01:07] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 16, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:07] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:01:07] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 20, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:08] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 17, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:08] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 20, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:08] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 16, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:08] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:01:08] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 20, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:26] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 17, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:26] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 20, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:26] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 16, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:26] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:01:26] VERBOSE[21373] app_dial.c: – SIP/4569160095-0000079b requested special control 20, passing it to SIP/sip_trunk-0000079c
[Oct 2 23:01:27] VERBOSE[21373] app_dial.c: – SIP/sip_trunk-0000079c answered SIP/4569160095-0000079b
[Oct 2 23:01:45] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:02:06] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:02:22] VERBOSE[21473] app_mixmonitor.c: == Begin MixMonitor Recording SIP/8856228088-000007ad
[Oct 2 23:02:25] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:02:46] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:03:06] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:03:25] VERBOSE[21373] channel.c: – Music class default requested but no musiconhold loaded.
[Oct 2 23:08:33] VERBOSE[21373] res_agi.c: – AGI Script Executing Application: (StopMixMonitor) Options: ()
[Oct 2 23:08:33] VERBOSE[21373] app_mixmonitor.c: == MixMonitor close filestream
[Oct 2 23:08:33] VERBOSE[21373] res_agi.c: – <SIP/4569160095-0000079b>AGI Script a2billing17.php completed, returning -1


#2

Hi;
Dear bijushresth;May you put the link of your a2billing17.php for me.The version of my a2billing.php doesn’t answer in any way.
Regards.


#3

Are you doing a callback to the nominal calling party?

Special control 16 is HOLD, and indicates that SIP/4569160095-0000079b, which appears to the caller for the Dial operation has requested the call be put on hold. I think the music on hold is a red herring. The real problem is that your nominal calling party is not sending “clear”.

If SIP/4569160095-0000079b is actually an outgoing call, you may be encountering the little known behaviour of public fixed telephone networks discussed in the recent won’t hangup thread. It is possible, and not unreasonable, that the PSTN gateway, if it gets re-answer supervision, is treating hangup as hold and re-answer as unhold.

Trying to dig back 20 years, I think the correct terms are clear for onhook, re-answer, for picking up the same, or another phone, and continue, and release for the final clear down of the call.


#4

classical question: are you using Agi or DeadAgi ? it seems from the traces that you are uing Agi which is incorrect


#5

[quote=“javany”]Hi;
Dear bijushresth;May you put the link of your a2billing17.php for me.The version of my a2billing.php doesn’t answer in any way.
Regards.[/quote]
Javany, I am using a2billing.php of version 1.7 which is available for download at a2billing.org I have not done any changes to the a2billing.php file. I have just renamed it to a2billing17.php. For a2billing.php to answer, you should make change at agi-conf. Set value answer_call=yes.

[quote=“david55”]Are you doing a callback to the nominal calling party?

The real problem is that your nominal calling party is not sending “clear”.
[/quote]
david55, I am not doing a callback to the nominal calling party. In the above log, the user is just making a call and hungup after the call did not connect. I guess, the user hung up the call and the message “Music class default requested but no musiconhold loaded.” showed up. Physically, the user already hung up the phone but my asterisk thinks it is on hold and keeps on charging the user for the whole duration. Isn’t there just a way to end the call as soon as the user physically hangs up the phone (user use linkys pap2na). I get lots of complain for charging for more time than actual call time. My requirement is just to make a simple outgoing call only – don’t need hold, call waiting, call transfer, and other.

Isn’t there just a simple way to end the call when the caller (my user) hangs up the phone? I don’t care whether the called party (PSTN gateway) trys to put me on hold.

I have tried but no help.

canreinvite=nonat
nat=yes
qualify=yes
rtptimeout=20
rtpholdtimeout=25
type=peer

[quote=“cerien.jean”]classical question: are you using Agi or DeadAgi ? it seems from the traces that you are uing Agi which is incorrect[/quote] My asterisk version is 1.6.2.7 which uses AGI instead of DeadAgi.

"DeadAGI is obsolete in Asterisk 1.6 and later: Simply use AGI(). " – source: voip-info.org/wiki/view/Asterisk+cmd+DeadAGI


#6

You are getting the hold from your nominally incoming side. If you are not really outgoing to both side, there is something wrong in the gateway.

In general, this needs dealing with in the gateway, as the core of asterisk simply is not being told there has been a “clear” or “release” event. (SIP BYE really corresponds to release.)

The PSTN doesn’t have a formal way of signalling hold and unhold, but it looks like your gateway may be turning clear and re-answer into hold and unhold. If you used an FXO (analogue) card, you wouldn’t even see the clear and re-answer.


#7

bijushresth,

have you got one solution to solve your problem. I got the same issue here. Caller makes call with channel A, then hold it or conference, ( I don’t know ), then wait channel B to be created and hangup channel A and at the same time get the channel B goes on which end 20 minutes later. However asterisk only got one call record from channel A to channel B which only lasts 2 seconds. the 20 minutes call is not billed at all. I lost money because of this. Hope you fix your problem and share with me here.Thanks.