K
K
Kirill Petrov2017-04-07 11:56:20
Telephony
Kirill Petrov, 2017-04-07 11:56:20

How to make friends with the originate+transfer method in freeswitch configured via fusionpbx?

I want to make a callback, as in this article: https://habrahabr.ru/sandbox/98509/
How to configure transfer to access Diaplan-> Outbound Routes? Now, with an http request, I don’t understand what rules the call is processed by... Log example:

2017-04-07 11:51:45.053465 [NOTICE] sofia.c:8023 Channel [sofia/internal/1002@188.162.166.74:30325] has been answered
2017-04-07 11:51:45.053465 [DEBUG] switch_channel.c:3770 (sofia/internal/1002@188.162.166.74:30325) Callstate Change RINGING -> ACTIVE
2017-04-07 11:51:45.053465 [DEBUG] switch_ivr_originate.c:3686 Originate Resulted in Success: [sofia/internal/1002@188.162.166.74:30325]
2017-04-07 11:51:45.053465 [DEBUG] switch_ivr_originate.c:3686 Originate Resulted in Success: [sofia/internal/1002@188.162.166.74:30325]
2017-04-07 11:51:45.053465 [INFO] switch_channel.c:3127 sofia/internal/1002@188.162.166.74:30325 Flipping CID from "call 89996993942" <1002> to "Outbound Call" <1002>
2017-04-07 11:51:45.053465 [DEBUG] mod_commands.c:4788 (sofia/internal/1002@188.162.166.74:30325) State Change CS_CONSUME_MEDIA -> CS_EXECUTE
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/1002@188.162.166.74:30325) Running State Change CS_EXECUTE
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/1002@188.162.166.74:30325) State EXECUTE
2017-04-07 11:51:45.053465 [DEBUG] mod_sofia.c:198 sofia/internal/1002@188.162.166.74:30325 SOFIA EXECUTE
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:328 sofia/internal/1002@188.162.166.74:30325 Standard EXECUTE
EXECUTE sofia/internal/1002@188.162.166.74:30325 transfer(89996993942)
2017-04-07 11:51:45.053465 [DEBUG] switch_ivr.c:2160 (sofia/internal/1002@188.162.166.74:30325) State Change CS_EXECUTE -> CS_ROUTING
2017-04-07 11:51:45.053465 [NOTICE] switch_ivr.c:2167 Transfer sofia/internal/1002@188.162.166.74:30325 to XML[89996993942@default]
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/1002@188.162.166.74:30325) State EXECUTE going to sleep
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/1002@188.162.166.74:30325) Running State Change CS_ROUTING
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:643 (sofia/internal/1002@188.162.166.74:30325) State ROUTING
2017-04-07 11:51:45.053465 [DEBUG] mod_sofia.c:143 sofia/internal/1002@188.162.166.74:30325 SOFIA ROUTING
2017-04-07 11:51:45.053465 [DEBUG] switch_core_state_machine.c:236 sofia/internal/1002@188.162.166.74:30325 Standard ROUTING
2017-04-07 11:51:45.053465 [INFO] mod_dialplan_xml.c:637 Processing Outbound Call <1002>->89996993942 in context default
Dialplan: sofia/internal/1002@188.162.166.74:30325 parsing [default->intercept-ext-polycom] continue=false
Dialplan: sofia/internal/1002@188.162.166.74:30325 Regex (FAIL) [intercept-ext-polycom] destination_number(89996993942) =~ /^\*97(\d+)$/ break=on-false
Dialplan: sofia/internal/1002@188.162.166.74:30325 parsing [default->call forward all] continue=false
Dialplan: sofia/internal/1002@188.162.166.74:30325 Regex (FAIL) [call forward all] ${user_exist}() =~ /^true/ break=on-false
Dialplan: sofia/internal/1002@188.162.166.74:30325 parsing [default->talking clock date and time] continue=true
Dialplan: sofia/internal/1002@188.162.166.74:30325 Regex (FAIL) [talking clock date and time] destination_number(89996993942) =~ /^\*9172$/ break=on-false
Dialplan: sofia/internal/1002@188.162.166.74:30325 parsing [default->talking clock time] continue=true
Dialplan: sofia/internal/1002@188.162.166.74:30325 Regex (FAIL) [talking clock time] destination_number(89996993942) =~ /^\*9170$/ break=on-false
Dialplan: sofia/internal/1002@188.162.166.74:30325 parsing [default->talking clock date] continue=true
Dialplan: sofia/internal/1002@188.162.166.74:30325 Regex (FAIL) [talking clock date] destination_number(89996993942) =~ /^\*9171$/ break=on-false
2017-04-07 11:51:45.053465 [INFO] switch_core_state_machine.c:311 No Route, Aborting
2017-04-07 11:51:45.053465 [NOTICE] switch_core_state_machine.c:312 Hangup sofia/internal/1002@188.162.166.74:30325 [CS_ROUTING] [NO_ROUTE_DESTINATION]

There is no route, the call is disconnected. What is the right way to tell the originate or transfer command so that destination_number 89996993942 is processed correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
devloh, 2017-04-11
@devloh

I did everything as in that article and it immediately worked for me as it should.
Perhaps you need to make sure that the dialplan has a route for your number 89996993942.
And the dialplan only allows calls to numbers that have 917 in them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question