G
G
Gring762017-02-01 10:06:40
Asterisk
Gring76, 2017-02-01 10:06:40

How to pass a variable to Asterisk through AMI so that it is displayed in AMI CDR?

Hello.
Asterisk 13.13.1
Through AMI, you can make a call to Astrerisk
I do it like this (call to 101, after picking up the phone it connects to subscriber 105)

Action: login
Username: admin
Secret: passw

Action: Originate
Channel: SIP/101
Callerid: 101
Timeout: 15000
Context: call-out
Exten: 105
Priority: 1

AMI CDR outputs call results to console
Example
Event: Cdr
Privilege: cdr,all
Timestamp: 1485932439.571419
AccountCode:
Source: 101
Destination: 105
DestinationContext: call-out
CallerID: "Number 101" <101>
Channel: SIP/101-00000003
DestinationChannel: SIP/105-00000004
LastApplication: Dial
LastData: SIP/105
StartTime: 2017-02-01 10:00:32
AnswerTime: 2017-02-01 10:00:32
EndTime: 2017-02-01 10:00:39
Duration: 6
BillableSeconds: 6
Disposition: NO ANSWER
AMAFlags: DOCUMENTATION
UniqueID: 1485932428.5
UserField:

Is it possible to set some variable when initializing a call through AMI, which could then be seen in the Event CDR ?
What worked and what didn't.
I tried to use
Callerid: 123456789 I
see it in CDR, but at the same time it is visible to subscribers, which is not good.
I noticed that there is a UserField field in the CDR
:
But I can’t get the data to pass there.
I even found a mention that there is / was such a bug
https://issues.asterisk.org/jira/browse/ASTERISK-13744
But, unfortunately, the patch does not apply to the version of Asterisk 13.13.1 Tell me
how can I overcome this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
silverjoe, 2017-02-01
@Gring76

[Application:]
[Data:]
[Variable:]
[Account:]
[EarlyMedia:]
[Codecs:]
[ChannelId:]
[OtherChannelId:]
Variable Channel variable to set, multiple Variable: headers are allowed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question