Hangup on connect

I’m faced with the problem that calls are immediately disconnected (hangup) on connection.
Adding more verbose and debug options showed me the following:

[2018-03-25 11:51:02] DEBUG[9332][C-00000018]: channel.c:2496 ast_softhangup_nolock: Soft-Hanging (0x20) up channel ‘PJSIP/200-00000033’
[2018-03-25 11:51:02] DEBUG[9332][C-00000018]: app_macro.c:453 _macro_exec: Spawn extension (macro-hangupcall,s,6) exited non-zero on ‘PJSIP/200-00000033’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/200-00000033’ in macro ‘hangupcall’
[2018-03-25 11:51:02] DEBUG[9332][C-00000018]: pbx.c:4202 ast_pbx_h_exten_run: Spawn extension (from-internal,h,1) exited non-zero on ‘PJSIP/200-00000033’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/200-00000033’
[2018-03-25 11:51:02] DEBUG[9332][C-00000018]: channel.c:2587 ast_hangup: Channel 0x7f1f2c032238 ‘PJSIP/200-00000033’ hanging up. Refs: 2
[2018-03-25 11:51:02] DEBUG[9332][C-00000018]: chan_pjsip.c:2273 hangup_cause2sip: AST hangup cause 16 (no match found in PJSIP)
[2018-03-25 11:51:02] DEBUG[24049]: rtp_engine.c:414 instance_destructor: Destroyed RTP instance ‘0x7f1f2c020c48’
[2018-03-25 11:51:02] DEBUG[24049]: res_pjsip_session.c:3303 handle_outgoing_request: Method is BYE
[2018-03-25 11:51:02] DEBUG[6799]: manager.c:5991 match_filter: Examining AMI event:

Someone has additional hints whats going wrong?

Thanks in advance

What Asterisk version are you on?

Also, are ports 10000-20000 open?

Yes they are open…

Connected to Asterisk 15.2.2

Hi Sascha
I had/have something very similar I have two freepbx systems on a hosted platform they are both Asterisk version 13.17.2 FreePBX One system i use for testing and the other is my “commercial system”. Although the test system is “up to date” with upgraded modules the commercial switch isn’t - everytime i upgrade it i have to revert back to my last backup image as all calls to pjsip extenions get cut off when they are answered, IAX calls are OK - don’t know about chan_sip.
I reported this as a bug when it first occured some months ago but was basically told i had posted in the wrong place and was even told by email that nobody else was having a problem!

With trial and error I’m trying to find which switch will solve this issue.

  • Within general SIP settings I’ve allowed “alaw” only
  • Within the trunk, too

My last tries show me that these hang-ups didn’t appear again. I’ve added “alaw” (only this codec) to allow codecs within the extension settings.

Since I know that the both sip devices are trying to establish a g722 (hd) call, I thought that this could be a problem.

Hi Sascha
Found my problem - nothing had changed but for some reason after the module upgrades the calls to pjsip extension kept hanging up as soon as they were answered.
As it is the bank holiday i had time to spend upgrading again - took a snapshot so i could “roll back” - upgraded the 40 odd modules and also did some system updates.
Low and behold all the pjsip extensions were hanging up on answer again!
Spent some time and i have somehow found the cure, although i am using pjsip extensions, if you go into settings-asterisk sip settings - chan-sip settings and change NAT to yes - it works…

I assume you are somehow still using ChanSIP, or this is a bug…

Not using chan_sip at all - all extensions are pjsip or IAX !!

Your Trunks as well?

Yes - trunks pjsip as well.

Then this is likely a bug, if you can reproduce this, please report this bug. Ty

Yes I can. What can I do to deliver you infos where you can see what’s going wrong?


Tried to open an issue… It has been rejected as an support issue… WTF?!?

You can’t just open a ticket, call it a bug and expect someone to fix your problem. The issue tracker is for reporting bugs, not exploring possible solutions. For a bug to be accepted you must provide exact instructions for someone to reproduce the issue on another system (as already indicated in this thread), or pinpoint the cause in the generated config. It may well be there is a FreePBX bug here, or an Asterisk bug, or a phone firmware bug, and it could also be user error or configuration problem.

I don’t see any useful log lines here, but hangup on answer indicates to me a SIP signalling issue. If you haven’t done a sip trace, that would be a good place to start.

edit - you also indicated in your ticket that you are using “official distro and raspbx”. Since those are mutually exclusive you are misusing the terms or you have this issue on two different systems.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.