[Freeswitch-users] Sofia late-negotiation on re-INVITE (codec-modification)

Phil Quesinberry philq at qsystemsengineering.com
Sun Nov 27 21:10:01 MSK 2011


I think I might be experiencing a similar problem here...

A friend of mine dialed into one of my conference rooms with only the GSM
codec enabled on his mobile SIP client (Linphone).  Despite the fact that I
offered GSM as one of the codecs, FS only appeared to offer G711u and the
call failed.  When he set G711u as an option on his end, he was able to
connect.  Late negotiation is enabled.

Some relevant settings:
internal.xml:
    <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
    <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>
    <param name="inbound-codec-negotiation" value="greedy"/>

vars.xml:
<X-PRE-PROCESS cmd="set"
data="inbound_codec_prefs=PCMU at 20i,PCMU,PCMA,GSM,ILBC"/>
<X-PRE-PROCESS cmd="set"
data="global_codec_prefs=PCMU at 20i,PCMU,PCMA,GSM,ILBC"/>
<X-PRE-PROCESS cmd="set"
data="outbound_codec_prefs=PCMU at 20i,PCMU,PCMA,GSM,ILBC"/>

SIP transaction info follows:

   ------------------------------------------------------------------------
recv 765 bytes from udp/[68.47.xx.xx]:5060 at 06:59:23.381436:
   ------------------------------------------------------------------------
   INVITE sip:3030 at myswitch.org:5080 SIP/2.0
   Via: SIP/2.0/UDP 10.0.1.15:5060;rport;branch=z9hG4bK1252688933
   From: "resist0r" <sip:resist0r at 68.47.xx.xx>;tag=539248952
   To: <sip:3030 at myswitch.org:5080>
   Call-ID: 1476867094
   CSeq: 20 INVITE
   Contact: <sip:resist0r at 68.47.xx.xx>
   Content-Type: application/sdp
   Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
   Max-Forwards: 70
   User-Agent: Linphone/3.4.3 (eXosip2/3.1.0)
   Subject: Phone call
   Expires: 120
   Content-Length:   234
 
   v=0
   o=resist0r 1856 1856 IN IP4 68.47.xx.xx
   s=Talk
   c=IN IP4 68.47.xx.xx
   t=0 0
   m=audio 9003 RTP/AVP 0 0 3 101
   a=rtpmap:0 GSM/22050
   a=rtpmap:0 GSM/11025
   a=rtpmap:3 GSM/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-11
   ------------------------------------------------------------------------
send 354 bytes to udp/[68.47.xx.xx]:5060 at 06:59:23.381660:
   ------------------------------------------------------------------------
   SIP/2.0 100 Trying
   Via: SIP/2.0/UDP
10.0.1.15:5060;rport=5060;branch=z9hG4bK1252688933;received=68.47.xx.xx
   From: "resist0r" <sip:resist0r at 68.47.xx.xx>;tag=539248952
   To: <sip:3030 at myswitch.org:5080>
   Call-ID: 1476867094
   CSeq: 20 INVITE
   User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-f2cf68b 2011-11-20 18-40-41
-0500
   Content-Length: 0
 
   ------------------------------------------------------------------------
2011-11-25 01:59:23.365421 [NOTICE] switch_channel.c:920 New Channel
sofia/external/resist0r at 68.47.xx.xx [b9d2afd7-e0ba-4168-acee-29ccd2dc4791]
2011-11-25 01:59:23.365421 [DEBUG] sofia.c:5356 Channel
sofia/external/resist0r at 68.47.xx.xx entering state [received][100]
2011-11-25 01:59:23.365421 [DEBUG] sofia.c:5367 Remote SDP:
v=0
o=resist0r 1856 1856 IN IP4 68.47.xx.xx
s=Talk
c=IN IP4 68.47.xx.xx
t=0 0
m=audio 9003 RTP/AVP 0 0 3 101
a=rtpmap:0 GSM/11025
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11
 
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[GSM:0:11025:20:64000]/[PCMU:0:8000:20:64000]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[GSM:0:11025:20:64000]/[PCMU:0:8000:20:64000]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[GSM:0:11025:20:64000]/[PCMA:8:8000:20:64000]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[GSM:0:11025:20:64000]/[GSM:3:8000:20:13200]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[GSM:0:11025:20:64000]/[iLBC:97:8000:30:13330]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:4755 Audio Codec Compare
[PCMU:0:8000:20:64000]/[PCMU:0:8000:20:64000]
2011-11-25 01:59:23.365421 [DEBUG] sofia_glue.c:2869 Set Codec
sofia/external/resist0r at 68.47.xx.xx PCMU/8000 20 ms 160 samples 64000 bits
 

Phil Quesinberry
Q Systems Engineering, Inc.
Electronic Controls and Embedded Systems Development
(410) 969-8002
http://www.qsystemsengineering.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111127/7150e722/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list