have setup direct routing recently with CUBE .. My ITSP appears to accept alaw as 1st preference followed only by ulaw as 2nd choice before sending 180 ringing back ... What I noticed is if i call an external number from Jabber registered to on-prem CUCM then it always works as it sends 711alaw as per audio codec preference list ...In Teams phone system I can't specify codec order so I added the below on the SIP-profile on my ITSP facing outgoing dial peer.
request INVITE sdp-header Audio-Media modify "RTP/AVP 0 8" "RTP/AVP 8 0"
this works for the m=audio port# RTP/AVP 0 8 101 19 and changes it to RTP/AVP 8 0 101 19
but the next 2 line remains unchanged which still have PCMU first followed by PCMA as below
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
.. How can I flip the order so a=rtpmap:8 PCMA/8000 is listed first followed by a=rtpmap:0 PCMU/8000 in next line ??? can't work which SDP-attribute am I modifying to achieve this ??
For ref - when calling from Jabber (working) - outgoing invite from CUBE to ITSP is like this
m=audio 44936 RTP/AVP 8 0 101 19
c=IN IP4 x.x.x.x
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
When calling from Teams invite from CUBE to ITSP is like below
m=audio 42494 RTP/AVP 8 0 101 19
c=IN IP4 x.x.x.x
a=rtpmap:0 PCMU/8000 <== this here is what ITSP having problem with. they want the line below (a=rtpmap:8 PCMA/8000) first.
a=rtpmap:8 PCMA/8000
appreciate any feedback ...