TE100 AMI interface

I have TE100 and PBX based on asterisk 13.

When I connect to PBX with AMI interface and send “Originate” command I recieve event “OriginateResponse” with “Reason: 3”, “Hangup” with “Cause: 16” when user don`t pick up phone and the same reason when user is busy. On another gateway “Tadiran” I have “OriginateResponse” with “Reason: 5” “Hangup” with “Cause: 17” when user is busy.

In CLI TE100 there is “busy” event.

Help me please with TE100 Asterisk 1.6.2.6.

Asterisk 1.6.2 is more than six years past end of life! It is unsupported.

What SIP final status is being sent by the gateway (sip set debug on). ( I have a feeling that you need at least Asterisk 1.8 to see the status from the dialplan.)


<------------->
--- (12 headers 0 lines) ---
Really destroying SIP dialog '5e1236c12ebd6a472cfeb0555e2acbb7@181.4.10.247' Method: OPTIONS

TE100*CLI>
<--- SIP read from UDP:181.4.1.210:5060 --->
INVITE sip:9721070@181.4.10.247 SIP/2.0
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96
Max-Forwards: 70
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>
Contact: <sip:9721070@181.4.1.210:5060>
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Date: Mon, 20 Aug 2018 11:54:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 299

v=0
o=root 1209415905 1209415905 IN IP4 181.4.1.210
s=Asterisk PBX 13.18.3~dfsg-1ubuntu4
c=IN IP4 181.4.1.210
t=0 0
m=audio 17044 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv

<------------->
--- (14 headers 13 lines) ---
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
  == Using SIP VRTP TOS bits 136
  == Using SIP VRTP CoS mark 4
  == Using UDPTL TOS bits 184
  == Using UDPTL CoS mark 5
Sending to 181.4.1.210 : 5060 (NAT)
Using INVITE request as basis request - 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
Found peer 'trunk-sps-TEST_ASO' for '9721070' from 181.4.1.210:5060
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format GSM for ID 3
Found audio description format telephone-event for ID 101
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0xe (gsm|ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 181.4.1.210:17044

Looking for 9721070 in DID_inbound_trunk-sps-TEST_ASO (domain 181.4.10.247)

list_route: hop: <sip:9721070@181.4.1.210:5060>

TE100*CLI>
<--- Transmitting (NAT) to 181.4.1.210:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96;received=181.4.1.210
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 INVITE
Server: TE100
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:9721070@181.4.10.247>
Content-Length: 0


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

TE100*CLI>
<--- Transmitting (NAT) to 181.4.1.210:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96;received=181.4.1.210
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>;tag=as660809b6
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 INVITE
Server: TE100
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:9721070@181.4.10.247>
Content-Length: 0


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

    -- Executing [9721070@DID_inbound_trunk-sps-TEST_ASO:1] Macro("SIP/trunk-sps-TEST_ASO-0000005f", "Routein_From_ASO,1,9721070") in new stack

    -- Executing [s@macro-Routein_From_ASO:1] Set("SIP/trunk-sps-TEST_ASO-0000005f", "CDR(userfield)=Inbound") in new stack

    -- Executing [s@macro-Routein_From_ASO:2] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?Blacklist-Handle,s,1") in new stack

    -- Executing [s@macro-Routein_From_ASO:3] Set("SIP/trunk-sps-TEST_ASO-0000005f", "TRUNKDID=9721070") in new stack

    -- Executing [s@macro-Routein_From_ASO:4] Goto("SIP/trunk-sps-TEST_ASO-0000005f", "Routeout_From_ASO,9721070,1") in new stack

    -- Goto (Routeout_From_ASO,9721070,1)

  == Channel 'SIP/trunk-sps-TEST_ASO-0000005f' jumping out of macro 'Routein_From_ASO'

    -- Executing [9721070@Routeout_From_ASO:1] Set("SIP/trunk-sps-TEST_ASO-0000005f", "ORGINEXTEN=9721070") in new stack

    -- Executing [9721070@Routeout_From_ASO:2] Set("SIP/trunk-sps-TEST_ASO-0000005f", "ORGINCONTEXT=Routeout_From_ASO") in new stack

    -- Executing [9721070@Routeout_From_ASO:3] GetNextOutRouter("SIP/trunk-sps-TEST_ASO-0000005f", "Routeout_From_ASO,") in new stack

    -- Executing [9721070@Routeout_From_ASO:4] Macro("SIP/trunk-sps-TEST_ASO-0000005f", "trunkdial-failover-0.3,1,,9721070,trunk-E1Trunk1,") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:1] NoOp("SIP/trunk-sps-TEST_ASO-0000005f", "do call out") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:2] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?Blacklist-Handle,s,1") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:3] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?6:4)}") in new stack

    -- Goto (macro-trunkdial-failover-0.3,s,4)

    -- Executing [s@macro-trunkdial-failover-0.3:4] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?5:6") in new stack

    -- Goto (macro-trunkdial-failover-0.3,s,6)

    -- Executing [s@macro-trunkdial-failover-0.3:6] Set("SIP/trunk-sps-TEST_ASO-0000005f", "TCOUNT=4") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:7] Set("SIP/trunk-sps-TEST_ASO-0000005f", "CDR(userfield)=Outbound") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:8] Set("SIP/trunk-sps-TEST_ASO-0000005f", "OldCallerID=_ASO") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:9] Set("SIP/trunk-sps-TEST_ASO-0000005f", "TOUCH_MONITOR=_ASO-9721070") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:10] NoOp("SIP/trunk-sps-TEST_ASO-0000005f", "") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:11] Set("SIP/trunk-sps-TEST_ASO-0000005f", "TIMEOUT(absolute)=0") in new stack

Channel hangup cancelled.

    -- Executing [s@macro-trunkdial-failover-0.3:12] Set("SIP/trunk-sps-TEST_ASO-0000005f", "DLSTAT=UNKNOW}") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:13] SetCktCustom("SIP/trunk-sps-TEST_ASO-0000005f", "sendrpid,no,no") in new stack

    -- Executing [s@macro-trunkdial-failover-0.3:14] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "1>0?1-dial,1") in new stack

    -- Goto (macro-trunkdial-failover-0.3,1-dial,1)

    -- Executing [1-dial@macro-trunkdial-failover-0.3:1] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?nextrouter,1") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:2] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?setdod,1:1-dial,3") in new stack

    -- Goto (macro-trunkdial-failover-0.3,1-dial,3)

    -- Executing [1-dial@macro-trunkdial-failover-0.3:3] Set("SIP/trunk-sps-TEST_ASO-0000005f", "CALLERID(name)=") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:4] Set("SIP/trunk-sps-TEST_ASO-0000005f", "CALLERID(num)=9721070") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:5] Set("SIP/trunk-sps-TEST_ASO-0000005f", "_SIPSRTP=") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:6] Set("SIP/trunk-sps-TEST_ASO-0000005f", "OUTDIALOPT=tTkKWwXx") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:7] NoOp("SIP/trunk-sps-TEST_ASO-0000005f", "null for std") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:8] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?sys-dial,1)}") in new stack

    -- Executing [1-dial@macro-trunkdial-failover-0.3:9] Dial("SIP/trunk-sps-TEST_ASO-0000005f", "DAHDI/g11/9721070,,tTkKWwXx") in new stack

    -- Requested transfer capability: 0x00 - SPEECH

    -- Called g11/9721070

    -- DAHDI/1-1 is proceeding passing it to SIP/trunk-sps-TEST_ASO-0000005f

TE100*CLI>
<--- Transmitting (NAT) to 181.4.1.210:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96;received=181.4.1.210
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 INVITE
Server: TE100
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Require: timer
Session-Expires: 1800;refresher=uas
Contact: <sip:9721070@181.4.10.247>
Content-Length: 0


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

    -- Channel 0/1, span 2 got hangup request, cause 17

    -- DAHDI/1-1 is busy
    -- Hungup 'DAHDI/1-1'
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Executing [1-dial@macro-trunkdial-failover-0.3:10] Goto("SIP/trunk-sps-TEST_ASO-0000005f", "1-BUSY,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,1-BUSY,1)
    -- Executing [1-BUSY@macro-trunkdial-failover-0.3:1] Set("SIP/trunk-sps-TEST_ASO-0000005f", "DLSTAT=9-BUSY") in new stack
    -- Executing [1-BUSY@macro-trunkdial-failover-0.3:2] Goto("SIP/trunk-sps-TEST_ASO-0000005f", "2-dial,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,2-dial,1)
    -- Executing [2-dial@macro-trunkdial-failover-0.3:1] Set("SIP/trunk-sps-TEST_ASO-0000005f", "TCOUNT=5") in new stack
    -- Executing [2-dial@macro-trunkdial-failover-0.3:2] Goto("SIP/trunk-sps-TEST_ASO-0000005f", "1-dial,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,1-dial,1)
    -- Executing [1-dial@macro-trunkdial-failover-0.3:1] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "1?nextrouter,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,nextrouter,1)
    -- Executing [nextrouter@macro-trunkdial-failover-0.3:1] GotoIf("SIP/trunk-sps-TEST_ASO-0000005f", "0?,9721070,1:9-BUSY,1") in new stack
    -- Goto (macro-trunkdial-failover-0.3,9-BUSY,1)
    -- Executing [9-BUSY@macro-trunkdial-failover-0.3:1] Playback("SIP/trunk-sps-TEST_ASO-0000005f", "record/default,noanswer") in new stack
    -- <SIP/trunk-sps-TEST_ASO-0000005f> Playing 'record/default.gsm' (language 'ru')

TE100*CLI>
<--- SIP read from UDP:181.4.1.210:5060 --->
CANCEL sip:9721070@181.4.10.247 SIP/2.0
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96
Max-Forwards: 70
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


<------------->
--- (9 headers 0 lines) ---
Sending to 181.4.1.210 : 5060 (NAT)

<--- Reliably Transmitting (NAT) to 181.4.1.210:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96;received=181.4.1.210
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>;tag=as660809b6
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 INVITE
Server: TE100
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


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

<--- Transmitting (NAT) to 181.4.1.210:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96;received=181.4.1.210
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>;tag=as660809b6
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 CANCEL
Server: TE100
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


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

  == Spawn extension (macro-trunkdial-failover-0.3, 9-BUSY, 1) exited non-zero on 'SIP/trunk-sps-TEST_ASO-0000005f' in macro 'trunkdial-failover-0.3'
  == Spawn extension (Routeout_From_ASO, 9721070, 4) exited non-zero on 'SIP/trunk-sps-TEST_ASO-0000005f'
    -- Executing [h@Routeout_From_ASO:1] Hangup("SIP/trunk-sps-TEST_ASO-0000005f", "") in new stack
  == Spawn extension (Routeout_From_ASO, h, 1) exited non-zero on 'SIP/trunk-sps-TEST_ASO-0000005f'

TE100*CLI>
<--- SIP read from UDP:181.4.1.210:5060 --->
ACK sip:9721070@181.4.10.247 SIP/2.0
Via: SIP/2.0/UDP 181.4.1.210:5060;branch=z9hG4bK165aea96
Max-Forwards: 70
From: <sip:9721070@181.4.1.210>;tag=as0ed1257e
To: <sip:9721070@181.4.10.247>;tag=as660809b6
Contact: <sip:9721070@181.4.1.210:5060>
Call-ID: 65a3918974623ba725fae27b443a112f@181.4.1.210:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 13.18.3~dfsg-1ubuntu4
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

TE100*CLI> exit
Executing last minute cleanups

TE100 log with “sip set debug on”.
181.4.1.210 - Asterisk PBX 13
181.4.10.247 - TE100 gateway
9721070 - busy number

This is not consistent with Originate to the TE100. It shows an incoming call from the TE100 that was cancelled by the caller after they got in band indications of the failure of an outgoing DAHDI call.

The reason they got an inband indication appears to be related to the dialplan, which you supplied or you obtained from a third party. My guess is that it came from a third party, namely FreePBX. This forum does not support FreePBX dailplans.

It looks like the call was cancelled during the failure announcement. It is possible that a SIP final status, other than cancelled, would have been sent if the caller had waited for the announcement to complete.

It is not FreePBX.( asterisk 13 on ubuntu 18).
It is no problem with dialplan on asterisk because on another gateway all ok.
Log from PBX can help ?

If this “TE100” is the TE100 from Yeastar, Yeastar should be contacted for assistance.

Yeastar doesn`t answer with this problem :frowning:

What are you actually doing? Your log does not show an Originate.

As I said the call wast terminated by the TE100, not by Asterisk. Asterisk was still playing record/default.gsm when the TE100 aborted the call.