4

我正在使用 FreeSWITCH 服务器并与 twilio SIP turnk 集成。我正在使用 android imsdroid 应用程序进行 sip 调用。imsdroid 到 imsdroid 的调用正在发生。imsdroid 到 PSTN 没有(即手机号码)呼叫不起作用。网关超时错误显示在 imsdroid 中。INVITE 被发送到 FreeSWITCH 并且 freeswitch 服务器正在将呼叫路由到 Twilio。但没有收到任何回应。可能是什么问题。

IP 是允许的。从 SIPML5 客户端到 PSTN 呼叫正在工作。下面是来自 FreeSWITCH 的邀请

INVITE sip:+919986790176@nowconf.pstn.twilio.com SIP/2.0
Via: SIP/2.0/UDP 220.227.38.107:5080;rport;branch=z9hG4bK5yt865UUKDF4H
Max-Forwards: 69
From: "+919845217138" <sip:FreeSWITCH@nowconf.pstn.twilio.com>;tag=eFNKtBae4HN1r
To: <sip:+919986790176@nowconf.pstn.twilio.com>
Call-ID: 06f7df5f-1f81-1235-67b0-2e81eca04f81
CSeq: 98923179 INVITE
Contact: <sip:gw+Twilio-outbound@220.227.38.107:5080;transport=udp;gw=Twilio-outbound>
User-Agent: FreeSWITCH-mod_sofia/1.6.10+git~20160824T215404Z~726448d962~64bit
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: 248
P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel
P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000
X-FS-Support: update_display,send_info
Remote-Party-ID: "+919845217138" <sip:+919845217138@nowconf.pstn.twilio.com>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1478495490 1478495491 IN IP4 220.227.38.107
s=FreeSWITCH
c=IN IP4 220.227.38.107
t=0 0
m=audio 22996 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

SIPML5 邀请

INVITE sip:+919742164769@nowconf.pstn.twilio.com SIP/2.0
Via: SIP/2.0/UDP 220.227.38.107:5080;rport;branch=z9hG4bKD5jv3tcpNtFDS
Max-Forwards: 69
From: "+919845217138" <sip:FreeSWITCH@nowconf.pstn.twilio.com>;tag=cvS8XKDp62Z5e
To: <sip:+919742164769@nowconf.pstn.twilio.com>
Call-ID: 69171aa5-1d0d-1235-67b0-2e81eca04f81
CSeq: 98788399 INVITE
Contact: <sip:gw+Twilio-outbound@220.227.38.107:5080;transport=udp;gw=Twilio-outbound>
User-Agent: FreeSWITCH-mod_sofia/1.6.10+git~20160824T215404Z~726448d962~64bit
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: 488
X-FS-Support: update_display,send_info
Remote-Party-ID: "+919845217138" <sip:+919845217138@nowconf.pstn.twilio.com>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1478224523 1478224524 IN IP4 220.227.38.107
s=FreeSWITCH
c=IN IP4 220.227.38.107
t=0 0
m=audio 24404 RTP/AVP 102 9 0 8 103 101
a=rtpmap:102 opus/48000/2
a=fmtp:102 useinbandfec=0; cbr=1; maxaveragebitrate=30000; maxplaybackrate=48000; ptime=20; minptime=10; maxptime=40; stereo=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:103 telephone-event/48000
a=fmtp:103 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
ACK sip:172.18.22.113:5060 SIP/2.0
Via: SIP/2.0/UDP 220.227.38.107:5080;rport;branch=z9hG4bKeecN5NXSj35Zm
Route: <sip:54.172.60.3:5060;lr;ftag=cvS8XKDp62Z5e>
Max-Forwards: 70
From: "+919845217138" <sip:FreeSWITCH@nowconf.pstn.twilio.com>;tag=cvS8XKDp62Z5e
To: <sip:+919742164769@nowconf.pstn.twilio.com>;tag=70832428_6772d868_27e46324-e125-4895-a6ff-98031cdb43fc
Call-ID: 69171aa5-1d0d-1235-67b0-2e81eca04f81
CSeq: 98788399 ACK
Contact: <sip:gw+Twilio-outbound@220.227.38.107:5080;transport=udp;gw=Twilio-outbound>
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 54.172.60.3:5060;branch=z9hG4bK763a.52f422d4.0
Via: SIP/2.0/UDP 172.18.22.113:5060;rport=5060;received=54.172.61.235;branch=z9hG4bK27e46324-e125-4895-a6ff-98031cdb43fc_6772d868_294770755291215
From: <sip:+919742164769@nowconf.pstn.twilio.com>;tag=70832428_6772d868_27e46324-e125-4895-a6ff-98031cdb43fc
To: "+919845217138" <sip:FreeSWITCH@nowconf.pstn.twilio.com>;tag=cvS8XKDp62Z5e
Call-ID: 69171aa5-1d0d-1235-67b0-2e81eca04f81
CSeq: 1 BYE
User-Agent: FreeSWITCH-mod_sofia/1.6.10+git~20160824T215404Z~726448d962~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Content-Length: 0
4

1 回答 1

2

请在发送到 Twilio 之前删除这两个标头:

P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mmtel 

P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000

为此,您必须在向 Twilio sip 网关发送呼叫之前编写这两行:

<action application="unset" data="sip_h_P-Preferred-Service"/> 

<action application="unset" data="sip_h_P-Access-Network-Info"/>
于 2016-11-08T11:48:11.507 回答