Hi all,
In pjsip.conf, I set following endpoint setting
allow = alaw,ulaw,g729
My test scenario is as follow:
A: support alaw and ulaw.
B: only support ulaw.
A call B, B answer and reply 200 OK with codec alaw.
Internet Protocol Version 4, Src: 192.168.1.252, Dst: 192.168.1.1
User Datagram Protocol, Src Port: 64068, Dst Port: 5060
Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
Message Header
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 3776182999 3776183000 IN IP4 192.168.1.252
Session Name (s): pjmedia
Bandwidth Information (b): AS:84
Time Description, active time (t): 0 0
Session Attribute (a): X-nat:0
Media Description, name and address (m): audio 4002 RTP/AVP 0 101
Connection Information (c): IN IP4 192.168.1.252
Bandwidth Information (b): TIAS:64000
Media Attribute (a): rtcp:4003 IN IP4 192.168.1.252
Media Attribute (a): sendrecv
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-16
Media Attribute (a): ssrc:411067583 cname:27123cd0114641ff
[Generated Call-ID: 9ux0y4-8wj3aUjpT7lXOr7vdq38omgm.]
But Asterisk will send 200 OK to A with codec alaw and ulaw.
Internet Protocol Version 4, Src: 192.168.1.1, Dst: 192.168.1.252
User Datagram Protocol, Src Port: 5060, Dst Port: 51258
Session Initiation Protocol (200)
Status-Line: SIP/2.0 200 OK
Message Header
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 1769454452 3 IN IP4 192.168.1.1
Session Name (s): Session
Connection Information (c): IN IP4 192.168.1.1
Time Description, active time (t): 0 0
Media Description, name and address (m): audio 51640 RTP/AVP 8 0 101
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute (a): rtpmap:101 telephone-event/8000
Media Attribute (a): fmtp:101 0-16
Media Attribute (a): ptime:20
Media Attribute (a): maxptime:150
Media Attribute (a): sendrecv
[Generated Call-ID: 99142MTVhYzNhZTAxMWJiZjBmMjRmYjEwMzAwZDJlYTI4M2E]
Finally, A send alaw rtp, and B send ulaw rtp. But, because our provider doesn’t allow transcoding, the call will be terminated.
How to solve this problem? Is there any way to send 200 OK with only ulaw to B?
Thank you ~