Set specific SIP METHOD in ALLOW Header

Hi,

I would like to have some advices to force specific SIP METHOD (Allow) on my INVITE.
My PROVIDER asked me to disable specific METHOD such as SUBSCRIBE, UPDATE, NOTIFY, …
But I don’t how can I do that

I tried to set several directives but without effects.

Currently, here is an exemple of one of my INVITE for outgoing call :

2021/12/29 12:09:07.492682 X.X.X.X:5060 -> Y.Y.Y.Y:5060
INVITE sip:+33xxxxxxxxx@myprovider.com:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP X.X.X.X:5060;rport;branch=z9hG4bKPj170b9bbd-4ce6-4245-977f-4f1d33f2959e
From: "MyASTERISK" <sip:+33xxxxxxxxx@X.X.X.X.X;user=phone>;tag=6ad58a66-e6ee-47d2-8a4b-5efd146e2392
To: <sip:+33xxxxxxxxx@myprovider.com;user=phone>
Contact: <sip:asterisk@X.X.X.X:5060>
Call-ID: 489c8aed-bbd0-46ab-91a0-270a5f5fc1cd
CSeq: 1991 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: <sip:+33xxxxxxxxx@X.X.X.X;user=phone>
Max-Forwards: 70
User-Agent: Asterisk PBX 16.19.0
Content-Type: application/sdp
Content-Length:   235

v=0
o=- 950922898 950922898 IN IP4 X.X.X.X
s=Asterisk
c=IN IP4 X.X.X.X
t=0 0
m=audio 17720 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

Here is the configuration of my provider :

[myprovider]
type=endpoint
transport=transport-myprovider
context=public
disallow=all
allow=alaw
disallowed_methods=UPDATE
direct_media=yes
aors=myprovider
send_ppi=no
send_pai=no
send_rpid=no
trust_id_inbound=yes
callerid_privacy=allowed_passed_screen
user_eq_phone=yes

[myprovider]
type=aor
contact=sip:myprovider.com:5060
qualify_frequency=30


[myprovider]
type=identify
endpoint=myprovider
match=Y.Y.Y.Y

And here is version of my Asterisk and PJSIP :

MyASTERISK*CLI> core show version 
Asterisk 16.19.0 built by root @ MyASTERISK on a x86_64 running Linux on 2021-07-09 14:21:05 UTC
MyASTERISK*CLI> pjsip show version 
PJPROJECT version currently running against: 2.10

Could you help me to understand if it’s possible and if yes, how can I do that please ?

Thanks,

Regards,

KirM

This doesn’t make sense. If they don’t support these, they should simply ignore the relevant parts of the Allow header.

Note most people would not want direct media with a provider.

There is also no configuration for this. It’s automatically produced based on what methods are supported in Asterisk.

Thanks for your answers

If I understand well, methods supported by Asterisk depends on version of PJSIP stack in use ?

According to the RFC3261, is it possible to disable ALLOW HEADER directly to reduce number of messages needed ? (rfc3261)

@david551 : thanks for your advice about direct_media, I’m noob :slight_smile:

There is nothing about managing the user agent’s declared capabilities in the RFC. The bit abut reducing the number of messages needed is, I believe, saying that it avoids the need to send OPTIONS, or, just possibly, also to have exchanges ending in method not supported. The first paragraph says that, if present, Allow lists supported methods.

It seems to me that your provider is trying to get its customers to work round a problem in their system. It would help to know who the provider was, so that people can avoid them, or, if you are lucky, say how they got round the underlying problem.

It also hasn’t been stated why they want this done, and what problem is being solved.

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