S
S
Salavat Sitdikov2016-09-13 01:00:09
Asterisk
Salavat Sitdikov, 2016-09-13 01:00:09

How to fix destination in asterisk cdr?

There is a custom extension

[custom-from-last]
exten => X, 1, Answer()
exten => X, 2, MYSQL(Connect connid localhost пользователь пароль база)
exten => X, 3, MYSQL(Query resultid ${connid}  самзапрос)
exten => X, 4, MYSQL(Fetch fetchid ${resultid} channel)
exten => X, 5, MYSQL(Clear ${resultid})
exten => X, 6, MYSQL(Disconnect ${connid})
exten => X, 7, Set(CHAN=${SHELL(echo ${channel} | tr -d '\n' | sed -e 's/.*\/\(.*\)\-.*/\1/g')})
exten => X, 8, GotoIf(${fetchid}?9:10)
exten => X, 9, Dial(SIP/${CHAN})
exten => X, 10, Queue(900)

Everything seems to be working correctly, but ext X is set in the CDR in the destination field, despite the fact that CHAN or queue 900 is called.
Please tell me if this can be fixed and there may be errors in general.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2016-09-13
@Zarom

CDR is sometimes a mysterious thing. You will probably have to manually adjust the CDR variables.
asterisk.ru/knowledgebase/asterisk+func+cdr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question