I tried the settings for late negotiation without success (before I mailed the list!). I had an action application="answer" statement in my dialplan. This seems to override the whole negotiation process! After I removed that, the negotiation is done properly.Thank you Ahmed for the suggestion, even if it did not really solve the problem.On Wed, Apr 1, 2015 at 11:48 PM, Ahmed Sboor <ahmed@netelsat.net> wrote:Hi Andries ,You should again look on https://wiki.freeswitch.org/wiki/Codec_NegotiationAnd i think easiest way is using absolute_codec_string before briding to "G729" only PABX.AhmedOn Wed, Apr 1, 2015 at 7:51 PM, Andries Venter <apventer@gmail.com> wrote:_________________________________________________________________________I am using Freeswitch (1.4.8) as an SBC between our company PABX and our ISP's Trunk (also terminating on an SBC).
My problem is that I need G729 in some cases and PCMA in others (the majority).
The setup looks more or less like this:
Our PABX (192.168.102.215)=>(192.168.102.102)Our SBC (10.17.159.10)=>(10.17.159.9)ISP SBC=>Rest of the world
Since we use private addresses, Freeswitch must do RTP proxying. No transcoding must be done!!!
I have set global_codec_prefs to "PCMA,G729". Then everything to destination supporting PCMA works. When trying to connect to a G729-only PABX, the call fails. Leg A is setup as follows
192.168.102.215.5060 > 192.168.102.102.5090: SIP, length: 933
INVITE sip:0873611337@192.168.102.102:5090;transport=udp SIP/2.0
To: <sip:0873611337@192.168.102.102;user=phone>
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_iFGEOrlLLf
Call-ID: SEC11-a64a8c0-1e64a8c0-1-9lz36fM4mXAo
CSeq: 1235 INVITE
Contact: <sip:anonymous@192.168.102.215:5060;maddr=192.168.102.215>
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-5nUh73XkOk
Content-Type: application/sdp
Content-Length: 288
X-Siemens-Call-Type: ST-insecure
Accept-Language: en;q=0.0
Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER, INFO
Date: Wed, 01 Apr 2015 14:30:15 GMT
Max-Forwards: 69
v=0
o=MxSIP 0 105140472 IN IP4 10.11.32.226
s=SIP Call
c=IN IP4 10.11.32.226
t=0 0
m=audio 5014 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:101 0-15
192.168.102.102.5090 > 192.168.102.215.5060: SIP, length: 396
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-5nUh73XkOk
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_iFGEOrlLLf
To: <sip:0873611337@192.168.102.102;user=phone>
Call-ID: SEC11-a64a8c0-1e64a8c0-1-9lz36fM4mXAo
CSeq: 1235 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit
Content-Length: 0
192.168.102.102.5090 > 192.168.102.215.5060: SIP, length: 1201
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-5nUh73XkOk
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_iFGEOrlLLf
To: <sip:0873611337@192.168.102.102;user=phone>;tag=BytX6X1t7HytF
Call-ID: SEC11-a64a8c0-1e64a8c0-1-9lz36fM4mXAo
CSeq: 1235 INVITE
Contact: <sip:0873611337@192.168.102.102:5090;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 226
Remote-Party-ID: "0873611337" <sip:0873611337@192.168.102.102>;party=calling;privacy=off;screen=no
v=0
o=FreeSWITCH 1427881297 1427881298 IN IP4 192.168.102.102
s=FreeSWITCH
c=IN IP4 192.168.102.102
t=0 0
m=audio 17318 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
When I change my global_codec_prefs to "G729,PCMA", G729 is offered to our PABX by Freeswitch, then to the ISP and then it works to destinations supporting G729. It fails to destinations not supporting G729. Now Leg A is setup as follows:
192.168.102.215.5060 > 192.168.102.102.5090: SIP, length: 934
INVITE sip:0873611337@192.168.102.102:5090;transport=udp SIP/2.0
To: <sip:0873611337@192.168.102.102;user=phone>
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_8NZMvB3KNA
Call-ID: SEC11-a64a8c0-1e64a8c0-1-k6bGtU73W2Vm
CSeq: 1235 INVITE
Contact: <sip:anonymous@192.168.102.215:5060;maddr=192.168.102.215>
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-ZO003uQGh0
Content-Type: application/sdp
Content-Length: 289
X-Siemens-Call-Type: ST-insecure
Accept-Language: en;q=0.0
Allow: REGISTER, INVITE, ACK, BYE, CANCEL, NOTIFY, REFER, INFO
Date: Wed, 01 Apr 2015 14:27:51 GMT
Max-Forwards: 69
v=0
o=MxSIP 0 1224193414 IN IP4 10.11.32.226
s=SIP Call
c=IN IP4 10.11.32.226
t=0 0
m=audio 5014 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:101 0-15
192.168.102.102.5090 > 192.168.102.215.5060: SIP, length: 396
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-ZO003uQGh0
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_8NZMvB3KNA
To: <sip:0873611337@192.168.102.102;user=phone>
Call-ID: SEC11-a64a8c0-1e64a8c0-1-k6bGtU73W2Vm
CSeq: 1235 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit
Content-Length: 0
192.168.102.102.5090 > 192.168.102.215.5060: SIP, length: 1224
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.102.215:5060;branch=z9hG4bKSEC-a64a8c0-1e64a8c0-1-ZO003uQGh0
From: "JGD Winson" <sip:anonymous@anonymous.invalid>;tag=snl_8NZMvB3KNA
To: <sip:0873611337@192.168.102.102;user=phone>;tag=g2eKXDUB6y4Hr
Call-ID: SEC11-a64a8c0-1e64a8c0-1-k6bGtU73W2Vm
CSeq: 1235 INVITE
Contact: <sip:0873611337@192.168.102.102:5090;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.4.18+git~20150312T185523Z~4eed221b69~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 249
Remote-Party-ID: "0873611337" <sip:0873611337@192.168.102.102>;party=calling;privacy=off;screen=no
v=0
o=FreeSWITCH 1427866745 1427866746 IN IP4 192.168.102.102
s=FreeSWITCH
c=IN IP4 192.168.102.102
t=0 0
m=audio 31726 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
I have tried various (hopefully all) combinations of inbound-codec-negotiation (generous, greedy and scrooge) and inbound-late-negotiation (true, false). Nothing does what I want.
I believe Freeswitch needs to negotiate the codecs with the endpoint and choose one from my list. However, it seems to grab the first one in my list before checking the endpoint. Then it offers only that codec to the endpoint, which of course ignores / rejects it!
What can I do?
Regards
Andries
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org