I have setup asterisk as peer of a VOIP termination provider .
I’m sending calls using call files and playing audio , which are of average 30 seconds .
but even after finishing audio playback , calls are not disconnecting , and if the receiver of call don’t hangup manually , the call will continue forever ,
What I want to do is hangup as soon as media file finished playback or after some fixed time of answering the call like 30 seconds .
My call file is like this :
Channel: SIP/PROVIDER/NUMBER
Priority: 1
MaxRetries: 3
RetryTime: 40
WaitTime: 30
Context: PROVIDER
Application: Playback
Data: AUDIO_FILE_NAME
Archive: Yes
My dialplan for this PROVIDER is like this:
[PROVIDER]
exten => _NXXNXXXXXX,1,Dial(SIP/PROVIDER/0011102${EXTEN})
everything is working , just the hangup is the problem .
I tried adding this line :
exten => _NXXNXXXXXX,n,Hangup
but it’s not hanging up the call , but even the playback is not working If I add this , call goes , but can’t hear anything .
The solution will be appreciated .
Thank you .
try with this Set(TIMEOUT(absolute)=30) in your PROVIDER context
OR
you can use any of the following options of Dial application,
S - Hang up the call x seconds after the called party has answered the call. or
L - Limit the call to x milliseconds. Play a warning when y milliseconds are left. Repeat the warning every z milliseconds until time expires.
wiki.asterisk.org/wiki/display/ … ation_Dial
–Satish Barot
satish4asterisk@gmail.com
[quote=“satish4asterisk”]OR
you can use any of the following options of Dial application,
S - Hang up the call x seconds after the called party has answered the call. or
L - Limit the call to x milliseconds. Play a warning when y milliseconds are left. Repeat the warning every z milliseconds until time expires.
wiki.asterisk.org/wiki/display/ … ation_Dial
–Satish Barot
satish4asterisk@gmail.com[/quote]
Hi Thanks , Do I have to set this option in extensions. conf in Dial application ? and if yes what is the syntax for that ?
I have tried with : Dial(SIP/provider${someextension} , 30 , S(30) )
and Dial(SIP/provider${someextension} , 30 , L(30) )
but no effects … I indeed reloaded the dialplan
Looks like that should have worked. Just try this:
[PROVIDER]
exten => _NXXNXXXXXX,1,Set(TIMEOUT(absolute)=30)
same => n,Dial(SIP/PROVIDER/0011102${EXTEN})