[Asterisk-Users] How to play a voice file for " decline "

Eric "ManxPower" Wieling eric at fnords.org
Sun Oct 23 05:12:32 MST 2005


Asterisk guy wrote:
> When get sip respond 6xx ( such as 603 decline),  I want asterisk to
> play a voice file to the caller,  how to do this in extensions ?
> 
> for example, when get 603 respond,  play  decline.gsm  to caller
>                   when get 604 respond, play doesnot-exit.gsm  to caller
>                   when get 606 respond , play not-acceptalbe.gsm to caller

You can't.  You can check the value of DIALSTATUS, but that does not 
directly map to SIP responses.  chan_sip MAY set HANGUPCAUSE with more 
information, but it's still not a 1-to-1 mapping with SIP responses.



More information about the asterisk-users mailing list