Hi,
[email protected] wrote on 06/29/2015 03:23 PM: > Hello community, > > I try out a setup with kamailio as registrar and SEMS as transparent SBC. I > take the example from Github and changed the parameters to my setup. > If I do a call from wan to lan all works fine, but if I do a call from inside > sometimes the call trying is broken after I press the call button sometimes a > call is establish but only in one direction (wan to lan). In the text file > there is the ngrep from the Kamailio server and the capture files are from > the sems server. Perhaps my config is not correct or need the Kamailio server > some additional settings (i.e. some routing information...)? In my default > installation no uac_auth.conf was available and I copied only the example > from github in uac_auth.conf to create a uac_auth.conf. > > Thank you for helping. Your kamailio seems to return 404 - looks like 1000 is not registered. you should really not only collect ngreps, but also have a look at it. Also, if you're asking about something that doesn't work, only include the trace from the non-working call. If the call hangs in SEMS you should run sems in debug mode (e.g. in foreground with -D 3 -E) and see what's really happening in the log. unrelated, but the uac_auth.conf you pasted doesn't make sense. where did you get that c++ code snippet from? hth Stefan > > Best regards, > > Kai > > > Here my setup: > kamailio registrar IP: 203.204.111.59 > sems internal: 203.204.111.58 > external: 192.16.163.58 > client internal: 203.204.111.77 > client external: 192.16.163.60 > > ---sems.conf--- > # debug log to foreground > fork=no > stderr=yes > loglevel=3 > # running in source tree - otherwise change these > plugin_path=/usr/local/lib/sems/plug-in/ > plugin_config_path=/usr/local/etc/sems/etc/ > load_plugins=session_timer;uac_auth;sbc > interfaces=intern,extern > sip_ip_intern=203.204.111.58 > sip_port_intern=5080 > media_ip_intern=203.204.111.58 > rtp_low_port_intern=10000 > rtp_high_port_intern=20000 > sip_ip_extern=193.16.163.58 > sip_port_extern=5060 > media_ip_extern=193.16.163.58 > rtp_low_port_extern=20000 > rtp_high_port_extern=30000 > public_ip_extern=193.16.163.58 > # sig_sock_opts_extern=force_via_address > # tcp_connect_timeout_extern=1000 > # tcp_idle_timeout_extern=900000 > application=sbc > > > ---sbc.conf--- > profiles=exin,inex,reg > # load one regex-mapping for method, one for interface (here: received IP) > regex_maps=method_map,interface_map > # first try method (REGISTER), then map on received interface (here: received > IP) > active_profile=$M($m=>method_map),$M($Ri=>interface_map) > > > ---method_map.conf--- > REGISTER=>reg > > > ---interface_map--- > 203\.204\.111\.58=>inex > 193\.16\.163\.58=>exin > > > ---reg.sbcprofile.conf--- > # registration cache > enable_reg_caching=yes > # register upstream every 3600 sec > min_reg_expires=15 > # and make UA re-register every 60 sec > max_ua_expires=100 > next_hop=203.204.111.59:5060 > # setting RURI here to registrar, in order to make my registrar accept it > # if it's DNS name, the registrar should accept it without modification > RURI=sip:203.204.111.59 > > > ---exin.sbcprofle.conf--- > # SIP NAT handling: recommended if dealing with far end NATs > dlg_nat_handling=yes > # destination IP[:port] for outgoing requests > next_hop=203.204.111.59:5060 > ## RTP relay > # enable RTP relaying (bridging): > enable_rtprelay=yes > #force_symmetric_rtp=yes > # setting RURI domain here to proxy (in case of domain name, not necessary...) > RURI=sip:[email protected] > > ---inex.sbcprofile.conf--- > enable_reg_caching=yes > > > ---uac_auth.conf--- > AmDynInvokeFactory* fact = > AmPlugIn::instance()->getFactory4Di("uac_auth"); > if (NULL != fact) { > AmDynInvoke* di_inst = fact->getInstance(); > if(di_inst) { > AmArg di_args, di_ret; > try { > di_args.push(AmArg((AmObject*)&req)); > di_args.push("myrealm"); > di_args.push("myuser"); > di_args.push("mypwd"); > di_inst->invoke("checkAuth", di_args, di_ret); > > if (di_ret.size() >= 3) { > if (di_ret[0].asInt() != 200) { > DBG("Auth: replying %u %s - hdrs: '%s'\n", > di_ret[0].asInt(), di_ret[1].asCStr(), di_ret[2].asCStr()); > dlg->reply(req, di_ret[0].asInt(), di_ret[1].asCStr(), NULL, > di_ret[2].asCStr()); > return; > } else { > DBG("Successfully authenticated request.\n"); > } > } > } catch (const AmDynInvoke::NotImplemented& ni) { > ERROR("not implemented DI function 'checkAuth'\n"); > } catch (const AmArg::OutOfBoundsException& oob) { > ERROR("out of bounds in DI call 'checkAuth'\n"); > } catch (const AmArg::TypeMismatchException& oob) { > ERROR("type mismatch in DI call checkAuth\n"); > } catch (...) { > ERROR("unexpected Exception in DI call checkAuth\n"); > } > } > } > > > > _______________________________________________ > Sems mailing list > [email protected] > http://lists.iptel.org/mailman/listinfo/sems > _______________________________________________ Sems mailing list [email protected] http://lists.iptel.org/mailman/listinfo/sems
