Read to get variable

Discussion in 'General' started by nancy, Sep 18, 2009.

  1. nancy

    Joined:
    Aug 5, 2009
    Messages:
    17
    Likes Received:
    0
    In extensions_additional.conf in the context of the pstn trunk put the following

    exten => 4929982528,n,Answer()
    exten => 4929982528,n,Read(digito,beep,10,,2,300)
    exten => 4929982528,n,SayDigits(${digito})
    exten => 4929982528,n,Hangup

    But I am not getting the variable, Why?

    Best Regards
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Reference (from bash):

    rasterisk -x 'show application read'

    unless ten digits are dialed (and read), you will have to wait 10 minutes for your context 4929982528 to return.

    I suggest you add :

    exten => 4929982528,n,noop(The digito I recognized was - ${digito})

    after the Read and watch the CLI (for up to 10 minutes).

    (you can also add DTMF detection output to the /var/log/asterisk/full log, in /etc/asterisk/logger.conf change the "full" line to

    full => dtmf,notice,warning,error,debug,verbose

    then issue

    rasterisk -x 'logger reload'

    to make it "take", then;

    tail -f /var/log/asterisk/full

    if you want a more dynamic view of what is happening)
     

Share This Page