SIP Trunk not disconnected after call hangup


I am using Asterisk 1.8.2.

I have setup the SIP trunk of my legacy PBX with asterisk. Incoming/outgoing call is working fine but I am facing following two issue which creates big issue.

  1. I am not getting the discussion on my SIP extension when remote party hangup the call.

    SIP Extension->SIP Trunk->PBX->Mobile Number
    When I am making an outgoing call from my SIP Extension through SIP Trunk, once call disconnect from remote end. SIP Extension not getting hangup, I have to hangup manually.

  2. When I am making outgoing call through SIP extension, it show the call established before call get answered by remote party.

Any one help me, what setting I have to do either in SIP Trunk or SIP Extension configuration for resolve above issue.

Thanks in advance

Ketan Jadhav

You need to provide relevant traces and describe how Asterisk is connected to the mobile network.

Basically you need to provide enough information to establish where the hangup is getting lost.


Actually the the process as following :

SIP Exstension will dial the call : 098xxxxxxxxx

Asterisk will through the call by SIP Trunk which is connected with PBX SIP Exstension.

Call will be go out through the PBX trunk line.

Asterisk SIP Extension->SIP TRUNK->PBX SIP Extension->PBX Trunk->Mobile

If the mobile hangup, then Asterisk SIP Extension not get disconnected automatically.

What is PBX Trunk?

FXO (what signalling and what supervision options)?
Common channel signalling (what protocol)?
Associated channel signalling (what protocol)?

You need to take a protocol trace of the trunk. If it is an analogue trunk, you need to get this down to a level where you see messages about battery states.

You then need to idnetify an event on that trunk that Asterisk could use to detect the mobile has cleared.

Note, if this weren’t a mobile, I would have said that this was normal behaviour, but mobiles tend to do called party clearing.


I have one Panasonic PBX which has one SIP extension number 1200.

Now I have created that PBX SIP Extension as a trunk in my Asterisk.

When I m making an outgoing call from Asterisk SIP extension by taking the SIP Trunk it will goes to Panasonic PBX. See the below settings and dial plan.



username =1200
secret = 1200
host = ;pbx ip address


exten => _9X.,1,Dial(SIP/VOIP/${EXTEN},30)

When I am making call by dialing 9xxxxxxx number from my Asterisk SIP Extension, it will goes to Panasonic pbx by SIP trunk. Once call get established properly and after hangup by remote party it will not get disconnected on my Asterisk SIP Extension.

Please provide “sip set debug on” output proving that Asterisk is receiving a BYE and not validly rejecting it.

Incidentally, sip trunks are an Asterisk GUI concept, not an Asterisk one, and, in the unlikely event that the problem lies with Asterisk, if it is accepting the BYE, you will need to provide the dialplan that follows the Dial.