Дано - Centos 6.4, x64. FS 1.2.9 из официального репозитория.
Сделал 3 GW, каждый в своем файле
Код: Выделить всё
<include>
<gateway name="mf923XXXXXXX">
<param name="username" value="7923XXXXXXX"/>
<param name="from-user" value="7923XXXXXXX"/>
<param name="realm" value="multifon.ru"/>
<param name="password" value="XXXXXX"/>
<param name="from-domain" value="multifon.ru"/>
<param name="proxy" value="sbc.megafon.ru"/>
<param name="outbound-proxy" value="sbc.megafon.ru"/>
<param name="expire-seconds" value="60"/>
<param name="register" value="true"/>
<param name="register-transport" value="tcp"/>
<param name="contact-params" value="tport=tcp"/>
<param name="ping" value="25"/>
</gateway>
</include>
<include>
<gateway name="aaaaaa-274XXXX">
<param name="username" value="USEER"/>
<param name="from-user" value="USEER"/>
<param name="password" value="xxxxxxxxx"/>
<param name="proxy" value="xx.xx.xx.xx"/>
<param name="register-proxy" value="xx.xx.xx.xx"/>
<param name="expire-seconds" value="60"/>
<param name="register" value="true"/>
<param name="register-transport" value="udp"/>
<param name="retry-seconds" value="30"/>
<param name="ping" value="25"/>
</gateway>
</include>
<include>
<gateway name="zzzzzz">
<param name="proxy" value="zz.zz.zz.zz"/>
<param name="realm" value="zz.zz.zz.zz"/>
<param name="register" value="false"/>
<param name="username" value="not-used"/>
<param name="password" value="not-used"/>
<param name="auth-calls" value="false"/>
</gateway>
</include>
Код: Выделить всё
<include>
<extension name="local.example.com">
<condition field="${toll_allow}" expression="local"/>
<condition field="destination_number" expression="(^2{0,1}\d{6}$)">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/aaaaaa-274XXXX/$1"/>
</condition>
</extension>
<extension name="domestic.example.com">
<condition field="${toll_allow}" expression="domestic"/>
<condition field="destination_number" expression="(^861{0,1}\d{10}$)">
<action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
<action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
<action application="bridge" data="sofia/gateway/zzzzzz/$1"/>
</condition>
</extension>
<extension name="out_multifon">
<condition field="destination_number" expression="^(([7,8])(92\d{8}))$">
<action application="set" data="effective_caller_id_number=7923XXXXXXX"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="bride_early_media=true"/>
<action application="set" data="ringback=${ru-ring}"/>
<action application="set" data="instant_ringback=true"/>
<action application="bridge" data="sofia/gateway/mf923XXXXXXX/7$3@multifon.ru"/>
<action application="answer"/>
</condition>
</extension>
</include>
Код: Выделить всё
2013-06-05 21:50:44.201489 [NOTICE] switch_channel.c:978 New Channel sofia/internal/1001@172.17.0.1 [eaee467e-cde6-11e2-b545-6f5b1b737f35]
2013-06-05 21:50:44.841471 [INFO] mod_dialplan_xml.c:557 Processing 1001 <1001>->86186XXXXXXXX in context default
2013-06-05 21:50:44.841471 [NOTICE] switch_channel.c:978 New Channel sofia/external/86186XXXXXXXX [eb4e8318-cde6-11e2-b552-6f5b1b737f35]
send 1135 bytes to tcp/[193.201.229.35]:5060 at 13:50:44.851501:
------------------------------------------------------------------------
INVITE sip:86186XXXXXXXX@zz.zz.zz.zz SIP/2.0
Via: SIP/2.0/TCP CCC.CCC.CCC.CCC:5080;rport;branch=z9hG4bKvKgXy3U5UgtUH
Route: <sip:gw+mf923XXXXXXX@193.201.229.35:5060;transport=tcp;lr>;tport=tcp;gw=mf923XXXXXXX
Max-Forwards: 69
From: "FreeSWITCH" <sip:not-used@zz.zz.zz.zz>;tag=FXS0aSBgr1H8r
To: <sip:86186XXXXXXXX@zz.zz.zz.zz>
Call-ID: c2acf9c2-4889-1231-09a6-000c29c88038
CSeq: 44884058 INVITE
Contact: <sip:gw+zzzzzz@CCC.CCC.CCC.CCC:5080;transport=udp;gw=zzzzzz>
User-Agent: FreeSWITCH-mod_sofia/1.2.9
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 212
X-FS-Support: update_display,send_info
Remote-Party-ID: "FreeSWITCH" <sip:0000000000@zz.zz.zz.zz>;party=calling;screen=yes;privacy=off
v=0
o=FreeSWITCH 1370410656 1370410657 IN IP4 CCC.CCC.CCC.CCC
s=FreeSWITCH
c=IN IP4 CCC.CCC.CCC.CCC
t=0 0
m=audio 29588 RTP/AVP 18 8 9 0 101 13
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
------------------------------------------------------------------------
recv 315 bytes from tcp/[193.201.229.35]:5060 at 13:50:44.970989:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/TCP CCC.CCC.CCC.CCC:5080;received=CCC.CCC.CCC.CCC;branch=z9hG4bKvKgXy3U5UgtUH;rport=49419
From: "FreeSWITCH" <sip:not-used@multifon.ru>;tag=FXS0aSBgr1H8r
To: <sip:86186XXXXXXX@multifon.ru>
Call-ID: c2acf9c2-4889-1231-09a6-000c29c88038
CSeq: 44884058 INVITE
Content-Length: 0
------------------------------------------------------------------------
recv 346 bytes from tcp/[193.201.229.35]:5060 at 13:50:45.089942:
------------------------------------------------------------------------
SIP/2.0 403 Forbidden
Via: SIP/2.0/TCP CCC.CCC.CCC.CCC:5080;received=CCC.CCC.CCC.CCC;branch=z9hG4bKvKgXy3U5UgtUH;rport=49419
From: "FreeSWITCH" <sip:not-used@multifon.ru>;tag=FXS0aSBgr1H8r
To: <sip:86186XXXXXXX@multifon.ru>;tag=aprqngfrt-97inh2b0c5ol5
Call-ID: c2acf9c2-4889-1231-09a6-000c29c88038
CSeq: 44884058 INVITE
Content-Length: 0
Причем, если я убираю все гейты с регистрацией - звонок идет правильно. Оставляю хоть один с регистрацией - все валится на него.
Что делать как быть?