0

I am using Asterisk for voice calling.

I am using below context If user call back-

[from-pstn]
exten =>  _X.,1,Playback(demo-thanks)

suppose my number is 74900 on which user can call back.

what I want if user call on 749001, 749002 then i could recognize what user has exactly dialed. currently when user dials 749001 then asterisk console shows-

Executing [74900@from-pstn:1] Playback("DAHDI/i1/usernumber-1e", "demo-thanks") in new stack

How can I get exact number dialed by user ?

1 Answers1

1

Use the built-in EXTEN variable to access the number user dialed in. Example:

[from-pstn]
exten => _X.,1,Playback(demo-thanks)
same => n,SayNumber(${EXTEN})

See Using the CONTEXT, EXTEN, PRIORITY, UNIQUEID, and CHANNEL Variables.