SayNumber() gets reorder tone

Hi noob here.

I installed asterisk 1.8.4 on Debian 6.1. All prerequisite has been installed. I am following the “Asterisk Definitive Guide” and running into an issue with using the SayNumber application.

exten => 202,1,Set(MagicNumber=42)
same => n,SayNumber(${MagicNumber})

From x-lite when I dial the exten 202 I get a reorder tone saying " the person you are calling is unavaiable please try again."

On the x-lite display is shows: call failed: Declined

This is what the Asterisk CLI displays

== Parsing ‘/etc/asterisk/asterisk.conf’: == Found
== Parsing ‘/etc/asterisk/extconfig.conf’: == Found
Connected to Asterisk 1.8.4 currently running on debian (pid = 1048)
Verbosity is at least 5
== Using SIP RTP CoS mark 5
– Executing [202@default:1] Set(“SIP/0000ffff0001-00000007”, “MagicNumber=42”) in new stack
– Executing [202@default:2] SayNumber(“SIP/0000ffff0001-00000007”, “42”) in new stack
– <SIP/0000ffff0001-00000007> Playing ‘digits/40.ulaw’ (language ‘en’)
– <SIP/0000ffff0001-00000007> Playing ‘digits/2.ulaw’ (language ‘en’)
– Auto fallthrough, channel ‘SIP/0000ffff0001-00000007’ status is ‘UNKNOWN’

Here is a copy of my configs

sip.conf

[general]

context=unauthenticated
allowguest=no
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no

;;;;;;;;;;;;;;;;;;
; Phone Templete ;
;;;;;;;;;;;;;;;;;;

office-phone

type=friend
context=default
host=dynamic
nat=yes
secret=xxxxxx
dtmfmode=auto
qualify=yes
disallow=all
allow=ulaw
allow=alaw

;;;;;;;;;;
; Phones ;
;;;;;;;;;;

0000ffff0000

0000ffff0001

0000ffff0002

0000ffff0003

0000ffff0004

Extension.conf

[default]

exten => 202,1,Set(MagicNumber=42)
same => n,SayNumber(${MagicNumber})

exten => 101,1,Dial(SIP/0000ffff0001)

Thanks,

At a guess, because the incoming network won’t allow to provide early media. You will probably have to answer the call first.

Hi

[quote]-- Executing [202@default:1] Set(“SIP/0000ffff0001-00000007”, “MagicNumber=42”) in new stack
– Executing [202@default:2] SayNumber(“SIP/0000ffff0001-00000007”, “42”) in new stack
– <SIP/0000ffff0001-00000007> Playing ‘digits/40.ulaw’ (language ‘en’)
– <SIP/0000ffff0001-00000007> Playing ‘digits/2.ulaw’ (language ‘en’)
– Auto fallthrough, channel ‘SIP/0000ffff0001-00000007’ status is ‘UNKNOWN’[/quote]

The dial plan is working exactly as expected, You may if you want to hear it answer the channel,

and you way want to do something with the call after saying the digits other wise it does as you see ‘fail’

But the issue you are having is more your expectation of what you are expecting, and not what is happening as that is correct

AH! your right!

After adding: same => n,Answer() and Hangup() it worked like i wanted it too!

Before:

exten => 202,1,Set(MagicNumber=42)
same => n,SayNumber(${MagicNumber})

After:

exten => 202,1,Set(MagicNumber=42)
same => n,Answer()
same => n,SayNumber(${MagicNumber})
same => n,Hangup()

The call to 202 will answer, say the number and then hangup

thanks!!!