3 - At some point after Pre-answer, the other end issues a 183 Session Progress, changing to only accept PCMA.
4 - Freeswitch attempts to select new codecs but only looks at PCMU, and cancels the call with INCOMPATIBLE_DESTINATION.
Here is the console log and sip trace... Hope it helps!
2014-06-09 21:35:39.615207 [DEBUG] switch_ivr_originate.c:2069 Parsing global variables
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [plivo_request_uuid]=[004fd8a2-f01e-11e3-844d-22000ad937f0]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [origination_caller_id_number]=[12026004299]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [plivo_from]=[12026004299]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [plivo_to]=[0011104555592211972]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [plivo_app]=[true]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [originate_timeout]=[60]
2014-06-09 21:35:39.615207 [DEBUG] switch_event.c:1661 Parsing variable [ignore_early_media]=[true]
2014-06-09 21:35:39.615207 [NOTICE] switch_channel.c:1049 New Channel sofia/external/0011104555592211972 [005052e6-f01e-11e3-bbae-cbf0f4eac998]
2014-06-09 21:35:39.615207 [DEBUG] mod_sofia.c:5237 (sofia/external/0011104555592211972) State Change CS_NEW -> CS_INIT
2014-06-09 21:35:39.615207 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:418 (sofia/external/0011104555592211972) Running State Change CS_INIT
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:458 (sofia/external/0011104555592211972) State INIT
2014-06-09 21:35:39.615207 [DEBUG] mod_sofia.c:87 sofia/external/0011104555592211972 SOFIA INIT
2014-06-09 21:35:39.615207 [DEBUG] sofia_glue.c:2746 sofia/external/0011104555592211972 sending invite version: 1.2.24 git 7b74ee3 2014-06-03 00:26:24Z 32bit
Local SDP:
v=0
o=FreeSWITCH 1402325141 1402325142 IN IP4 54.203.245.50
s=FreeSWITCH
c=IN IP4 54.203.245.50
t=0 0
m=audio 24598 RTP/AVP 0 8 3 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
2014-06-09 21:35:39.615207 [DEBUG] mod_sofia.c:127 (sofia/external/0011104555592211972) State Change CS_INIT -> CS_ROUTING
2014-06-09 21:35:39.615207 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:458 (sofia/external/0011104555592211972) State INIT going to sleep
send 1071 bytes to udp/[108.59.2.133]:5060 at 21:35:39.620673:
------------------------------------------------------------------------
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Max-Forwards: 70
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.2.24+git~20140603T002624Z~7b74ee3955~32bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 207
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1402325141 1402325142 IN IP4 54.203.245.50
s=FreeSWITCH
c=IN IP4 54.203.245.50
t=0 0
m=audio 24598 RTP/AVP 0 8 3 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
2014-06-09 21:35:39.615207 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:418 (sofia/external/0011104555592211972) Running State Change CS_ROUTING
2014-06-09 21:35:39.615207 [DEBUG] sofia.c:5845 Channel sofia/external/0011104555592211972 entering state [calling][0]
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:474 (sofia/external/0011104555592211972) State ROUTING
2014-06-09 21:35:39.615207 [DEBUG] mod_sofia.c:150 sofia/external/0011104555592211972 SOFIA ROUTING
2014-06-09 21:35:39.615207 [DEBUG] switch_ivr_originate.c:67 (sofia/external/0011104555592211972) State Change CS_ROUTING -> CS_CONSUME_MEDIA
2014-06-09 21:35:39.615207 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:474 (sofia/external/0011104555592211972) State ROUTING going to sleep
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:418 (sofia/external/0011104555592211972) Running State Change CS_CONSUME_MEDIA
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:493 (sofia/external/0011104555592211972) State CONSUME_MEDIA
2014-06-09 21:35:39.615207 [DEBUG] switch_core_state_machine.c:493 (sofia/external/0011104555592211972) State CONSUME_MEDIA going to sleep
recv 367 bytes from udp/[108.59.2.133]:5060 at 21:35:39.725204:
------------------------------------------------------------------------
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 54.203.245.50:5080;received=54.203.245.50;rport=5080;branch=z9hG4bKUNeNtZcZp5ZmB
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 INVITE
Server: OpenSIPS (1.8.2-notls (x86_64/linux))
Content-Length: 0
------------------------------------------------------------------------
recv 657 bytes from udp/[108.59.2.133]:5060 at 21:35:41.191275:
------------------------------------------------------------------------
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 INVITE
Content-Type: application/sdp
Supported: timer,100rel
Content-Length: 226
v=0
o=RISNEXT02 869 1999 IN IP4 80.84.30.41
s=sip call
c=IN IP4 80.84.30.41
t=0 0
m=audio 42108 RTP/AVP 0 13 101
a=rtpmap:0 PCMU/8000
a=rtpmap:13 CN/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
2014-06-09 21:35:41.175213 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:41.175213 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:41.175213 [DEBUG] sofia.c:5845 Channel sofia/external/0011104555592211972 entering state [proceeding][183]
2014-06-09 21:35:41.175213 [DEBUG] sofia.c:5858 Remote SDP:
v=0
o=RISNEXT02 869 1999 IN IP4 80.84.30.41
s=sip call
c=IN IP4 80.84.30.41
t=0 0
m=audio 42108 RTP/AVP 0 13 101
a=rtpmap:0 PCMU/8000
a=rtpmap:13 CN/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:5284 Audio Codec Compare [PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3192 Set Codec sofia/external/0011104555592211972 PCMU/8000 20 ms 160 samples 64000 bits
2014-06-09 21:35:41.175213 [DEBUG] switch_core_codec.c:111 sofia/external/0011104555592211972 Original read codec set to PCMU:0
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:5444 Set 2833 dtmf send payload to 101
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3451 AUDIO RTP [sofia/external/0011104555592211972] 10.217.55.240 port 24598 -> 80.84.30.41 port 42108 codec: 0 ms: 20
2014-06-09 21:35:41.175213 [DEBUG] switch_rtp.c:2040 Starting timer [soft] 160 bytes per 20ms
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3718 Set 2833 dtmf send payload to 101
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3724 Set 2833 dtmf receive payload to 101
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3751 sofia/external/0011104555592211972 Set rtp dtmf delay to 40
2014-06-09 21:35:41.175213 [DEBUG] sofia_glue.c:3757 Set comfort noise payload to 13
2014-06-09 21:35:41.175213 [NOTICE] sofia_glue.c:4362 Pre-Answer sofia/external/0011104555592211972!
2014-06-09 21:35:41.175213 [DEBUG] switch_channel.c:3370 (sofia/external/0011104555592211972) Callstate Change DOWN -> EARLY
recv 739 bytes from udp/[108.59.2.133]:5060 at 21:35:49.145080:
------------------------------------------------------------------------
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 INVITE
Content-Type: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,PRACK,UPDATE
Server: OpenSIPS (1.6.4-2-notls (x86_64/linux))
Content-Length: 239
v=0
o=- 339363712333429347 1 IN IP4 81.52.176.165
s=-
c=IN IP4 81.52.176.165
t=0 0
a=sendrecv
m=audio 32736 RTP/AVP 8 13 101
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
------------------------------------------------------------------------
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [DEBUG] sofia.c:5845 Channel sofia/external/0011104555592211972 entering state [proceeding][183]
2014-06-09 21:35:49.135201 [DEBUG] sofia.c:5858 Remote SDP:
v=0
o=- 339363712333429347 1 IN IP4 81.52.176.165
s=-
c=IN IP4 81.52.176.165
t=0 0
a=sendrecv
m=audio 32736 RTP/AVP 8 13 101
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
2014-06-09 21:35:49.135201 [DEBUG] sofia_glue.c:5284 Audio Codec Compare [PCMA:8:8000:20:64000]/[PCMU:0:8000:20:64000]
2014-06-09 21:35:49.135201 [DEBUG] sofia_glue.c:5226 Set comfort noise payload to 13
2014-06-09 21:35:49.135201 [DEBUG] sofia_glue.c:5284 Audio Codec Compare [CN:13:8000:20:0]/[PCMU:0:8000:20:64000]
2014-06-09 21:35:49.135201 [DEBUG] sofia_glue.c:5284 Audio Codec Compare [telephone-event:101:8000:20:0]/[PCMU:0:8000:20:64000]
2014-06-09 21:35:49.135201 [DEBUG] sofia_glue.c:5444 Set 2833 dtmf send payload to 101
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1016 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [NOTICE] sofia.c:6012 Hangup sofia/external/0011104555592211972 [CS_CONSUME_MEDIA] [INCOMPATIBLE_DESTINATION]
2014-06-09 21:35:49.135201 [DEBUG] switch_channel.c:3189 Send signal sofia/external/0011104555592211972 [KILL]
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [DEBUG] sofia.c:1109 Channel is already hungup.
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:418 (sofia/external/0011104555592211972) Running State Change CS_HANGUP
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:681 (sofia/external/0011104555592211972) Callstate Change EARLY -> HANGUP
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:683 (sofia/external/0011104555592211972) State HANGUP
2014-06-09 21:35:49.135201 [DEBUG] mod_sofia.c:506 Channel sofia/external/0011104555592211972 hanging up, cause: INCOMPATIBLE_DESTINATION
2014-06-09 21:35:49.135201 [DEBUG] mod_sofia.c:568 Sending CANCEL to sofia/external/0011104555592211972
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:48 sofia/external/0011104555592211972 Standard HANGUP, cause: INCOMPATIBLE_DESTINATION
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:683 (sofia/external/0011104555592211972) State HANGUP going to sleep
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:450 (sofia/external/0011104555592211972) State Change CS_HANGUP -> CS_REPORTING
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:418 (sofia/external/0011104555592211972) Running State Change CS_REPORTING
send 393 bytes to udp/[108.59.2.133]:5060 at 21:35:49.147250:
------------------------------------------------------------------------
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Max-Forwards: 70
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 CANCEL
Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
Content-Length: 0
------------------------------------------------------------------------
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:767 (sofia/external/0011104555592211972) State REPORTING
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:92 sofia/external/0011104555592211972 Standard REPORTING, cause: INCOMPATIBLE_DESTINATION
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:767 (sofia/external/0011104555592211972) State REPORTING going to sleep
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:444 (sofia/external/0011104555592211972) State Change CS_REPORTING -> CS_DESTROY
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1351 Send signal sofia/external/0011104555592211972 [BREAK]
2014-06-09 21:35:49.135201 [DEBUG] switch_core_session.c:1559 Session 11651 (sofia/external/0011104555592211972) Locked, Waiting on external entities
2014-06-09 21:35:49.135201 [DEBUG] switch_ivr_originate.c:3656 Originate Resulted in Error Cause: 88 [INCOMPATIBLE_DESTINATION]
2014-06-09 21:35:49.135201 [NOTICE] switch_core_session.c:1577 Session 11651 (sofia/external/0011104555592211972) Ended
2014-06-09 21:35:49.135201 [NOTICE] switch_core_session.c:1581 Close Channel sofia/external/0011104555592211972 [CS_DESTROY]
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:572 (sofia/external/0011104555592211972) Running State Change CS_DESTROY
2014-06-09 21:35:49.135201 [DEBUG] switch_core_state_machine.c:582 (sofia/external/0011104555592211972) State DESTROY
2014-06-09 21:35:49.135201 [DEBUG] mod_sofia.c:399 sofia/external/0011104555592211972 SOFIA DESTROY
2014-06-09 21:35:49.155267 [DEBUG] switch_core_state_machine.c:99 sofia/external/0011104555592211972 Standard DESTROY
2014-06-09 21:35:49.155267 [DEBUG] switch_core_state_machine.c:582 (sofia/external/0011104555592211972) State DESTROY going to sleep
recv 406 bytes from udp/[108.59.2.133]:5060 at 21:35:49.251931:
------------------------------------------------------------------------
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 54.203.245.50:5080;received=54.203.245.50;rport=5080;branch=z9hG4bKUNeNtZcZp5ZmB
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 CANCEL
Server: OpenSIPS (1.8.2-notls (x86_64/linux))
Content-Length: 0
------------------------------------------------------------------------
recv 386 bytes from udp/[108.59.2.133]:5060 at 21:35:49.426167:
------------------------------------------------------------------------
SIP/2.0 487 Request cancelled
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 INVITE
Server: OpenSIPS (1.7.1-notls (x86_64/linux))
Content-Length: 0
------------------------------------------------------------------------
send 373 bytes to udp/[108.59.2.133]:5060 at 21:35:49.426398:
------------------------------------------------------------------------
Via: SIP/2.0/UDP 54.203.245.50:5080;rport;branch=z9hG4bKUNeNtZcZp5ZmB
Max-Forwards: 70
Call-ID: d7aeb7a1-6ac0-1232-718c-22000ad937f0
CSeq: 60838805 ACK
Content-Length: 0
------------------------------------------------------------------------