SIP Options Configuration / Send between asterisk and softphone

Hello,
I’m new with the usage of asterisk (Asterisk 18.2.0 currently running on ubuntu)

I’m trying to set a small call center for development and I’ve some trouble with the SIP OPTIONS

Asterisk send options and my softphone answer with 200 OK but when my softphone send option asterisk respond with a 401 Unauthoried

Here is pjsip.conf :

udp-transport]
type=transport
protocol=udp
bind=0.0.0.0

;===============ENDPOINT TEMPLATES

endpoint-basic ](!)
type=endpoint
transport=udp-transport
context=internal
disallow=all
allow=alaw

auth-userpass ](!)
type=auth
auth_type=userpass

aor-single-reg ](!)
type=aor
max_contacts=2
qualify_frequency=30
qualify_timeout=3.0
maximum_expiration=1800

;===============EXTENSION 6001

6001](endpoint-basic)
auth=auth6001
aors=6001

auth6001](auth-userpass)
password=6001
username=6001

6001](aor-single-reg)

there is a another thing that I don’t understant is why the nomber of sip options send by asterisk increase for exemple first login I receive 1 option every 30seconds I do a unregister/register and then I get 2 options from asterisk etc…
With wireshark there is a message : Suspected resend of frame: XXX

Thanks for help

The SIP RFC requires OPTIONS to be processed in the same way as INVITE, and as you have configured Asterisk to authenticate INVITE requests, that is what it will do for OPTIONS. On the other hand it is unlikely that the phone will authenticate Asterisk, and quite probable that there is no means to configure it to do that. For the purposes for which Asterisk uses OPTIONS, a 401 response is as good as 200.

If OPTIONS is being resent, the normal reason would be that no reply was received to the previous one.

Thank you for you answer it help me to understand some stuff, I did some test and it look like after a certain time the number of OPTIONS decrease.
Why I activate the options is, I will remove the “registration” part and work only with “keep alive” (options) to see if both side are up.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.