E
E
Elchin Qafarov2019-04-10 14:59:23
Asterisk
Elchin Qafarov, 2019-04-10 14:59:23

How can I pass the number I called to extensions.conf?

Good afternoon. Need help with Asterisk
Purpose to call the subscriber and voice their debt (debt and number are taken from text.txt)
Where 1-7 numbers are the number and then the debt

[[email protected] ~]# cat text.txt
5315566521     
1224532254

There is a Bash script that calls
asterisk -rx "channel originate SIP/ultel/$y extension [email protected]"
where $y = initial 1-7 digits (5315566)
[zvon]

exten => s,1,Answer()
exten => s,2,Playback(N)
exten => s,3,AGI(test.sh)
exten => s,5,Hangup()


[[email protected] ~]# cat /var/lib/asterisk/agi-bin/test.sh
echo "SAY NUMBER $x n "

And $x = other digits 8-15(521)
The question is how to transfer the number to which I am calling (5315566) to exten => s,3,AGI(test.sh) so as not to confuse subscribers' debts, since 30 clients will call straightaway

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
R
Ronald McDonald, 2019-04-10
@elchin9610

The service variable ${EXTEN} contains the dialed number. Make a parameter for the sh-file, to which you pass this variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question