[Freeswitch-users] Dialplan not executed when INVITE has no SDP (3pcc)

Dave Horton daveh at beachdognet.com
Tue Dec 13 18:21:58 MSK 2016


From looking at the code, it does not seem that 3pcc-proxy mode (enable-3pcc=“proxy”) is intended to generate a local SDP.

I am not completely sure what 3pcc-proxy mode is, but in my scenario I need a local endpoint/channel that I can manipulate.

Perhaps my original question about why the dialplan is not hit when enable-3pcc=“true” is set is a better question (?)

In general, I would appreciate clarification on which 3pcc scenarios (if any) freeswitch supports.

I am currently testing on FreeSWITCH version: 1.6.13+git~20161129T154639Z~e755b430da~64bit (git e755b43 2016-11-29 15:46:39Z 64bit)

which is fairly recent, but would be happy to test on the head or any other branch if directed finally.

Finally, is this a bug I should be entering in JIRA?

On Dec 13, 2016, at 9:33 AM, Dave Horton <daveh at beachdognet.com> wrote:

I turned up logging in sofia and got a better trace.

full pastebin at http://pastebin.com/dQdJk8HS <http://pastebin.com/dQdJk8HS>

It seems like there is an error in generating the offer (relevant log snippets below):

EXECUTE sofia/drachtio_mrf/nobody at 5070 socket(159.223.113.146:50847 async full)

2016-12-13 14:28:14.932540 [NOTICE] mod_event_socket.c:432 Trying host: 159.223.113.146:50847

nta.c:1296 agent_timer() nta: timer set next to 4892 ms

2016-12-13 14:28:14.992532 [DEBUG] switch_ivr.c:623 sofia/drachtio_mrf/nobody at 5070 Command Execute answer()

EXECUTE sofia/drachtio_mrf/nobody at 5070 answer()

nua.c:879 nua_respond() nua: nua_respond: entering
nua_stack.c:573 nua_stack_signal() nua(0x7f157804a690): recv signal r_respond 200 OK
nua_params.c:480 nua_stack_set_params() nua: nua_stack_set_params: entering
soa.c:403 soa_set_params() soa_set_params(static::0x7f1578047de0, ...) called
nua_session.c:2320 nua_invite_server_respond() nua: nua_invite_server_respond: entering
soa.c:1426 soa_generate_offer() soa_generate_offer(static::0x7f1578047de0, 0) called
soa.c:768 soa_error_as_sip_response() soa_error_as_sip_response(static::0x7f1578047de0, ...) called
tport.c:3257 tport_tsend() tport_tsend(0x7f1578004640) tpn = UDP/159.223.113.146:5070
tport.c:4046 tport_resolve() tport_resolve addrinfo = 159.223.113.146:5070
tport.c:4680 tport_by_addrinfo() tport_by_addrinfo(0x7f1578004640): not found by name UDP/159.223.113.146:5070
nua_stack.c:529 nua_signal() nua(0x7f157804a690): sent signal r_respond
2016-12-13 14:28:14.992532 [DEBUG] mod_sofia.c:762 3PCC-PROXY, Sent a 200 OK, waiting for ACK
tport.c:3594 tport_vsend() tport_vsend(0x7f1578004640): 576 bytes of 576 to udp/159.223.113.146:5070
tport.c:3492 tport_send_msg() tport_vsend returned 576

send 576 bytes to udp/[159.223.113.146]:5070 at 14:28:15.006856:
   ------------------------------------------------------------------------
   SIP/2.0 500 No session set by user



On Dec 13, 2016, at 9:04 AM, Dave Horton <daveh at beachdognet.com <mailto:daveh at beachdognet.com>> wrote:

I tried that and while it did hit the dialplan, freeswitch sends a “500 No session set by user” instead of the 200 OK offering an SDP.

Here is the scenario:
- I send an INVITE without SDP to Freeswitch
- the dialplan matches an extension based on headers I have set
- the extension initiates an outbound socket connection to my application
- my application issues the ‘answer’ command
- freeswitch logs the following:

8c2094e3-5298-44af-a759-a11932583e4c 2016-12-13 13:48:25.082197 [DEBUG] switch_ivr.c:623 sofia/drachtio_mrf/nobody at 5070 Command Execute answer()
8c2094e3-5298-44af-a759-a11932583e4c EXECUTE sofia/drachtio_mrf/nobody at 5070 answer()
8c2094e3-5298-44af-a759-a11932583e4c 2016-12-13 13:48:25.082197 [DEBUG] mod_sofia.c:762 3PCC-PROXY, Sent a 200 OK, waiting for ACK

- but then sends a 500 (and no 200 OK was ever sent).

full pastebin at http://pastebin.com/bhFi3zY2 <http://pastebin.com/bhFi3zY2>

Any ideas?

And for background, here is what I am trying to achieve:

- send an INVITE without SDP, get freeswitch to offer an SDP with all codecs
- establish an outbound socket to control that channel
- send an ACK with a blackhole SDP (per https://tools.ietf.org/search/rfc3725 <https://tools.ietf.org/search/rfc3725>)
- later re-INVITE to a far end SDP
- bridge this channel to another one (via event socket, uuid_bridge command)

If there is a specific flavor of 3pcc that freeswitch supports (e.g. the RFC above describes 4 different possibilities), I could adjust my code to accordingly.

Dave
On Dec 12, 2016, at 10:25 PM, Anthony Minessale <anthony.minessale at gmail.com <mailto:anthony.minessale at gmail.com>> wrote:

try setting it to "proxy" instead of "true"

On Mon, Dec 12, 2016 at 8:58 PM, Dave Horton <daveh at beachdognet.com <mailto:daveh at beachdognet.com>> wrote:
I notice that when I set:

<param name="enable-3pcc" value="true”/>

and then send an INVITE to Freeswitch with no SDP, Freeswitch responds with 200 OK and an SDP offering all available codecs.

That is good, but it also appears that it does not evaluate the dialplan at all - simply sends out the 200 OK.

Is this by design?

My intent was to send an INVITE with no SDP, execute answer through my event socket program and thereafter be able to issue commands.
It seems like this is not possible?  Or am I doing something wrong?

Dave
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org <mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>

Official FreeSWITCH Sites
http://www.freeswitch.org <http://www.freeswitch.org/>
http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
http://www.cluecon.com <http://www.cluecon.com/>

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
http://www.freeswitch.org <http://www.freeswitch.org/>


-- 
Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬

☞ http://freeswitch.org/ <http://freeswitch.org/>  ☞ http://cluecon.com/ <http://cluecon.com/>  ☞ http://twitter.com/FreeSWITCH <http://twitter.com/FreeSWITCH>
☞ irc.freenode.net <http://irc.freenode.net/> #freeswitch ☞ http://freeswitch.org/g+ <http://freeswitch.org/g+>

ClueCon Weekly Development Call 
☎ sip:888 at conference.freeswitch.org <mailto:sip%3A888 at conference.freeswitch.org>  ☎ +19193869900 

https://www.youtube.com/watch?v=9XXgW34t40s <https://www.youtube.com/watch?v=9XXgW34t40s>
https://www.youtube.com/watch?v=NLaDpGQuZDA <https://www.youtube.com/watch?v=NLaDpGQuZDA>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
consulting at freeswitch.org <mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com <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 at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161213/1a68eb7d/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list