[Freeswitch-users] Route to the profile and not the gateway

Anto potxoka at gmail.com
Tue Mar 6 01:43:12 MSK 2012


Hi

Is solved, if someone else happens, look if you have commented
erroneously dptools module. Thanks !

Best regards
Anto

2012/3/1 Anto <potxoka at gmail.com>:
> Hello,
>
> Setting up profiles and the other options, I can not make outgoing
> calls. With the standard configuration and adding the extension in the
> public folder, it worked specifying the gateway. Now removing it from
> that folder and setting the context "internal" (in addition to setting
> a context for provider), I can not make outgoing calls. I have
> reviewed documentation, the configuration and have tried various forms
> of make the bridge, but I can not make the call. Does anyone can guide
> me that could look at? Thank you very much.
>
> Best regards
> Anto
>
> sbc# cat outbound.xml
> <include>
> <context name="internal">
>    <extension name="provider1">
>      <condition field="network_addr" expression="^192.168.20.40$" />
>      <condition field="destination_number" expression="^(\d+)$">
>        <!--action application="bridge"
> data="{sip_cid_type=pid,ignore_display_updates=true}sofia/gateway/server-1/$1"/-->
>        <action application="bridge"
> data="{sip_cid_type=pid,ignore_display_updates=true}sofia/gateway/provider1::server-1/$1"/>
>        <!--action application="bridge"
> data="{sip_cid_type=pid,ignore_display_updates=true}sofia/provider1/$1"/-->
>      </condition>
>    </extension>
> </context>
> </include>
>
> freeswitch at sbc > sofia status
>
>                     Name          Type
>  Data   State
> =================================================================================================
>                   internal        profile
> sip:mod_sofia at 192.168.20.5:5060 RUNNING (0)
>    internal::server-1     gateway
> sip:user at 192.168.20.40  NOREG
>                provider1    profile
> sip:mod_sofia at EXTERNAL_IP:5060  RUNNING (0)
>  provider1::server-1       gateway
> sip:user at DOMAIN REGED
> =================================================================================================
> 2 profiles 0 aliases
>
>
> freeswitch at sbc >
> 2012-03-01 17:56:32.401204 [NOTICE] switch_channel.c:915 New Channel
> sofia/internal/anto at 192.168.20.40
> [3f191be1-c763-e111-bc8d-f46d041ca78e]
> 2012-03-01 17:56:32.401204 [DEBUG] sofia.c:5283 Channel
> sofia/internal/anto at 192.168.20.40 entering state [received][100]
> 2012-03-01 17:56:32.401204 [DEBUG] sofia.c:5294 Remote SDP:
> v=0
> o=anto 0 0 IN IP4 192.168.20.40
> s=-
> c=IN IP4 192.168.20.40
> t=0 0
> m=audio 59700 RTP/AVP 9 96 97 98 100 0 8 102 3 103 5 6 101
> a=rtpmap:9 G722/8000
> a=rtpmap:96 SILK/24000
> a=rtpmap:97 SILK/16000
> a=rtpmap:98 speex/32000
> a=rtpmap:100 speex/16000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:102 iLBC/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:103 speex/8000
> a=rtpmap:5 DVI4/8000
> a=rtpmap:6 DVI4/16000
> a=rtpmap:101 telephone-event/8000
> a=extmap:1 urn:ietf:params:rtp-hdrext:csrc-audio-level
> a=zrtp-hash:1.10
> 366f09eb8571b63fc76ad7df2417b1b145774d1076a99042721e6f5f3f3401ca
> m=video 60184 RTP/AVP 104 99
> a=rtpmap:104 H264/90000
> a=fmtp:104 profile-level-id=4DE01f;packetization-mode=1
> a=rtpmap:99 H264/90000
> a=fmtp:99 profile-level-id=4DE01f
> a=recvonly
> a=imageattr:104 send * recv [x=[0-1920],y=[0-1200]]
> a=imageattr:99 send * recv [x=[0-1920],y=[0-1200]]
> a=zrtp-hash:1.10
> 23f81f1a335dc819be01e9a794cb8e7a509019066dac01b8fbd89038aec44edb
>
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_NEW
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:380
> (sofia/internal/anto at 192.168.20.40) State NEW
> 2012-03-01 17:56:32.401204 [DEBUG] sofia.c:5480
> (sofia/internal/anto at 192.168.20.40) State Change CS_NEW -> CS_INIT
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_INIT
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:401
> (sofia/internal/anto at 192.168.20.40) State INIT
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:85
> sofia/internal/anto at 192.168.20.40 SOFIA INIT
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:125
> (sofia/internal/anto at 192.168.20.40) State Change CS_INIT -> CS_ROUTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:401
> (sofia/internal/anto at 192.168.20.40) State INIT going to sleep
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_ROUTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_channel.c:1844
> (sofia/internal/anto at 192.168.20.40) Callstate Change DOWN -> RINGING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:410
> (sofia/internal/anto at 192.168.20.40) State ROUTING
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:148
> sofia/internal/anto at 192.168.20.40 SOFIA ROUTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:104
> sofia/internal/anto at 192.168.20.40 Standard ROUTING
> 2012-03-01 17:56:32.401204 [INFO] mod_dialplan_xml.c:336 Processing
> +57xxxxxxxxx <+57xxxxxxxxx>->57xxxxxxxxx in context internal
> Dialplan: sofia/internal/anto at 192.168.20.40 parsing
> [internal->provider1] continue=false
> Dialplan: sofia/internal/anto at 192.168.20.40 Regex (PASS) [provider1]
> network_addr(192.168.20.40) =~ /^192.168.20.40$/ break=on-false
> Dialplan: sofia/internal/anto at 192.168.20.40 Regex (PASS) [provider1]
> destination_number(57xxxxxxxxx) =~ /^(\d+)$/ break=on-false
> Dialplan: sofia/internal/anto at 192.168.20.40 Action
> bridge({sip_cid_type=pid,ignore_display_updates=true}sofia/gateway/provider1::server-1/57xxxxxxxxx)
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:154
> (sofia/internal/anto at 192.168.20.40) State Change CS_ROUTING ->
> CS_EXECUTE
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:410
> (sofia/internal/anto at 192.168.20.40) State ROUTING going to sleep
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_EXECUTE
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:417
> (sofia/internal/anto at 192.168.20.40) State EXECUTE
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:241
> sofia/internal/anto at 192.168.20.40 SOFIA EXECUTE
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:192
> sofia/internal/anto at 192.168.20.40 Standard EXECUTE
> 2012-03-01 17:56:32.401204 [ERR] switch_core_session.c:2096 Invalid
> Application bridge
> 2012-03-01 17:56:32.401204 [DEBUG] switch_channel.c:2804
> (sofia/internal/anto at 192.168.20.40) Callstate Change RINGING -> HANGUP
> 2012-03-01 17:56:32.401204 [NOTICE] switch_core_session.c:2097 Hangup
> sofia/internal/anto at 192.168.20.40 [CS_EXECUTE]
> [DESTINATION_OUT_OF_ORDER]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_channel.c:2820 Send signal
> sofia/internal/anto at 192.168.20.40 [KILL]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:417
> (sofia/internal/anto at 192.168.20.40) State EXECUTE going to sleep
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_HANGUP
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:602
> (sofia/internal/anto at 192.168.20.40) State HANGUP
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:465 Channel
> sofia/internal/anto at 192.168.20.40 hanging up, cause:
> DESTINATION_OUT_OF_ORDER
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:530 Responding to
> INVITE with: 502
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:47
> sofia/internal/anto at 192.168.20.40 Standard HANGUP, cause:
> DESTINATION_OUT_OF_ORDER
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:602
> (sofia/internal/anto at 192.168.20.40) State HANGUP going to sleep
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:393
> (sofia/internal/anto at 192.168.20.40) State Change CS_HANGUP ->
> CS_REPORTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:362
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_REPORTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:662
> (sofia/internal/anto at 192.168.20.40) State REPORTING
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:79
> sofia/internal/anto at 192.168.20.40 Standard REPORTING, cause:
> DESTINATION_OUT_OF_ORDER
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:662
> (sofia/internal/anto at 192.168.20.40) State REPORTING going to sleep
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:387
> (sofia/internal/anto at 192.168.20.40) State Change CS_REPORTING ->
> CS_DESTROY
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1177 Send
> signal sofia/internal/anto at 192.168.20.40 [BREAK]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_session.c:1377 Session
> 2 (sofia/internal/anto at 192.168.20.40) Locked, Waiting on external
> entities
> 2012-03-01 17:56:32.401204 [NOTICE] switch_core_session.c:1395 Session
> 2 (sofia/internal/anto at 192.168.20.40) Ended
> 2012-03-01 17:56:32.401204 [NOTICE] switch_core_session.c:1397 Close
> Channel sofia/internal/anto at 192.168.20.40 [CS_DESTROY]
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:491
> (sofia/internal/anto at 192.168.20.40) Callstate Change HANGUP -> DOWN
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:494
> (sofia/internal/anto at 192.168.20.40) Running State Change CS_DESTROY
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:504
> (sofia/internal/anto at 192.168.20.40) State DESTROY
> 2012-03-01 17:56:32.401204 [DEBUG] mod_sofia.c:370
> sofia/internal/anto at 192.168.20.40 SOFIA DESTROY
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:86
> sofia/internal/anto at 192.168.20.40 Standard DESTROY
> 2012-03-01 17:56:32.401204 [DEBUG] switch_core_state_machine.c:504
> (sofia/internal/anto at 192.168.20.40) State DESTROY going to sleep
>
> 2012/3/1 Anto <potxoka at gmail.com>:
>> Hello
>>
>> Once I download the XML from the server and see it with an editor, I
>> have resolved many questions of how FreeSWITCH, but even I have
>> several questions I have not found information (I spend all day
>> reading the wiki).
>>
>> I am setting up multiple providers and use a format like this (do not
>> know if it is the best):
>>
>> <profile name="provider1">
>>  <gateways>
>>       <X-PRE-PROCESS cmd="include" data="provider1/*.xml"/>
>>  </gateways>
>> .........
>>
>> Is there any way to set the extension when not having to configure all
>> the gateway? (only use the profile). Sample dialplan:
>>
>> <action application="set"
>> data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
>>        <action application="bridge" data="sofia/gateway/provider1-1/$1"/>
>>        <action application="bridge" data="sofia/gateway/provider1-2/$1"/>
>>        <action application="bridge" data="sofia/gateway/provider1-3/$1"/>
>> ...........
>> <action application="bridge" data="sofia/PROFILE/$1"/> ????
>>
>> When set incoming calls, not very well how, not whether to route
>> directly to dialplan or create a profile for this. I have to be routed
>> to multiple internal servers (load balancer, failover, etc), so the
>> above scenario I could serve to cover this. Thanks !!
>>
>> Best regards
>> Anto



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