Write custom variable in SNEP CDR Bank

1

I have a server snep and by dial-plan I made a request in the URA where the client that called has to enter his card.

I made the validations if the card exists in the bank of the client by odbc direct in the dial plan and it validates normally and only allows the continuation of the connection after the card exists.

What I need to do, and what I do not think, is to pass this variable from the card to the responsible party in writing the links in the CDR table to a custom field " carteirinha " that I created in this same table. / p>     

asked by anonymous 07.02.2018 / 19:48

1 answer

1

You will need to configure the database and asterisk version 1.8 or higher as follows (tested in version 11):

  • add the "card" field in the 'cdr' table of the database;
  • Set the 'card' field in the asterisk dial plan using the CDR () function, as shown below;
  • reload the dial plan and cdr_mysql module, or restart asterisk.

Example:

exten => s,1,...
exten => s,n,Read(numeroDaCarteirinha)
exten => s,n,Set(CDR(carteirinha)=${numeroDaCarteirinha})
... etc etc

NOTE: Tested with asterisk 11, mysql 5.4 and running on Centos7

    
07.03.2018 / 14:13