PAMI ActionID gets lost when call is transfered

I am trying to orginatecall from web interface to Local Extension, when the local extension for an example 722 picks up the call, customer number is connected next. I am attaching ActionID in the code, action id remains in the event log untill the extension. but it does not attaches itself to the next call transfer.

Code i am using is:
$originateMsg = new OriginateAction(‘SIP/722’);

Below is the log, when customer number is auto dialed/connected from the extension the ActionID becomes null so i can’t track which extension had dialed the customer number

EVENT LOG When Extension Picks up the ring:
ActionID : 123123
ChannelStateDesc: Up
ConnectedLineName: DAHDI/g0/54631345
DestChannel: SIP/722-00006a99
DialStatus: ANSWER
DestContext: from-internal
extension: 54631345

EVENT LOG When Customer Picks up the ring:
ChannelStateDesc: Up
ActionID :
DestCallerIDNum: 223820
ConnectedLineName: CID:223820
DestChannel: DAHDI/i1/54631345-3bf8
DialStatus: ANSWER
DestContext: from-digital
extension: 54631345

I’m fairly sure someone had the same misunderstanding only yesterday. I hope this isn’t homework!

I’m actually surprised that there is an action ID on the first answer, as this is a normal event, whereas action IDs are normally only generated before the success/failure response and only by explicit code in the action hander. I guess there is special code for this.

I certainly wouldn’t expect the B side answer to be sufficiently related to the originate to get special treatment. By that time other AMI actions could have influenced the call.

No this is not, i can’t find anything resembling in the log that can help me track in reverse order, can you help?

Once the call is bridged, you will know the identity of the B channel. Otherwise you will need to correlate its NewChannel event, in time, with events on the A side. There doesn’t seem to be an explicit correlator before the channel is bridged.

1 Like

Can you please provide any code example for correlation?