Call disconnects immediately

Hi.

I have installed AsteriskNOW first time and do configuration as shown in this documentation.
https://wiki.asterisk.org/wiki/display/AST/Basic+PBX+Functionality
After configuration, i am using 3CX softphone. (http://www.3cx.com) and softphone connected successfully. “On hook” message is shown. I have 2 softphones with number 6001 (alice) and 6002 (bob). Everything is OK. But when i am calling from number 6001 to 6002, call send successfull and callee recieves calling. But when callee answers call disconnects immediately. What is problem?

Best regards.

The problem is that you have provided no logs that would should why it is disconnecting.

I am new in Asterisk. What must i do?

log from /var/log/asterisk/full file:
2013-10-12 18:24:24] VERBOSE[1716][C-00000010] netsock2.c: == Using SIP RTP TOS bits 184
[2013-10-12 18:24:24] VERBOSE[1716][C-00000010] netsock2.c: == Using SIP RTP CoS mark 5
[2013-10-12 18:24:24] VERBOSE[22980][C-00000010] pbx.c: – Executing [6001@users:1] Dial(“SIP/bob-0000001a”, “SIP/alice,20”) in new stack
[2013-10-12 18:24:24] VERBOSE[22980][C-00000010] netsock2.c: == Using SIP RTP TOS bits 184
[2013-10-12 18:24:24] VERBOSE[22980][C-00000010] netsock2.c: == Using SIP RTP CoS mark 5
[2013-10-12 18:24:24] VERBOSE[22980][C-00000010] app_dial.c: – Called SIP/alice
[2013-10-12 18:24:24] VERBOSE[22980][C-00000010] app_dial.c: – SIP/alice-0000001b is ringing
[2013-10-12 18:24:26] VERBOSE[22980][C-00000010] app_dial.c: – SIP/alice-0000001b answered SIP/bob-0000001a
[2013-10-12 18:24:26] VERBOSE[22980][C-00000010] pbx.c: == Spawn extension (users, 6001, 1) exited non-zero on ‘SIP/bob-0000001a’

run asterisk -rvvvvvvv

make a call and then show your cli ouput. Try with a diff softphone, on the logs does not show any issue, but it could be codec issue.

Also issue “sip set debug on” and make sure that you have uncommented full in logger.conf.

Basically, your log shows that either the caller or callee hung up very soon after the anser, but says nothing about why they did so.

An example of how this can happen is that the caller uses late offer SDP and the codec choice is unacceptable to it. You can only see if this is happening from detailed logging.

[quote=“ambiorixg12”]run asterisk -rvvvvvvv

make a call and then show your cli ouput. Try with a diff softphone, on the logs does not show any issue, but it could be codec issue.[/quote]

<— Transmitting (no NAT) to 192.168.1.2:7042 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.2:7042;branch=z9hG4bK-524287-1—3e74c82bb6471b55;received=192.168.1.2;rport=7042
From: "bob"sip:bob@192.168.1.100;tag=36043d25
To: "bob"sip:bob@192.168.1.100;tag=as29ed956a
Call-ID: VqWz0jtwCT3KHZb4gFOSyg…
CSeq: 3 REGISTER
Server: FPBX-2.11.0beta2(11.2.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="4153f94d"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘VqWz0jtwCT3KHZb4gFOSyg…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.1.2:7042 —>
REGISTER sip:192.168.1.100 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.2:7042;branch=z9hG4bK-524287-1—1b51a018d07e895c;rport
Max-Forwards: 70
Contact: sip:bob@192.168.1.2:7042;+sip.instance=“urn:uuid:E5B49B18-1D5D-23FC-C60D-B29AEA60A035”;expires=0
To: "bob"sip:bob@192.168.1.100
From: "bob"sip:bob@192.168.1.100;tag=36043d25
Call-ID: VqWz0jtwCT3KHZb4gFOSyg…
CSeq: 4 REGISTER
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, REGISTER, SUBSCRIBE, INFO
Supported: replaces
User-Agent: PortSIP VoIP SDK 7.0
Authorization: Digest username=“bob”,realm=“asterisk”,nonce=“4153f94d”,uri=“sip:192.168.1.100”,response=“c626bda20c351a4966da6874ef355ae1”,algorithm=MD5
Content-Length: 0

<------------->
— (13 headers 0 lines) —
Sending to 192.168.1.2:7042 (no NAT)
– Unregistered SIP ‘bob’

<— Transmitting (no NAT) to 192.168.1.2:7042 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.2:7042;branch=z9hG4bK-524287-1—1b51a018d07e895c;received=192.168.1.2;rport=7042
From: "bob"sip:bob@192.168.1.100;tag=36043d25
To: "bob"sip:bob@192.168.1.100;tag=as29ed956a
Call-ID: VqWz0jtwCT3KHZb4gFOSyg…
CSeq: 4 REGISTER
Server: FPBX-2.11.0beta2(11.2.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Expires: 0
Date: Sat, 12 Oct 2013 15:36:11 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘VqWz0jtwCT3KHZb4gFOSyg…’ in 32000 ms (Method: REGISTER)
Really destroying SIP dialog ‘N2QwYzIzYTMxZjM0Yzk2Nzg2MzdkZDA1M2I3NDViMjA.’ Method: REGISTER
Really destroying SIP dialog ‘NjM5NTc3ZWJkMjE4NzBjMWVjZWQwYjY5NjE4MzczN2E.’ Method: REGISTER

<— SIP read from UDP:192.168.1.2:58219 —>

<------------->

There is no call attempt in that trace. You will, almost certainly, need to use the full log, not a screen scrape, to get enough of the log. Also, the full log has timestamps, which are likely to be important. In fact, you should enable millisecond time stamps, in logger.conf.

a call start with an INVITE METHOD like this :

This is, /etc/asterisk/logger.conf file content

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;
; This file is part of FreePBX.
;
; FreePBX is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 2 of the License, or
; (at your option) any later version.
;
; FreePBX is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with FreePBX. If not, see http://www.gnu.org/licenses/.
;
; Copyright © 2007 Astrogen LLC (USA)

[general]
#include logger_general_additional.conf
#include logger_general_custom.conf

[logfiles]
#include logger_logfiles_additional.conf
#include logger_logfiles_custom.conf

This file is not relevant for us

[quote]; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;[/quote]

[quote=“ambiorixg12”]This file is not relevant for us

[quote]; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;[/quote][/quote]

Please, tell me which file?
What i must do, in which file i must edit? I have installed fresh AsteriskNOW.
edited sip.conf:
Users
type=friend
context=users
host=dynamic
secret=a11223344
;deny=0.0.0.0/0
permit=192.168.1.0/255.255.255.0
;nat=yes
nat=force_rport,comedia
dfmfmode=auto
disallow=all
allow=ulaw
allow=alaw

alice
bob

edited extensions.conf:
[users]
exten => 6001,1,Dial(SIP/alice,20)
exten => 6002,1,Dial(SIP/bob,20)

Only these edits.

I’m not very related to those Asterisk GUI. This is what you will do now turn off the sip debug (" sip set debug off" ) , i just want to see your CLI output when you try to make a call, if need sip debug , later i will ask you to turn it on.

On your Linux shell run this command asterisk -rvvvvvvvv

then make a call and copy and paste the output of your Asterisk Box. And as i said try with diff sofphone as ZOIPER

[quote=“ambiorixg12”]I’m not very related to those Asterisk GUI. This is what you will do now turn off the sip debug (" sip set debug off" ) , i just want to see your CLI output when you try to make a call, if need sip debug , later i will ask you to turn it on.

On your Linux shell run this command asterisk -rvvvvvvvv

then make a call and copy and paste the output of your Asterisk Box. And as i said try with diff sofphone as ZOIPER[/quote]

Call from Zoiper (6002/bob) to 3CXPhone (6001/alice) works fine. But 3CXPhone (6001/alice) to (6002/bob) dont works.

Zoiper --> 3CXPhone:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [6001@users:1] Dial(“SIP/bob-00000010”, “SIP/alice,20”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/alice
– SIP/alice-00000011 is ringing
– SIP/alice-00000011 answered SIP/bob-00000010

3CXPhone --> Zoiper
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [6002@users:1] Dial(“SIP/alice-00000016”, “SIP/bob,20”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/bob
– SIP/bob-00000017 is ringing
– SIP/bob-00000017 answered SIP/alice-00000016
[color=#FF0000]== Spawn extension (users, 6002, 1) exited non-zero on ‘SIP/alice-00000016’[/color]

[quote=“ambiorixg12”]I’m not very related to those Asterisk GUI. This is what you will do now turn off the sip debug (" sip set debug off" ) , i just want to see your CLI output when you try to make a call, if need sip debug , later i will ask you to turn it on.

On your Linux shell run this command asterisk -rvvvvvvvv

then make a call and copy and paste the output of your Asterisk Box. And as i said try with diff sofphone as ZOIPER[/quote]

PortSIP SDK Sample --> Zoiper
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [6002@users:1] Dial(“SIP/alice-00000020”, “SIP/bob,20”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/bob
– SIP/bob-00000021 is ringing
– SIP/bob-00000021 answered SIP/alice-00000020
== Spawn extension (users, 6002, 1) exited non-zero on ‘SIP/alice-00000020’

Zoiper --> PortSIP SDK Sample
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [6001@users:1] Dial(“SIP/bob-00000027”, “SIP/alice,20”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/alice
– SIP/alice-00000028 is ringing
– SIP/alice-00000028 answered SIP/bob-00000027

Now you need a sip debug, it look like a normal hangup

[quote]
SIP/bob-00000017 answered SIP/alice-00000016
== Spawn extension (users, 6002, 1) exited non-zero on ‘SIP/alice-00000016’[/quote]

check the setting on your softphone.

Now you need a sip debug, it look like a normal hangup

[quote]
SIP/bob-00000017 answered SIP/alice-00000016
== Spawn extension (users, 6002, 1) exited non-zero on ‘SIP/alice-00000016’[/quote]

check the setting on your softphone.[/quote]

What means SDP. In PortSIP SDK Sample call with option “Make call without SDP” it works fine. What this option means?

The Session Description Protocol (SDP)

When a SIP based VoIP call is established, the audio or video sent between two SIP entities or more is streamed. Since many different codecs are supported by different devices or software, and each individual SIP entity taking part in the call does not know the IP address of the other SIP entity or to which port the stream should be sent to, SDP is used to advertise such details about the media stream during the VoIP call initialization process.

SDP at work in a SIP based VoIP call

During a SIP based VoIP call initialization, when a caller dials a number on a SIP phone, a SDP message is attached to the SIP INVITE message which is sent to the IP PBX the SIP phone is registered to. In the SDP message, connection details, media details and DTMF event types are advertised.

Typically, such information is sent from the caller’s SIP phone to the IP PBX, which is then relayed to the other SIP phone which is receiving the call. The SIP phone receiving the call which at this stage it is still being established, also sends SDP data back to the IP PBX which is relayed to the SIP phone making the call. Because of such process, if the call is established the SIP phones taking part in this SIP based VoIP call know to where the media stream should be sent and what type of media and codec to use. They also now know what media type and codec they will be receiving.

3cx.com/blog/voip-howto/sdp-voip2/

For support of questions about the PortSIP SDK here is where you have to address your questions please.

Email : support@portsip.com

  • skype ID: portsip

portsip.com/support.html

ambiorixg12: You are confusing him, by reversing my instructions. He had already provided enough information to indicate that there was a prompt clear without any further information. That’s why I asked for the sip debug. Also, the reason I mentioned logger.conf, is that you need to enable the full log in order to catch all the useful information (screen capture buffers are usually too small and you don’t get timestamps).

What he didn’t make clear is that he was using FreePBX, which means he needs to manipulate files like logger.conf through the GUI, or ignore the warnings in the comments. For details on that, he needs to consult the FreePBX people not this forum. On the other hand, until we establish he really has a configuration error, this can probably be debugged as a pure Asterisk problem, but it may have to be referred to the FreePBX people for a way to configure around it.

This is not an Asterisk problem it is a clear misconfiguration on his sip client

[quote]
What means SDP. In PortSIP SDK Sample call with option “Make call without SDP” it works fine. What this option means?[/quote]

and i asked him to turn off the sip debug just for while because i was working with his issue and at the time i just need to see a clear CLI OUPUT and not sip debug messages, Then i asked him to turn it on.

And as says the Asterisk WIKI on Collecting Debug Information

Remember to disable any extra logging if you enabled it in the
channel driver.

*CLI> sip set debug off