[asterisk-users] Problem with OPTIONS requests.

Joel Serrano joel at gogii.net
Thu Jul 16 20:09:21 CDT 2020


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>


More information about the asterisk-users mailing list