Dial and unaviable peer

i have collect events and PJSIP/28 unaviable in moment

Newexten

Channel: PJSIP/vats342271_9-00000007
Application: Dial
AppData: PJSIP/28,30,tT

VarSet
Variable: DIALSTATUS
empty value
…other VarSet
then
VarSet
Variable: DIALSTATUS
Value: CHANUNAVAIL

and Hangup

question: where dialStart and DialEnd?

and this call haven’t devicestate for initial device PJSIP/vats342271_9, i think before answer not used in dialplan

There won’t be dial events if it can’t even begin to dial.

how i can understand it?

i need emulate dialstates from varset?

why dial is not begin? this in dialplan

why SoftHangupRequest have cause 16? but hangup is Cause: 3

so many questions)

Because it didn’t actually dial the PJSIP endpoint. If a PJSIP endpoint is unavailable, no attempt to dial it is made.

You’ve given no further information or details or anything about the cause codes, so have nothing to add on that.

2025-09-12 09:33:08,946 INFO [com.catneye.asterisk.AMI.AMIThread] (Thread-107) AMIThread read line: [Event: SoftHangupRequest, Privilege: call,all, SystemName: asterisk, Channel: PJSIP/vats342271_9-00000007, ChannelState: 4, ChannelStateDesc: Ring, CallerIDNum: +7—3401763, CallerIDName: +7—3401763, ConnectedLineNum: , ConnectedLineName: , Language: ru, AccountCode: , Context: incoming-vats342271, Exten: u401, Priority: 10, Uniqueid: asterisk-1757658788.10, Linkedid: asterisk-1757658788.10, Cause: 16]

2025-09-12 09:33:08,946 INFO [com.catneye.asterisk.AMI.AMIThread] (Thread-107) AMIThread read line: [Event: Hangup, Privilege: call,all, SystemName: asterisk, Channel: PJSIP/vats342271_9-00000007, ChannelState: 4, ChannelStateDesc: Ring, CallerIDNum: +7—3401763, CallerIDName: +7—3401763, ConnectedLineNum: , ConnectedLineName: , Language: ru, AccountCode: , Context: incoming-vats342271, Exten: u401, Priority: 10, Uniqueid: asterisk-1757658788.10, Linkedid: asterisk-1757658788.10, Cause: 3, Cause-txt: No route to destination]

That shows the event that happened. It doesn’t show what occurred within Asterisk to cause the events, such as dialplan.

What is your end goal with AMI usage? What are you trying to achieve?

i need give a call with all channels and full lifecycle history.

Why don’t you base this off of CEL, which was intended (and has been used) for such a thing?

in realtime

cel is channels, not a call

Because calls aren’t really that much of a thing in Asterisk… they’re channels which can be bridged together and have some association.

CEL can also be published on manager in realtime.

I’m going to bow out of this thread at this point, someone else may join in.

i know this. but my sollution at this time - emulate dial from varset. thanks