Need to get registered user contact string FS api.
Using this contact string you can dial webrtc user


пн, 12 февр. 2018 г., 16:54 Tihomir Culjaga <tculjaga@gmail.com>:
hi,


i have  UA > Kamailio > Freeswitch

UA is using sip for websockets and registers via kamailio to freeswitch.
When i try to originate a call from FS to the registered endpoint, the call fails. 

freeswitch@FS01> bgapi originate {origination_caller_id_number=1002}sofia/internal/1001%mydomain &echo()

I think FS is trying to use transport from received parematar instead of path uri.

any advice how to handle this ?





recv 964 bytes from udp/[192.168.50.60]:5060 at 22:18:57.909700:
   ------------------------------------------------------------------------
   REGISTER sip:192.168.50.60 SIP/2.0
   Via: SIP/2.0/UDP 192.168.50.60;branch=z9hG4bKe929.b6aa43dd1eefa9e4756af7d31d65066e.0
   Via: SIP/2.0/WSS 192.0.2.110;rport=61744;received=192.168.200.77;branch=z9hG4bK3179897
   Max-Forwards: 69
   To: <sip:1001@192.168.50.60>
   From: <sip:1001@192.168.50.60>;tag=vq30modpgd
   Call-ID: dlnrna9o4ngn25fb9d1vi2
   CSeq: 192 REGISTER
   Authorization: Digest algorithm=MD5, username="1001", realm="192.168.50.60", nonce="22c52b4b-f795-4caa-bb9b-15bbd87564f7", uri="sip:192.168.50.60", response="a073277bc9c1fcd681de661cb418d838", qop=auth, cnonce="euqeokf2d1gr", nc=00000001
   Contact: <sip:1001@192.0.2.110;transport=ws>;reg-id=1;+sip.instance="<urn:uuid:587f4694-7e55-46dc-a858-579a82556a20>";expires=600
   Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER
   Supported: path, gruu, 100rel, outbound
   User-Agent: SIP.js/0.7.0 BB
   Content-Length: 0
   Path: <sip:192.168.50.60;lr;received=sip:192.168.200.77:61744%3Btransport%3Dws>
   
   ------------------------------------------------------------------------
send 738 bytes to udp/[192.168.50.60]:5060 at 22:18:57.950968:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 192.168.50.60;branch=z9hG4bKe929.b6aa43dd1eefa9e4756af7d31d65066e.0
   Via: SIP/2.0/WSS 192.0.2.110;rport=61744;received=192.168.200.77;branch=z9hG4bK3179897
   From: <sip:1001@192.168.50.60>;tag=vq30modpgd
   To: <sip:1001@192.168.50.60>;tag=eK8SmZmcU7UBr
   Call-ID: dlnrna9o4ngn25fb9d1vi2
   CSeq: 192 REGISTER
   Contact: <sip:1001@192.0.2.110;transport=ws>;expires=600
   Date: Fri, 09 Feb 2018 21:18:57 GMT
   User-Agent: FreeSWITCH-mod_sofia/1.6.19+git~20171120T163416Z~b1b21d0695~64bit
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
   Supported: timer, path, replaces
   Path: <sip:192.168.50.60>;lr;received=sip:192.168.200.77:61744%3Btransport%3Dws
   Content-Length: 0
   
   ------------------------------------------------------------------------



in freeswitch i the registration:

Call-ID:        dlnrna9o4ngn25fb9d1vi2
User:           1001@mydomain
Contact:        "" <sip:1001@192.0.2.110;transport=ws;fs_nat=yes;fs_path=sip%3A192.168.50.60%3Blr%3Breceived%3Dsip%3A192.168.200.77%3A61744%3Btransport%3Dws>
Agent:          SIP.js/0.7.0 BB
Status:         Registered(WS-NAT)(unknown) EXP(2018-02-09 22:29:57) EXPSECS(510)
Ping-Status:    Reachable
Ping-Time:      0.00
Host:           FS01
IP:             192.168.50.60
Port:           5060
Auth-User:      1001
Auth-Realm:     192.168.50.60
MWI-Account:    1001@mydomain




the register contain a path header with received=<original uri>.

when i try to originate a call to this registered user the call goes nowhere :=)


freeswitch@FS01> bgapi originate {origination_caller_id_number=1002}sofia/internal/1001%mydomain &echo()
+OK Job-UUID: 200e2197-a6de-42d9-b4bb-63917223bc53

2018-02-09 22:25:40.500100 [DEBUG] switch_ivr_originate.c:2142 Parsing global variables
2018-02-09 22:25:40.500100 [NOTICE] switch_channel.c:1104 New Channel sofia/internal/1001 [327826f9-8a8c-46c7-b3ed-8bf22852df88]
2018-02-09 22:25:40.500100 [DEBUG] mod_sofia.c:4819 (sofia/internal/1001) State Change CS_NEW -> CS_INIT
2018-02-09 22:25:40.500100 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/1001) Running State Change CS_INIT (Cur 1 Tot 217)
2018-02-09 22:25:40.500100 [DEBUG] switch_core_state_machine.c:627 (sofia/internal/1001) State INIT
2018-02-09 22:25:40.500100 [DEBUG] mod_sofia.c:90 sofia/internal/1001 SOFIA INIT
2018-02-09 22:25:40.500100 [DEBUG] sofia_glue.c:1264 sip:192.168.50.60;lr;received=sip:192.168.200.77:61744;transport=ws Setting proxy route to sofia/internal/1001
2018-02-09 22:25:40.500100 [DEBUG] sofia_glue.c:1295 sofia/internal/1001 sending invite version: 1.6.19 git b1b21d0 2017-11-20 16:34:16Z 64bit











_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org