vk2xxy
(Vk2xxy)
February 21, 2015, 12:26am
1
Distro Stable-6.12.65 64bit installed with Asterisk 13.
An example of pjsip.endpoint.conf produced…
[101]
type=endpoint
aors=101
auth=101-auth
allow=g722
disallow=all
context=from-internal
callerid=device <101>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
Is the order of allow/disallow correct?
tm1000
(Andrew Nagy)
February 21, 2015, 3:45am
2
yes, the ordering is irrelevant. Internally disallow is always first, followed by allow. If you think there is an error with this then let me know!
vk2xxy
(Vk2xxy)
February 21, 2015, 7:26am
3
Must be an Asterisk error then.
As you see it there, a call from the phone at 101 to *65 returns a 488 - Not acceptable here error.
Removing all from disallow allows the call to go ahead using the g722 codec.
xrobau
(Rob Thomas)
February 22, 2015, 9:15pm
4
Yeah, ‘disallow=all’ means ‘I explicitly don’t want to use this codec, no matter what’. What you mean to have is ‘disallow’ = blank, and ‘allow’ = g722,ulaw,alaw
Which means it’ll only allow those three codecs, in that order of preference.
vk2xxy
(Vk2xxy)
February 22, 2015, 10:37pm
5
So there is a difference in how this works between sip and pjsip?
xrobau
(Rob Thomas)
February 22, 2015, 11:50pm
6
Yes. The summary is ‘don’t use deny=all, because that’s what it’ll do’
vk2xxy
(Vk2xxy)
February 23, 2015, 3:28am
7
Probably a typo but deny is for IP addresses.
And what is being said doesn’t go with this document >> Home - Asterisk Documentation
My take on this is that FreePBX is placing the Allow/Disallow entries in the wrong order.
xrobau
(Rob Thomas)
February 23, 2015, 4:30am
8
Sorry, yes, disallow, not deny.
Um… that’s not how I remember the documentation being written, but that IS what it says. If you swap them around in /etc/asterisk/pjsip* does it work the way you expect?
1 Like
vk2xxy
(Vk2xxy)
February 23, 2015, 6:24am
9
Yes. Just ran through this.
allow=g722
disallow=all
^^^ Call fails.
disallow=all
allow=g722
^^^ Call goes through.
tm1000
(Andrew Nagy)
February 23, 2015, 6:30am
10
Then file a bug and we will fix it