I'm implementing a SBC with my Asterisk PBX but the keeps disabling the trunk group I've configured and I think it may be because Asterisk is returning a 4r04 to the OPTIONS. I've created a test context and have put in a wildcard pattern match to try and catch those options but it doesn't seem to work. Is there a way to have asterisk respond with an 200 OK instead of a 404? -- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ---Heinlein -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200716/8b033723/attachment.html>
Hey John, In one installation I have, we use several monitoring tools (nagios based and custom scripts based) and we have the following: ; Reply OK to SIP:OPTIONS [public] exten => s,1,Wait(1) same => n,Hangup : For Nagios exten => nagios,1,Wait(1) same => n,Hangup NOTES: 1- We have context=public in sip.conf, if you have anything else, you must update the dialplan above accordingly. 2- The second 'nagios' extension, is because the scripts need to send a user, so we have it preconfigured to "nagios", if it's from Kamailio it won't send a user and thus it will match in the s,1 exten. Feel free to remove this one. Give it a try and let me know how it goes. Alternatively, you may also be able to configure your SBC (kamailio/opensips? if so check dispatcher docs for *_reply_codes modparam) to accept a 404 reply to a SIP:OPTIONS as a valid response. Hope it helps. Cheers, Joel. On Thu, Jul 16, 2020 at 5:04 PM John Kiniston <johnkiniston at gmail.com> wrote:> I'm implementing a SBC with my Asterisk PBX but the keeps disabling the > trunk group I've configured and I think it may be because Asterisk is > returning a 4r04 to the OPTIONS. > > I've created a test context and have put in a wildcard pattern match to > try and catch those options but it doesn't seem to work. > > Is there a way to have asterisk respond with an 200 OK instead of a 404? > > -- > A human being should be able to change a diaper, plan an invasion, butcher > a hog, conn a ship, design a building, write a sonnet, balance accounts, > build a wall, set a bone, comfort the dying, take orders, give orders, > cooperate, act alone, solve equations, analyze a new problem, pitch manure, > program a computer, cook a tasty meal, fight efficiently, die gallantly. > Specialization is for insects. > ---Heinlein > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200716/41811c5a/attachment.html>
In article <CAFJQOGdprXK34Ai2FUk0qoJnj9927MmVU+7fSi+=uxH02fZBPA at mail.gmail.com>, John Kiniston <johnkiniston at gmail.com> wrote:> > I'm implementing a SBC with my Asterisk PBX but the keeps disabling the > trunk group I've configured and I think it may be because Asterisk is > returning a 4r04 to the OPTIONS. > > I've created a test context and have put in a wildcard pattern match to try > and catch those options but it doesn't seem to work. > > Is there a way to have asterisk respond with an 200 OK instead of a 404?I think I found in the past that your dialplan needs an 's' extension in the default context for the sip entry, for OPTIONS to return a 200 instead of 404. It doesn't matter what the 's' extension does, so it can just call Hangup. Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
I've got this setup in a test context. [test] exten => s,hint,SIP/7124 exten => s,1,NoOP(Options to $EXTEN) same => n,Hangup() exten => _x.,hint,SIP/7124 exten => _X.,1,NoOP(Options to $EXTEN) same => n,Hangup() exten => Anonymous,hint,SIP/7124 exten => Anonymous,1,NoOP(Options to $EXTEN) same => n,Hangup() I added hints to see if that would make a difference and it hasn't. I also made a 'Anonymous' peer to see if that would help without any luck. On Thu, Jul 16, 2020 at 6:11 PM Joel Serrano <joel at gogii.net> wrote:> Hey John, > > In one installation I have, we use several monitoring tools (nagios based > and custom scripts based) and we have the following: > > ; Reply OK to SIP:OPTIONS > [public] > exten => s,1,Wait(1) > same => n,Hangup > : For Nagios > exten => nagios,1,Wait(1) > same => n,Hangup > > NOTES: > > 1- We have context=public in sip.conf, if you have anything else, you must > update the dialplan above accordingly. > 2- The second 'nagios' extension, is because the scripts need to send a > user, so we have it preconfigured to "nagios", if it's from Kamailio it > won't send a user and thus it will match in the s,1 exten. Feel free to > remove this one. > > Give it a try and let me know how it goes. > > Alternatively, you may also be able to configure your SBC > (kamailio/opensips? if so check dispatcher docs for *_reply_codes modparam) > to accept a 404 reply to a SIP:OPTIONS as a valid response. > > > Hope it helps. > > Cheers, > Joel. > > > On Thu, Jul 16, 2020 at 5:04 PM John Kiniston <johnkiniston at gmail.com> > wrote: > >> I'm implementing a SBC with my Asterisk PBX but the keeps disabling the >> trunk group I've configured and I think it may be because Asterisk is >> returning a 4r04 to the OPTIONS. >> >> I've created a test context and have put in a wildcard pattern match to >> try and catch those options but it doesn't seem to work. >> >> Is there a way to have asterisk respond with an 200 OK instead of a 404? >> >> -- >> A human being should be able to change a diaper, plan an invasion, >> butcher a hog, conn a ship, design a building, write a sonnet, balance >> accounts, build a wall, set a bone, comfort the dying, take orders, give >> orders, cooperate, act alone, solve equations, analyze a new problem, pitch >> manure, program a computer, cook a tasty meal, fight efficiently, die >> gallantly. Specialization is for insects. >> ---Heinlein >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> 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 -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ---Heinlein -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200717/6fcaec0d/attachment.html>
Seemingly Similar Threads
- Problem with OPTIONS requests.
- Queue not dialing out to cell phone for some reason
- Problem with OPTIONS requests.
- Any way of creating a file to write to from the dialplan, or must I use AGI?
- How to supervise a Voicemail box with a BLF button ? What does "State:Unavailable" exactly means ?