Jump to content

Presenting kazoo-ansible (Ansible Roles for Kazoo)


Tom

Recommended Posts

i am having an issue where the rtp packets are being dropped by the second freeswitch in a dual setup.

One caveat though i dont have a dns and phones register through an outbound proxy to the first server: 10.0.1.1. However whenever the freeswitch in second server 10.0.1.2 wins and handles the calls  the phones ring but there is no audio. 

Also i am not sure if there has been a change with the log files or thier location. my install is not generating kazoo.log anymore. only console error and crash logs.

Edited by Uzair Mahmud (see edit history)
Link to comment
Share on other sites

yeah SDPs are wrong is what i think too. yeah the phones are on my local network. i am entering the the outbound proxy as 10.0.1.1 in the softclients to connect.  i feel like that is whats setting the wrong SDPs . Maybe i have to add proper nat parameters somewhere to resolve that. 

Edited by Uzair Mahmud (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

Hmm, can't do that unfortunately since we run on Leaseweb...

Below I posted my kamailio local.cfg;

################################################################################
## ROLES
################################################################################
## Enabled Roles
#!trydef DISPATCHER_ROLE
#!trydef NAT_TRAVERSAL_ROLE
#!trydef REGISTRAR_ROLE
#!trydef PRESENCE_ROLE
#!trydef RESPONDER_ROLE
#!trydef NODES_ROLE
#!trydef FAST_PICKUP_ROLE
#!trydef PRESENCE_QUERY_ROLE

## Disabled Roles - remove all but the last '#' to enable
# # #!trydef TRAFFIC_FILTER_ROLE
# # #!trydef WEBSOCKETS_ROLE
# # #!trydef TLS_ROLE
# # #!trydef ANTIFLOOD_ROLE
# # #!trydef RATE_LIMITER_ROLE
# # #!trydef ACL_ROLE
# # #!trydef MESSAGE_ROLE
# # #!trydef PUSHER_ROLE
# # #!trydef REGISTRAR_SYNC_ROLE
# # #!trydef PRESENCE_SYNC_ROLE
# # #!trydef PRESENCE_NOTIFY_SYNC_ROLE

################################################################################
## SERVER INFORMATION
################################################################################
## CHANGE "kamailio.2600hz.com" TO YOUR SERVERS HOSTNAME
#!substdef "!MY_HOSTNAME!JZKJ-Cloud001-I005.leasewebcloud.com!g"

## CHANGE "127.0.0.1" TO YOUR SERVERS IP ADDRESS
##     Usually your public IP.  If you need
##     to listen on addtional ports or IPs
##     add them in "BINDINGS" at the bottom.
#!substdef "!MY_IP_ADDRESS!172.29.40.239!g"

## CHANGE "kazoo://guest:guest@127.0.0.1:5672" TO THE AMQP URL
##     This should be the primary RabbitMQ server
##     in the zone that this server will service.


#!substdef "!MY_AMQP_URL!kazoo://rabbitmq:[PASSWORD_REMOVED]@JZKJ-Cloud001-I005.leasewebcloud.com:5672!g"

#!substdef "!MY_AMQP_SECONDARY_URL!kazoo://rabbitmq:[PASSWORD_REMOVED]@JZKJ-Cloud001-I006.leasewebcloud.com:5672!g"


## This parameter is only required if you are using websockets
##     This value must be present in the HTTP
##     Origin header on a new websocket request
##     or it will be rejected.  If you remove
##     it completely the validation will be disabled.
#!substdef "!MY_WEBSOCKET_DOMAIN!devnull.lan!g"

################################################################################
## DISPATCHER FORMAT INFORMATION
################################################################################
## dispatcher list changed the default storage type from list to table
## this will allow the management of dispatched servers in the DB
##
## if you're using dbtext and can't start kamailio because of dispatcher
## check the format of /etc/kazoo/kamailio/dbtext/dispatcher
##
## # setid(integer) destination(sip uri) flags (integer, optional)
## 1 sip:192.168.16.131:11000 0
## should converted to
## id(int,auto) setid(int) destination(string) flags(int) priority(int) attrs(string) description(string)
## 1:1:sip\:192.168.16.131\:11000:0:1: :  (there is a space at end)
##
## uncommenting this param will allow to continue using dispatcher list
# # #!trydef KZ_USE_DISPATCHER_LIST

################################################################################
## UDP PARAMETERS
################################################################################
## This parameter is OPTIONAL
##     If large UDP packets are dropped by the
##     interface try uncommenting this option.
##     However, you MUST match this to your
##     network adapter!  If they do not match,
##     all UDP packets over this limit WILL FAIL!
##     E.g.: Add MTU=1472 to the /etc/sysconfig/network-scripts/XXX
# udp4_raw_mtu = 1472

################################################################################
## BINDINGS
################################################################################
## This parameter is OPTIONAL.
##     It will try to locate outbound interface
##     on multihomed host.  By default forward
##     requests use the incoming socket disregarding
##     the destination location. When enabled Kamailio
##     will select a socket that can reach the
##     destination. This reduces performance.
mhomed=0

## YOU SHOULD NOT HAVE TO CHANGE THESE!
##     By setting MY_IP_ADDRESS above these will resolve
##     to the proper bindings.  These are here
##     for those with complex layouts who know
##     what they are doing :)
#!substdef "!UDP_SIP!udp:MY_IP_ADDRESS:5060!g"
#!substdef "!TCP_SIP!tcp:MY_IP_ADDRESS:5060!g"
#!substdef "!TLS_SIP!tls:MY_IP_ADDRESS:5061!g"
#!substdef "!UDP_ALG_SIP!udp:MY_IP_ADDRESS:7000!g"
#!substdef "!TCP_ALG_SIP!tcp:MY_IP_ADDRESS:7000!g"
#!substdef "!TLS_ALG_SIP!tls:MY_IP_ADDRESS:7001!g"
#!substdef "!TCP_WS!tcp:MY_IP_ADDRESS:5064!g"
#!substdef "!UDP_WS_SIP!udp:MY_IP_ADDRESS:5064!g"
#!substdef "!TLS_WSS!tls:MY_IP_ADDRESS:5065!g"
#!substdef "!UDP_WSS_SIP!udp:MY_IP_ADDRESS:5065!g"

## YOU SHOULD NOT HAVE TO CHANGE THESE!
##     This will bind the default SIP listeners
##     as determined above.  The tls-role and
##     websocket-role will use the appropriate
##     definitions if enabled.  These are here
##     for those with complex layouts who know
##     what they are doing :)
listen=UDP_SIP advertise 172.29.40.239:5060
listen=TCP_SIP advertise 172.29.40.239:5060
listen=UDP_ALG_SIP advertise 172.29.40.239:7000
listen=TCP_ALG_SIP advertise 172.29.40.239:7000

Already tried editing the advertise IP to the public ip of the kamailio server, no luck.

Link to comment
Share on other sites

It looks like your configuration file has the private IP. I have code to detect the public IP address, but it doesn't work in all situations. If your cloud provider has an API to get the public IP, I can add it. I can also find a way to set the public IP for each host, but this is less ideal.

It's not just Kamailio. There's a file in Freeswitch too. It's better if we can automate it than trying manual tweaks.

Edited by Tom (see edit history)
Link to comment
Share on other sites

Thanks Tom for your reply! That's right, in the meantime I've added the ifconfig (https://ifconfig.io/ip) api in the publicip python and did a reinstall. I now see the public ip address in the config files (both kamailio and freeswitch). Unfortunately it doesn't seem to solve something. The config files are changed and I'm able to call a other extension, but when the connection has been made, there won't be any audio. When the call is forwarded to the voicemail, I'm actually able to hear the greeting. 

Any more idea's?

Edited by VincentdeWit (see edit history)
Link to comment
Share on other sites

This is definitely an SDP issue. Do you have a static IP that differs from the public IP that ipconfig.io/ip is reporting? I've found that with cloud providers (Google and AWS), you have to use their internal APIs because any other method of getting the static IP returns some sort of gateway rather than the IP of the server.

Link to comment
Share on other sites

Hmmm, the infrastructure is indeed hosted on a cloud provider like Google/AWS. All the servers are connected through a virtual router and all have their own public ip (62.212.x.x). Enclosed I've attached a small network diagram, maybe that helps out to understand how it looks. The IP that ifconfig.io/ip returns are the public ip's assigned to the virtual machines. 

Also attached the Freeswitch log for 1 call. As far as I can see, the IP noted is the internal freeswitch ip? So that should be the problem? The myippbx.io is btw the realm used (and has an a record to the kamailio/kazoo ip).

Thanks so far Tom!

recv 501 bytes from udp/[172.29.40.239]:5060 at 23:28:13.806402:
   ------------------------------------------------------------------------
   SIP/2.0 180 Ringing
   Record-Route: <sip:[PUBLIC_IP_KAZOO1/62.212.x.1];lr=on;ftag=tU3FvcKtrytNg>
   Via: SIP/2.0/UDP [PUBLIC_IP_FS1/62.212.x.3]:11000;received=172.29.40.216;rport=11000;branch=z9hG4bKH5jZ90et7HjSN
   From: "Vincent de Wit" <sip:2000@myippbx.io>;tag=tU3FvcKtrytNg
   To: <sip:wouter_t46@myippbx.io>;tag=10-4796B91D-5A06360D000AD09A-03EFE700
   Call-ID: d26ad858-c66e-11e7-8e22-8f397b1eade2
   CSeq: 114842182 INVITE
   Server: call.center proxy
   Contact: <sip:46.19.210.33:6050;transport=udp>
   Content-Length: 0

   ------------------------------------------------------------------------
2017-11-10 23:28:13.798614 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/wouter_t46@myippbx.io entering state [proceeding][180]
2017-11-10 23:28:13.798614 [NOTICE] sofia.c:7192 Ring-Ready sofia/sipinterface_1/wouter_t46@myippbx.io!
2017-11-10 23:28:13.798614 [DEBUG] switch_channel.c:3346 (sofia/sipinterface_1/wouter_t46@myippbx.io) Callstate Change DOWN -> RINGING
2017-11-10 23:28:13.818619 [INFO] switch_ivr_originate.c:1215 Sending early media
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [GSM:3:8000:20:13200:1] ++++ is saved as a match
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [GSM:3:8000:20:13200:1]/[SPEEX:99:8000:20:24600:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [speex:110:8000:20:0:1]/[SPEEX:99:8000:20:24600:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [SPEEX:99:8000:20:24600:1] ++++ is saved as a match
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:30:0:1]/[SPEEX:99:8000:20:24600:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[SPEEX:99:8000:20:24600:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[SPEEX:99:8000:20:24600:1]
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4365 Set telephone-event payload to 101@8000
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:3061 Set Codec sofia/sipinterface_1/vincent_t46@myippbx.io PCMU/8000 20 ms 160 samples 64000 bits 1 channels
2017-11-10 23:28:13.818619 [DEBUG] switch_core_codec.c:111 sofia/sipinterface_1/vincent_t46@myippbx.io Original read codec set to PCMU:0
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4708 Set telephone-event payload to 101@8000
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:4767 sofia/sipinterface_1/vincent_t46@myippbx.io Set 2833 dtmf send payload to 101 recv payload to 101
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:6878 AUDIO RTP [sofia/sipinterface_1/vincent_t46@myippbx.io] 172.29.40.216 port 19976 -> 31.161.159.145 port 4288 codec: 0 ms: 20
2017-11-10 23:28:13.818619 [DEBUG] switch_rtp.c:4111 Starting timer [soft] 160 bytes per 20ms
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:7179 sofia/sipinterface_1/vincent_t46@myippbx.io Set 2833 dtmf send payload to 101
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:7186 sofia/sipinterface_1/vincent_t46@myippbx.io Set 2833 dtmf receive payload to 101
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:7209 sofia/sipinterface_1/vincent_t46@myippbx.io Set rtp dtmf delay to 40
2017-11-10 23:28:13.818619 [NOTICE] sofia_media.c:92 Pre-Answer sofia/sipinterface_1/vincent_t46@myippbx.io!
2017-11-10 23:28:13.818619 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 4747
2017-11-10 23:28:13.818619 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 4747
2017-11-10 23:28:13.818619 [DEBUG] switch_channel.c:3474 (sofia/sipinterface_1/vincent_t46@myippbx.io) Callstate Change RINGING -> EARLY
2017-11-10 23:28:13.818619 [DEBUG] switch_core_media.c:6861 Audio params are unchanged for sofia/sipinterface_1/vincent_t46@myippbx.io.
2017-11-10 23:28:13.818619 [DEBUG] mod_sofia.c:2364 Ring SDP:
v=0
o=FreeSWITCH 1510336517 1510336518 IN IP4 172.29.40.216
s=FreeSWITCH
c=IN IP4 172.29.40.216
t=0 0
m=audio 19976 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

2017-11-10 23:28:13.818619 [DEBUG] switch_ivr_originate.c:1273 Raw Codec Activation Success L16@8000hz 1 channel 20ms
2017-11-10 23:28:13.818619 [DEBUG] switch_core_codec.c:223 sofia/sipinterface_1/vincent_t46@myippbx.io Push codec L16:100
2017-11-10 23:28:13.818619 [DEBUG] switch_ivr_originate.c:1342 Play Ringback Tone [%(2000,4000,440,480)]
send 1309 bytes to udp/[172.29.40.2]:5060 at 23:28:13.826697:
   ------------------------------------------------------------------------
   SIP/2.0 183 Session Progress
   Via: SIP/2.0/UDP [PUBLIC_IP_KAZOO1/62.212.x.1]:5060;branch=z9hG4bK6fc4.12bb88a6faccc04fbbe475c618cce258.0;received=172.29.40.2
   Via: SIP/2.0/UDP 31.161.159.145:4262;received=31.161.159.145;branch=z9hG4bK-524287-1---bb3fdd96cae67130;rport=4262
   Record-Route: <sip:[PUBLIC_IP_KAZOO1/62.212.x.1];lr=on;ftag=ea86c925>
   From: "2000"<sip:vincent_t46@myippbx.io;transport=UDP>;tag=ea86c925
   To: <sip:2001@myippbx.io;transport=UDP>;tag=Q0Q5pU0F13QXD
   Call-ID: 4vWX5fJDU_tTUQnl2KQOvQ..
   CSeq: 1 INVITE
   Contact: <sip:2001@[PUBLIC_IP_FS1/62.212.x.3]:11000;transport=udp>
   User-Agent: 2600hz
   Accept: application/sdp
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: path, replaces
   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 222
   Remote-Party-ID: "2001" <sip:2001@myippbx.io>;party=calling;privacy=off;screen=no

   v=0
   o=FreeSWITCH 1510336517 1510336518 IN IP4 172.29.40.216
   s=FreeSWITCH
   c=IN IP4 172.29.40.216
   t=0 0
   m=audio 19976 RTP/AVP 0 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
2017-11-10 23:28:13.838618 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/vincent_t46@myippbx.io entering state [early][183]
2017-11-10 23:28:13.898613 [DEBUG] kazoo_node.c:1319 Sent erlang message to ecallmgr@JZKJ-Cloud001-I005.leasewebcloud.com <2.9424.2>
recv 366 bytes from udp/[172.29.40.2]:1024 at 23:28:14.778147:
   ------------------------------------------------------------------------
   OPTIONS sip:[PUBLIC_IP_FS1/62.212.x.3]:11000 SIP/2.0
   Via: SIP/2.0/UDP 62.212.93.117:5060;branch=z9hG4bKb9bc.e665be93000000000000000000000000.0
   To: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>
   From: <sip:sipcheck@JZKJ-Cloud001-I006.leasewebcloud.com>;tag=dbffbdc8cba239bd3478767c2adf1fee-65dc
   CSeq: 10 OPTIONS
   Call-ID: 2d1d63523f54bd8c-16476@172.29.40.106
   Max-Forwards: 70
   Content-Length: 0

   ------------------------------------------------------------------------
send 751 bytes to udp/[172.29.40.2]:5060 at 23:28:14.778234:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 62.212.93.117:5060;branch=z9hG4bKb9bc.e665be93000000000000000000000000.0;received=172.29.40.2
   From: <sip:sipcheck@JZKJ-Cloud001-I006.leasewebcloud.com>;tag=dbffbdc8cba239bd3478767c2adf1fee-65dc
   To: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>;tag=Kvj2FFX1c0yjF
   Call-ID: 2d1d63523f54bd8c-16476@172.29.40.106
   CSeq: 10 OPTIONS
   Contact: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>
   User-Agent: 2600hz
   Accept: application/sdp
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: path, replaces
   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Content-Length: 0

   ------------------------------------------------------------------------
recv 366 bytes from udp/[172.29.40.2]:1024 at 23:28:14.778308:
   ------------------------------------------------------------------------
   OPTIONS sip:[PUBLIC_IP_FS1/62.212.x.3]:11000 SIP/2.0
   Via: SIP/2.0/UDP 62.212.93.117:5060;branch=z9hG4bK34ac.66d53965000000000000000000000000.0
   To: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>
   From: <sip:sipcheck@JZKJ-Cloud001-I006.leasewebcloud.com>;tag=dbffbdc8cba239bd3478767c2adf1fee-df7d
   CSeq: 10 OPTIONS
   Call-ID: 2d1d63523f54bd91-16476@172.29.40.106
   Max-Forwards: 70
   Content-Length: 0

   ------------------------------------------------------------------------
send 751 bytes to udp/[172.29.40.2]:5060 at 23:28:14.778347:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP 62.212.93.117:5060;branch=z9hG4bK34ac.66d53965000000000000000000000000.0;received=172.29.40.2
   From: <sip:sipcheck@JZKJ-Cloud001-I006.leasewebcloud.com>;tag=dbffbdc8cba239bd3478767c2adf1fee-df7d
   To: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>;tag=r9gyrpHKycegS
   Call-ID: 2d1d63523f54bd91-16476@172.29.40.106
   CSeq: 10 OPTIONS
   Contact: <sip:[PUBLIC_IP_FS1/62.212.x.3]:11000>
   User-Agent: 2600hz
   Accept: application/sdp
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: path, replaces
   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Content-Length: 0

   ------------------------------------------------------------------------
recv 779 bytes from udp/[172.29.40.239]:5060 at 23:28:15.715714:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Record-Route: <sip:[PUBLIC_IP_KAZOO1/62.212.x.1];lr=on;ftag=tU3FvcKtrytNg>
   Via: SIP/2.0/UDP [PUBLIC_IP_FS1/62.212.x.3]:11000;received=172.29.40.216;rport=11000;branch=z9hG4bKH5jZ90et7HjSN
   From: "Vincent de Wit" <sip:2000@myippbx.io>;tag=tU3FvcKtrytNg
   To: <sip:wouter_t46@myippbx.io>;tag=10-4796B91D-5A06360D000AD09A-03EFE700
   Call-ID: d26ad858-c66e-11e7-8e22-8f397b1eade2
   CSeq: 114842182 INVITE
   Server: call.center proxy
   Contact: <sip:46.19.210.33:6050;transport=udp>
   Content-Type: application/sdp
   Content-Length: 250

   v=0
   o=sems 1485264595 1326795701 IN IP4 46.19.210.33
   s=sems
   c=IN IP4 46.19.210.33
   t=0 0
   m=audio 17032 RTP/AVP 0 8 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:8 PCMA/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=sendrecv
   a=direction:both
   ------------------------------------------------------------------------
2017-11-10 23:28:15.708616 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/wouter_t46@myippbx.io entering state [completing][200]
2017-11-10 23:28:15.708616 [DEBUG] sofia.c:7094 Remote SDP:
v=0
o=sems 1485264595 1326795701 IN IP4 46.19.210.33
s=sems
c=IN IP4 46.19.210.33
t=0 0
m=audio 17032 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:both

send 478 bytes to udp/[172.29.40.239]:5060 at 23:28:15.716931:
   ------------------------------------------------------------------------
   ACK sip:46.19.210.33:6050;transport=udp SIP/2.0
   Via: SIP/2.0/UDP [PUBLIC_IP_FS1/62.212.x.3]:11000;rport;branch=z9hG4bKjecrBvZX4t8BH
   Route: <sip:[PUBLIC_IP_KAZOO1/62.212.x.1];lr=on;ftag=tU3FvcKtrytNg>
   Max-Forwards: 70
   From: "Vincent de Wit" <sip:2000@myippbx.io>;tag=tU3FvcKtrytNg
   To: <sip:wouter_t46@myippbx.io>;tag=10-4796B91D-5A06360D000AD09A-03EFE700
   Call-ID: d26ad858-c66e-11e7-8e22-8f397b1eade2
   CSeq: 114842182 ACK
   Contact: <sip:mod_sofia@[PUBLIC_IP_FS1/62.212.x.3]:11000>
   Content-Length: 0

   ------------------------------------------------------------------------
2017-11-10 23:28:15.708616 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/wouter_t46@myippbx.io entering state [ready][200]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[GSM:3:8000:20:13200:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G7221:115:32000:20:48000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G7221:107:16000:20:32000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4365 Set telephone-event payload to 101@8000
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:3061 Set Codec sofia/sipinterface_1/wouter_t46@myippbx.io PCMU/8000 20 ms 160 samples 64000 bits 1 channels
2017-11-10 23:28:15.708616 [DEBUG] switch_core_codec.c:111 sofia/sipinterface_1/wouter_t46@myippbx.io Original read codec set to PCMU:0
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4708 Set telephone-event payload to 101@8000
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:4767 sofia/sipinterface_1/wouter_t46@myippbx.io Set 2833 dtmf send payload to 101 recv payload to 101
2017-11-10 23:28:15.708616 [DEBUG] switch_core_media.c:6878 AUDIO RTP [sofia/sipinterface_1/wouter_t46@myippbx.io] 172.29.40.216 port 32222 -> 46.19.210.33 port 17032 codec: 0 ms: 20
2017-11-10 23:28:15.708616 [DEBUG] switch_rtp.c:4111 Starting timer [soft] 160 bytes per 20ms
2017-11-10 23:28:15.718615 [DEBUG] switch_core_media.c:7179 sofia/sipinterface_1/wouter_t46@myippbx.io Set 2833 dtmf send payload to 101
2017-11-10 23:28:15.718615 [DEBUG] switch_core_media.c:7186 sofia/sipinterface_1/wouter_t46@myippbx.io Set 2833 dtmf receive payload to 101
2017-11-10 23:28:15.718615 [DEBUG] switch_core_media.c:7209 sofia/sipinterface_1/wouter_t46@myippbx.io Set rtp dtmf delay to 40
2017-11-10 23:28:15.718615 [NOTICE] sofia.c:8218 Channel [sofia/sipinterface_1/wouter_t46@myippbx.io] has been answered
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 4827
2017-11-10 23:28:15.718615 [DEBUG] switch_channel.c:3773 (sofia/sipinterface_1/wouter_t46@myippbx.io) Callstate Change RINGING -> ACTIVE
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 4827
2017-11-10 23:28:15.718615 [DEBUG] switch_core_codec.c:248 sofia/sipinterface_1/vincent_t46@myippbx.io Restore previous codec PCMU:0.
2017-11-10 23:28:15.718615 [DEBUG] switch_core_media.c:6861 Audio params are unchanged for sofia/sipinterface_1/vincent_t46@myippbx.io.
2017-11-10 23:28:15.718615 [DEBUG] mod_sofia.c:850 Local SDP sofia/sipinterface_1/vincent_t46@myippbx.io:
v=0
o=FreeSWITCH 1510336517 1510336519 IN IP4 172.29.40.216
s=FreeSWITCH
c=IN IP4 172.29.40.216
t=0 0
m=audio 19976 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

2017-11-10 23:28:15.718615 [NOTICE] switch_ivr_originate.c:3647 Channel [sofia/sipinterface_1/vincent_t46@myippbx.io] has been answered
send 1281 bytes to udp/[172.29.40.2]:5060 at 23:28:15.724500:
   ------------------------------------------------------------------------
   SIP/2.0 200 OK
   Via: SIP/2.0/UDP [PUBLIC_IP_KAZOO1/62.212.x.1]:5060;branch=z9hG4bK6fc4.12bb88a6faccc04fbbe475c618cce258.0;received=172.29.40.2
   Via: SIP/2.0/UDP 31.161.159.145:4262;received=31.161.159.145;branch=z9hG4bK-524287-1---bb3fdd96cae67130;rport=4262
   Record-Route: <sip:[PUBLIC_IP_KAZOO1/62.212.x.1];lr=on;ftag=ea86c925>
   From: "2000"<sip:vincent_t46@myippbx.io;transport=UDP>;tag=ea86c925
   To: <sip:2001@myippbx.io;transport=UDP>;tag=Q0Q5pU0F13QXD
   Call-ID: 4vWX5fJDU_tTUQnl2KQOvQ..
   CSeq: 1 INVITE
   Contact: <sip:2001@[PUBLIC_IP_FS1/62.212.x.3]:11000;transport=udp>
   User-Agent: 2600hz
   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
   Supported: path, replaces
   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
   Content-Type: application/sdp
   Content-Disposition: session
   Content-Length: 222
   Remote-Party-ID: "Wouter Grentziu" <sip:2001@myippbx.io>;party=calling;privacy=off;screen=no

   v=0
   o=FreeSWITCH 1510336517 1510336518 IN IP4 172.29.40.216
   s=FreeSWITCH
   c=IN IP4 172.29.40.216
   t=0 0
   m=audio 19976 RTP/AVP 0 101
   a=rtpmap:0 PCMU/8000
   a=rtpmap:101 telephone-event/8000
   a=fmtp:101 0-16
   a=ptime:20
   ------------------------------------------------------------------------
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 5115
2017-11-10 23:28:15.718615 [DEBUG] switch_channel.c:3773 (sofia/sipinterface_1/vincent_t46@myippbx.io) Callstate Change EARLY -> ACTIVE
2017-11-10 23:28:15.718615 [DEBUG] switch_ivr_originate.c:3705 Originate Resulted in Success: [sofia/sipinterface_1/wouter_t46@myippbx.io]
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 5115
2017-11-10 23:28:15.718615 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/vincent_t46@myippbx.io entering state [completed][200]
2017-11-10 23:28:15.718615 [DEBUG] switch_ivr_bridge.c:1614 (sofia/sipinterface_1/wouter_t46@myippbx.io) State Change CS_CONSUME_MEDIA -> CS_EXCHANGE_MEDIA
2017-11-10 23:28:15.718615 [DEBUG] switch_core_state_machine.c:584 (sofia/sipinterface_1/wouter_t46@myippbx.io) Running State Change CS_EXCHANGE_MEDIA (Cur 2 Tot 60)
2017-11-10 23:28:15.718615 [DEBUG] switch_core_state_machine.c:653 (sofia/sipinterface_1/wouter_t46@myippbx.io) State EXCHANGE_MEDIA
2017-11-10 23:28:15.718615 [DEBUG] mod_sofia.c:631 SOFIA EXCHANGE_MEDIA
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 5595
2017-11-10 23:28:15.718615 [DEBUG] kazoo_event_stream.c:245 increased event stream buffer size to 5595
recv 628 bytes from udp/[172.29.40.2]:5060 at 23:28:15.762103:
   ------------------------------------------------------------------------
   ACK sip:2001@[PUBLIC_IP_FS1/62.212.x.3]:11000;transport=udp SIP/2.0
   Via: SIP/2.0/UDP [PUBLIC_IP_KAZOO1/62.212.x.1]:5060;branch=z9hG4bK6fc4.d3a23554192a81d6cbf1ec65413ee8d6.0
   Via: SIP/2.0/UDP 31.161.159.145:4262;received=31.161.159.145;branch=z9hG4bK-524287-1---956bbbd28d3ac77f;rport=4262
   Max-Forwards: 50
   Contact: <sip:vincent_t46@31.161.159.145:4262;transport=UDP>
   To: <sip:2001@myippbx.io;transport=UDP>;tag=Q0Q5pU0F13QXD
   From: "2000"<sip:vincent_t46@myippbx.io;transport=UDP>;tag=ea86c925
   Call-ID: 4vWX5fJDU_tTUQnl2KQOvQ..
   CSeq: 1 ACK
   User-Agent: Zoiper rv2.8.40
   Content-Length: 0
   X-AUTH-IP: 31.161.159.145
   X-AUTH-PORT: 4262

   ------------------------------------------------------------------------
2017-11-10 23:28:15.758614 [DEBUG] sofia.c:7084 Channel sofia/sipinterface_1/vincent_t46@myippbx.io entering state [ready][200]

 

 5a063b8153bff_ScreenShot2017-11-11at12_45_45AM.thumb.png.5e5675dda8b1e600efd19345e87ce251.png

Edited by VincentdeWit (see edit history)
Link to comment
Share on other sites

19 minutes ago, Tom said:

At this point, I'm thinking that the SDP fix doesn't do anything anymore, which doesn't surprise me because I found it on the old forum from 2015. I'm grading programs for a class I'm teaching right now, but I'll try to experiment later today.

Hahaha, good luck with that and thanks so far! Let me know if you need anything.

Link to comment
Share on other sites

I've been trying to track down this NAT issue for months. I need help, but I'm not sure who to ask.

I reinstalled my VM where I had this all working, and it's not working again, despite using the same configuration.

Follow-up:

It seems that http://kamailio.org/docs/modules/stable/modules/presence.html#presence.p.server_address might have something to do with this. I added this in, and I was able to make calls again.

Edited by Tom (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

Hi Tom,

 I was having trouble in my lan setup without NAT.

My test setup has two servers A and B with all components installed. What would happen is that there would be no audio if the call went from ServerA Kamailio to Server B Freeswitch  and vice versa.

  I had to comment out sdp fix on the lines 613 and 722 in /etc/kazoo/kamailio/default.cfg to get my audio to work in a highly available fashion on LAN. This change kept the ip from changing in the sdp and the packets started routing correctly for my non NAT scenario. 

Writing this here in hope that someone with a similar scenario can benefit from this. 

Edit: I just saw that you removed SDP Fix and are getting external ip through akami. i will have to check that and see how i can use it for my LAN setup.

Link to comment
Share on other sites

Yeah i completely understand. The freeswitch ext ips only takes one value, same for kamailio advertise.

I was wondering if there is a variable that can be in the settings file before the certificates where we can specify if we want lan install or nat install and the ips will be set accordingly.

 

Also i finally figured out the error why i wasn't getting kazoo log files. My rsyslog was disabled. Once i enabled that i started getting the kazoo main log file. 

 

Cheers

Uzair Mahmud

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...