Chris Maciejewski
2009-Apr-16 10:59 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
Hi, I am trying to send "404 Not found" reply, without any luck with the following: exten => 555,1,Playback(you-dialed-wrong-number,noanswer) exten => 555,n,Playback(check-number-dial-again,noanswer) exten => 555,n,Congestion() However the above results in "500 Service Unavailable" being send out. What would be the correct application/function to generate "404 Not found"? Thanks for help, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090416/a7d570b5/attachment.htm
Alex Balashov
2009-Apr-16 11:16 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
You don't get to choose which SIP replies Asterisk sends. Asterisk is too high-level for that. A sure-fire way to raise a 404 is to have the call come into an extension that does not exist in the dial plan. You cannot really send a reply like a 404 when you have already picked up the call in order to play the recordings. -- Sent from mobile device On Apr 16, 2009, at 6:59 AM, Chris Maciejewski <chris at wima.co.uk> wrote:> Hi, > > I am trying to send "404 Not found" reply, without any luck with the > following: > > exten => 555,1,Playback(you-dialed-wrong-number,noanswer) > exten => 555,n,Playback(check-number-dial-again,noanswer) > exten => 555,n,Congestion() > > However the above results in "500 Service Unavailable" being send out. > > What would be the correct application/function to generate "404 Not > found"? > > Thanks for help, > > Chris > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Garth van Sittert
2009-Apr-16 11:20 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
As a quick workaround you could use a goto to send to an invalid extension. Goto(nowhere,1) Garth van Sittert Technical Director BitCo 08600 24826 www.bitco.co.za Chris Maciejewski wrote:> Hi, > > I am trying to send "404 Not found" reply, without any luck with the > following: > > exten => 555,1,Playback(you-dialed-wrong-number,noanswer) > exten => 555,n,Playback(check-number-dial-again,noanswer) > exten => 555,n,Congestion() > > However the above results in "500 Service Unavailable" being send out. > > What would be the correct application/function to generate "404 Not > found"? > > Thanks for help, > > Chris > > ------------------------------------------------------------------------ > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Alex Balashov
2009-Apr-16 11:29 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
Not once you have picked up the call. And if you do it prior, why not just misdirect the call? -- Sent from mobile device On Apr 16, 2009, at 7:20 AM, Garth van Sittert <garth at bitco.co.za> wrote:> As a quick workaround you could use a goto to send to an invalid > extension. > > Goto(nowhere,1) > > > Garth van Sittert > Technical Director > BitCo > 08600 24826 > www.bitco.co.za > > > > Chris Maciejewski wrote: >> Hi, >> >> I am trying to send "404 Not found" reply, without any luck with the >> following: >> >> exten => 555,1,Playback(you-dialed-wrong-number,noanswer) >> exten => 555,n,Playback(check-number-dial-again,noanswer) >> exten => 555,n,Congestion() >> >> However the above results in "500 Service Unavailable" being send >> out. >> >> What would be the correct application/function to generate "404 Not >> found"? >> >> Thanks for help, >> >> Chris >> >> --- >> --------------------------------------------------------------------- >> >> _______________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Philipp Kempgen
2009-Apr-16 11:57 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
Chris Maciejewski schrieb:> I am trying to send "404 Not found" reply, without any luck with the > following: > > exten => 555,1,Playback(you-dialed-wrong-number,noanswer) > exten => 555,n,Playback(check-number-dial-again,noanswer) > exten => 555,n,Congestion() > > However the above results in "500 Service Unavailable" being send out. > > What would be the correct application/function to generate "404 Not found"?You should either not have that extension at all or you could try something like exten => 555,1,Set(PRI_CAUSE=1) exten => 555,n,Hangup(1) Cause 1 is AST_CAUSE_UNALLOCATED which should translate to 404 Not Found in SIP. Philipp Kempgen -- AMOOCON 2009, May 4-5, Rostock / Germany -> http://www.amoocon.de Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 --
May I ask what's the benefit of getting 404 responses ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090416/68f01c6d/attachment.htm
ContactTel Business
2009-Apr-16 15:28 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
Hmm Exten => _X.,1,Busy() or playback not found.. just a catch all... or modify source to add another kind of dialplan entry etc.. From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Chris Maciejewski Sent: April-16-09 6:59 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] How to send "404 Not found" SIP reply? Hi, I am trying to send "404 Not found" reply, without any luck with the following: exten => 555,1,Playback(you-dialed-wrong-number,noanswer) exten => 555,n,Playback(check-number-dial-again,noanswer) exten => 555,n,Congestion() However the above results in "500 Service Unavailable" being send out. What would be the correct application/function to generate "404 Not found"? Thanks for help, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090416/de7c5109/attachment.htm
Tilghman Lesher
2009-Apr-16 15:52 UTC
[asterisk-users] How to send "404 Not found" SIP reply?
On Thursday 16 April 2009 10:28:38 ContactTel Business wrote:> Exten => _X.,1,Busy() or playback not found.. just a catch all... or modify > source to add another kind of dialplan entry etc..Actually, that should send a 486 Busy here. Close, though. The OP could instead do a Hangup(1), Hangup(2), Hangup(3), or Hangup(26). All of these cause codes map to a SIP status 404. See RFC 3398 for the complete mapping of cause codes to SIP status codes. -- Tilghman