Re: [OpenSIPS-Users] $DLG_lifetime but in ms
On Tue, 2024-01-23 at 14:09 -0600, Marcin Groszek wrote: > I am not sure what would be less resource hungry; $Ts$Tsm v > get_accurate_time. > > get_accurate_time is a function v 2 core variables. > I guess a config can be created to run 100 million of both operation > and measuring resources used, cpu, ram and time to complete. > > This only makes sense only if you are calculating cost of the each > call in the script. > If not then just use external script to round/modifyduration based on > ms_duration in acc table after the fact. > Thanks Marcin, yes I think I may benchmark the 2 to see which is more efficeint, yes I am trying to bill inside of opensips using ratecacher module for this purpose. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] $DLG_lifetime but in ms
On Tue, 2024-01-23 at 19:59 +, Ben Newlin wrote: > > > A few people have mentioned this but I haven’t seen a response. Why > do you have to do this conversion in the script? The call duration in > ms is already included by default in every CDR. We are only talking > about rounding here, why wouldn’t your rating application do that for > you? That’s much less complex than adding an entirely new field just > so OpenSIPS can do the rounding. > > > Ben Newlin > Hi Benlin, Yes if you are rating out of opensips the ms_duration field and duration is already rounded for my liking, But I am not wanting to build an external billing engine, I want to use Rate cacher (meant to do simple billing inside opensips) thus need access to accurate time of dialogue. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] $DLG_lifetime but in ms
On Tue, 2024-01-23 at 09:25 -0600, Marcin Groszek wrote: > > If you are not calculating the cost of the call in the script it self > you may create external script to go over your acc table and use > "ms_duration" to adjust "duration" > > or use $Ts$Tsm at the beginning of the call, save it to a dialog and > compare it with same value at the end of the call, then round up and > write to acc table and/or calculate cost of the call. > > > > > On 1/23/2024 9:01 AM, Marcin Groszek wrote: > > > > use math_ceil > > > > 1.4.5. math_ceil(number, result_var) > > > > Truncates a number, always towards +infinity. This means that > > ceil(3.2) = 4.0 and ceil(-2.9) = -2.0 > > > > > > 1.10.3. $DLG_lifetime > > > > Returns the duration (in seconds)... Hi Marcin, Using math_ceil on $DLG_lifetime wont work as it returns seconds not ms. As for your other suggestion I am doing something similar just not sure its the most efficient I am using get_accurate_time would $ts$Tsm be a better approach, at 200OK in onreply route if ($rs == 200) { get_accurate_time($var(now_s), $var(now_us)); $dlg_val(start_s) = $var(now_s); $dlg_val(start_us) = $var(now_us); } then on BYE if (is_method("BYE")) { get_accurate_time($var(end_s), $var(end_us)); ts_usec_delta($(dlg_val(start_s){s.int}), $(dlg_val(start_us){s.int}), $var(end_s), $var(end_us) , $var(billed_duration)); $var(end_us) , $acc_extra(billed_duration)\n"); math_eval("$var(billed_duration) / 100", $var(billed_duration)); math_ceil($var(billed_duration),$var(billed_duration)); $acc_extra(billed_duration) = $var(billed_duration); ## Rate the call math_eval("$acc_extra(c_price) / 60 * $acc_extra(billed_duration)", $var(c_cost)); math_eval("$acc_extra(v_price) / 60 * $acc_extra(billed_duration)", $var(v_cost)); $acc_extra(cost) = $var(c_cost); $acc_extra(v_cost) = $var(v_cost); } Thanks. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] $DLG_lifetime but in ms
On Tue, 2024-01-23 at 05:44 -0600, Marcin Groszek wrote: > $avp(dlg_lifetime) is a read/ write variable and you can change its > value before acc is written. > > To round up the duration using minimum billing block and increments > you > need to save them first in to a dialog. > > this is the logic I use (opensips 3.1) > > if ($(DLG_lifetime{s.int}) > > $(dlg_val(minimum){s.int})) { > math_eval("$DLG_lifetime / $dlg_val(increment)", $avp(lifetime)); > math_ceil("$avp(lifetime)", $avp(dlg_total_increment)); > math_eval("$avp(dlg_total_increment) * $dlg_val(increment)", > $avp(dlg_lifetime)); > math_ceil("$avp(dlg_lifetime)",$avp(dlg_lifetime)); > } > else { > $avp(dlg_lifetime) = > $dlg_val(minimum); > } > > Hi Marcin, This only works for billing increments bigger than "1" I am implementing per second billing and $DLG_lifetime is a rounded to the nearest second, if a call duration is at 1001ms $DLG_Lifetime will return 1 I need to round up I need to bill anything past 1000ms to 2 seconds. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] $DLG_lifetime but in ms
On Thu, 2024-01-18 at 12:27 +0200, Răzvan Crainea wrote: > HI, Trevor! > > Unfortunately there is currently no way to round up the value, but > what > is unclear is why you need the extra billed_duration, and not simply > using the duration field. > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer / SIPhub CTO > http://www.opensips-solutions.com / https://www.siphub.com > > On 1/11/24 15:55, tre...@webon.co.za wrote: > > Hi Răzvan I am using rate cacher and want to calculate billing in script and am unable to use duration field as this is only inserted into DB and not available as a variable unless I missed something in the document :) Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] $DLG_lifetime but in ms
Hi All, I have a simple issue I need to solve but cant seem to fine a elegant way of resolving. I am using acc module + rate_cacher to do some simple billing. I use $DLG_lifetime but this value seems to be a rounded to the nearest second what I need is to round up to the nearest second similar to how ACC module calculates duration Here is an example CDR *** 1. row *** duration: 35 ms_duration: 34168 billed_duration: 34 As you can see duration is rounded up and billed_duration is rounded down. Is there any way to get access to the ms of the dialogue from any module, I could resort to initializing my own timers but there is already a timer running in the acc module and would be more efficient to just use it. Here is how I am creating billed_duration if (has_totag()) { if (is_method("BYE")) { if ($DLG_lifetime == 0) { $acc_extra(billed_duration) = 1; }else{ $acc_extra(billed_duration) = $DLG_lifetime; } } route(RELAY); exit; } Thanks Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Yum and Apt repos are down
On Thu, 2023-09-07 at 10:12 +0300, Răzvan Crainea wrote: > This has been fixed, can you please confirm, or let us know if the > problem still persists for you. > > Best regards, > > Răzvan Crainea > OpenSIPS Core Developer / SIPhub CTO > http://www.opensips-solutions.com / https://www.siphub.com > > On 9/6/23 14:01, tre...@webon.co.za wrote: > Hi confirmed its back up thanks so much Regards, Trevor ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Yum and Apt repos are down
Hi All, repo was working for me last night this morning I am getting 502 Bad Gateway from both? https://apt.opensips.org https://yum.opensips.org Regards Trevor ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-cp php versions supported
On Wed, 2023-09-06 at 05:25 +, r...@rvgeerligs.nl wrote: > Hi, > > I had the same. Had to work back towards PHP 7.4. There are very big > changes in syntax in 8.1. And it seems the OCP has not adapted its > sources. As you have also noticed, that is a lot of work. > > Regards, > > Ronald Thanks for the confirmation will have to stick to 7.4 then ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips-cp php versions supported
Hi Guys, Cant seem to find any info on what versions of PHP work with OCP, I just installed 9.3.2 on PHP 8.1 (Centos9 Stream) and other than login nothing was working every page would just display a blank body, checking php logs gives me a php exception every page load, switcing to php7.4 everything seems to be working so far. does OCP not support php 8.X? [05-Sep-2023 21:27:51 UTC] PHP Fatal error: Uncaught Error: Call to undefined function each() in /var/www/opensips- cp/web/tools/admin/boxes_config/template/menu.php:46 [05-Sep-2023 21:25:42 UTC] PHP Fatal error: Uncaught Error: Attempt to assign property "addresses" on null in /var/www/opensips- cp/config/tools/system/addresses/settings.inc.php:24 Thanks Trevor ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips + rtpproxy + SBC
HI Cedric, As i understand using modparam("rtpproxy", "rtpproxy_autobridge", 1) Will let rtpproxy figure out which interface it needs to be offering the session on based on the the IP address and port present in the command frame. Regards Trevor Steyn On 15/10/2015 17:26, Oceanet - Cédric BASSAGET wrote: > Hello Trevor, > I'm trying to understand how rtpproxy_autobridge works. > Actually I'm using rtpproxy + opensips in bridge mode ( -l > 10.0.95.10/public.ip.addr ) and calling rtpproxy_offer / > rtpproxy_answer with i/e params regarding where the request comes from > / goes to. > > Does autobridge makes it simplier ? > > Regards, > Cédric ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips + rtpproxy + SBC
Hi No you shouldn't have to ,but this depends on your rtpproxy version whether it support autobridge as i understand you have a custom forked rtpproxy. To be safe i would just use the "ie" as you have the control in the script to make the right decisions. Regards Trevor Steyn On 16/10/2015 16:40, Oceanet - Cédric BASSAGET wrote: > Hello Trevor, > > So do I still need to call rtpproxy_offer / rtpproxy_answer with i/e > params ? > > Regards, > Cédric > > OCEANET > --- > [AGENCE DU MANS] > 7, rue des Frênes > ZAC de la Pointe > 72190 SARGE LES LE MANS > [t] +33 (0)2.43.50.26.50 > [f] +33 (0)2.43.72.21.14 > > [AGENCE D'ANGERS] > 5, rue Fleming > Angers Technopole > 49066 ANGERS > [t] +33 (0)2.41.19.28.65 > [f] +33 (0)2.52.19.22.00 > > On 16/10/2015 15:14, Trevor Steyn wrote: >> HI Cedric, >> >> As i understand using >> >> modparam("rtpproxy", "rtpproxy_autobridge", 1) >> >> Will let rtpproxy figure out which interface it needs to be offering the >> session on based on the the IP address and port present in the command >> frame. >> >> Regards >> Trevor Steyn >> >> >> >> >> On 15/10/2015 17:26, Oceanet - Cédric BASSAGET wrote: >>> Hello Trevor, >>> I'm trying to understand how rtpproxy_autobridge works. >>> Actually I'm using rtpproxy + opensips in bridge mode ( -l >>> 10.0.95.10/public.ip.addr ) and calling rtpproxy_offer / >>> rtpproxy_answer with i/e params regarding where the request comes from >>> / goes to. >>> >>> Does autobridge makes it simplier ? >>> >>> Regards, >>> Cédric > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips no voice
Hi, Why are you using both mediaproxy and rtpproxy? If you plan on using both which is possible you should at least not let the rtp port ranges overlap. can you show us where you are using rtp relays on your routing scripts. Regards Trevor Steyn On 13/10/2015 08:48, chiu ching cheng wrote: > dear man : > > I have installed one opensips server with rtpproxy , mediaproxy ; When > I test call with two ua , the signal seems OK . but no voice in two ua > . I check the log ,it's seems no any error except > "ERROR:rtpproxy:force_rtp_proxy: Unable to parse body" . > > The debug level is 4 > > Does any idea for the reason ? firewall or something ? > > My configuration as follow : > > eth0 :172.31.18.253 eth0:1 :172.31.22.136 > > /usr/bin/rtpproxy -l 172.31.18.253 -s udp:127.0.0.1:9000 > <http://127.0.0.1:9000> -F -m 35000 -M 65000 > /usr/local/bin/media-dispatcher > /usr/local/bin/media-relay > > mediaproxy config.ini > dispatchers = 172.31.18.253 > port_range = 35000:6 > advertised_ip = public for 172.31.18.253 ( not show for security) > listen = 0.0.0.0 > listen_management = 0.0.0.0 > socket_path = /var/run/opensips/socket > > > > opensips.cfg > loadmodule "rtpproxy.so" > modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:9000") # CUSTOMIZE ME > > loadmodule "mediaproxy.so" > > #--- Default Values > modparam("mediaproxy", "mediaproxy_socket", > "/var/run/mediaproxy/dispatcher.sock") > modparam("mediaproxy", "mediaproxy_timeout", 500) > modparam("mediaproxy", "signaling_ip_avp", "$avp(nat_ip)") > modparam("mediaproxy", "media_relay_avp", "$avp(media_relay)") > > thanks > Best Regard > > JJ.chiou > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips + rtpproxy + SBC
Normally if you are in bridge mode you will use the "ie" flags which i dont see please can you post how you start rtpproxy. Regards Trevor Steyn On 01/10/2015 08:47, Raistlin Majere wrote: > Hi again, > > Well I have read a bit more about the modes and yes, we use brigde > mode as OpenSIPS is behind both sides of the NAT not only on the WAN > side, OpenSIPs is within the firewall, > > So basically the engage_rtp_proxy is not a good idea. > > route[1] { > if(!cache_fetch("local", "outerip_$var(destinationIp)", $avp(outerIp))) { > get_outer_ip("$var(destinationIp)", "$avp(outerIp)"); > cache_store("local", "outerip_$var(destinationIp)", "$avp(outerIp)", 10); > } > > $fs = $proto + ":" + $avp(outerIp); > > if (is_method("BYE|CANCEL")) { > unforce_rtp_proxy(); > } else if (is_method("INVITE")){ > if (has_body("application/sdp")) { > $var(trustconnectionip) = "%TRUSTCONNECTIONIP%"; > $var(ciptrusted) = "no"; > if ($var(trustconnectionip)=="yes") { > $var(ciptrusted) = "yes"; > } else if ($var(trustconnectionip)=="auto") { > $var(sdpc) = $(rb{sdp.line,c}{s.substr,9,0}); > if($td == $fd && $td != $var(sdpc)) { > $var(ciptrusted) = "yes"; > } > } > if ($var(ciptrusted)=="yes") { > rtpproxy_offer("focnr"); > } else { > rtpproxy_offer("focn"); > } > } > } > > # Prevent $var(destinationPort) from getting default port number 5060 > for TLS if no port specified in R-URI. > if($(ru{uri.port})=="" && $proto=="tls" && > $var(destinationPort)=="5060") { > $var(destinationPort) = 5061; > } > > # force the transport protocol to the same one the client used > $du = > "sip:"+$var(destinationIp)+":"+$var(destinationPort)+";transport="+$proto; > > t_on_reply("1"); > > # for INVITEs enable some additional helper routes > if (is_method("INVITE")) { > t_on_failure("1"); > } > > if (!t_relay()) { > xlog("L_INFO", "Relay error"); > sl_reply_error(); > } > exit; > } > > The route[1] is set in the main route under this conditions > > if (has_totag()) { > # sequential request within a dialog should > # take the path determined by record-routing > if (loose_route()) { > $var(destinationIp) = $avp(requestIp); > $var(destinationPort) = $rp; > > if (is_method("INVITE")) { > # even if in most of the cases is useless, do RR for > # re-INVITEs alos, as some buggy clients do change route set > # during the dialog. > record_route(); > } > # route it out to whatever destination was set by loose_route() > # in $du (destination URI). > route(1); > ... >exit; > } > > > And if there is no REGISTER, PUBLISH, CANCEL > > route(1); > } > > > > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips + rtpproxy + SBC
HI Raistlin, from your script we cannot see where you are setting t_on_reply routes as im sure this is where you are probably missing the rtpproxy_answer() but cannot see why as that part of the script is missing maybe you can also try use engage_rtp_proxy() and you wont have to worry about the answer and you could remove the reply routes and just relay if ($var(ciptrusted)=="yes") { engage_rtp_proxy("focnr"); } else { engage_rtpproxy("focn"); } Regards Trevor Steyn On 30/09/2015 14:56, Raistlin Majere wrote: > Hi, > > Recently the maintainer of the SIPs proxy in our company quit, and > well I'm the new in charge of this project, the bad new is I had 0 > experience with SIP. After some week I got my first case related to > our "SIP proxy". > > We are using OpenSIP 1.8 within our Firewall to handle the protocol > and the NAT that it will imply within a Firewall. The script my ex > coworker did is working in 99% of cases but this specific case. > > The customer has one setup like this > > > PhoneA > PhoneB > PhoneC --- Call Manager --- Firewall --- SBC --- Farm of RTP Media servers > > PhoneN > > The opensips instance is running within the firewall. The next IPs are > fake but follow the "rules" of internal/external it is just to avoid > problems > > Call Manager: 172.17.1.1 > Firewall: Internal Network 192.168.0.10 > Firewall: Extenal Network 62.1.1.10 > SBC: 210.200.100.100 > Farm of Media Servers: 210.200.100.128/25 <http://210.200.100.128/25> > > So the invite works as Expected but on the 180 Ringing either 200 OK > the moment the messages traverse the SIP proxy, doesn't contain the > "farm" IP but the SBC IP. > > This are the 180 Ringing: > > From SBC to the Firewall > > SIP/2.0 180 Ringing > Via: SIP/2.0/UDP 62.1.1.10:5060;branch=z9hG4bKd091.937a047.0 > Via: > SIP/2.0/UDP > 172.17.1.1:5060;rport=5060;received=172.17.1.1;branch=z9hG4bKac393424402 > From: <sip:5000@210.200.100.100 > <mailto:sip%3A5000@210.200.100.100>>;tag=1c393411873 > To: <sip:5001@210.200.100.100 > <mailto:sip%3A5001@210.200.100.100>;user=phone>;tag=gK08c71cc5 > Call-ID: 39341083229920151062@172.17.1.1 > <mailto:39341083229920151062@172.17.1.1> > CSeq: 1 INVITE > Record-Route: <sip:62.1.1.10:5060;r2=on;lr;did=6d8.933abaa6> > Record-Route: <sip:192.168.0.10:5060;r2=on;lr;did=6d8.933abaa6> > Contact: <sip:5001@210.200.100.100:5060 > <http://sip:5001@210.200.100.100:5060>> > Allow: > INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH > Require: 100rel > RSeq: 433990 > Content-Length: 266 > Content-Disposition: session; handling=required > Content-Type: application/sdp > > v=0 > o=Sonus_UAC 176482 50736 IN IP4 210.200.100.100 > s=SIP Media Capabilities > c=IN IP4 210.200.100.243 > t=0 0 > m=audio 61348 RTP/AVP 8 101 > a=rtpmap:8 PCMA/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=sendrecv > a=ptime:20 > a=silenceSupp:off - - - - > > After the firewall + Opensips have processed this message to the call > center > > SIP/2.0 180 Ringing > Via: SIP/2.0/UDP 172.17.1.1:5060;branch=z9hG4bKac393424402 > From: <sip:5000@210.200.100.100 > <mailto:sip%3A5000@210.200.100.100>>;tag=1c393411873 > To: <sip:5001@210.200.100.100 > <mailto:sip%3A5001@210.200.100.100>;user=phone>;tag=gK08c71cc5 > Call-ID: 39341083229920151062@172.17.1.1 > <mailto:39341083229920151062@172.17.1.1> > CSeq: 1 INVITE > Record-Route: <sip::62.1.1.10:5060;r2=on;lr;did=6d8.933abaa6> > Record-Route: <sip:192.168.0.10:5060;r2=on;lr;did=6d8.933abaa6> > Contact: <sip:5001@210.200.100.100 <mailto:sip%3A5001@210.200.100.100>> > Allow: > INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH > Require: 100rel > RSeq: 433990 > Content-Length: 295 > Content-Disposition: session; handling=required > Content-Type: application/sdp > > v=0 > o=Sonus_UAC 176482 50736 IN IP4 210.200.100.100 > s=SIP Media Capabilities > t=0 0 > m=audio 4845 RTP/AVP 8 101 > a=rtpmap:8 PCMA/8000 > a=rtpmap:101 telephone-event/8000 > a=fmtp:101 0-15 > a=sendrecv > a=ptime:20 > a=silenceSupp:off - - - - > a=nortpproxy:yes > c=IN IP4 210.200.100.100 > a=rtcp:4848 > > > > The RTP "acceptor" is created under the IP 210.200.100.100 instead of > the IP 210.200.243 as the SIPproxy is changing the SDP connection > information. > > > This is the logic we are using in our script for the INVITE and for > the onreply_route > > if (is_method("IN
Re: [OpenSIPS-Users] Opensips + rtpproxy + SBC
HI Jose, I was not aware its running in bridge mode, Could you post your how you start rtpproxy? also do you have the following in your module settings modparam("rtpproxy", "rtpproxy_autobridge", 1) I have a working config of bridgemode with rtpproxy will be happy to share it with you just want to confirm your setup. Regards Trevor Steyn also you dont use rtpproxy in re-invites this would cause re-invites to skip rtpproxy im sure this is a mistake. On 30/09/2015 17:05, Raistlin Majere wrote: > First of all thanks for your quick response. > > At the moment this is the point where we have the t_on_reply for that > onreply_route I sent in the previous email. > > route[1] { > if(!cache_fetch("local", "outerip_$var(destinationIp)", $avp(outerIp))) { > get_outer_ip("$var(destinationIp)", "$avp(outerIp)"); > cache_store("local", "outerip_$var(destinationIp)", "$avp(outerIp)", 10); > } > > $fs = $proto + ":" + $avp(outerIp); > > if (is_method("BYE|CANCEL")) { > unforce_rtp_proxy(); > } else if (is_method("INVITE")){ > if (has_body("application/sdp")) { > $var(trustconnectionip) = "%TRUSTCONNECTIONIP%"; > $var(ciptrusted) = "no"; > if ($var(trustconnectionip)=="yes") { > $var(ciptrusted) = "yes"; > } else if ($var(trustconnectionip)=="auto") { > $var(sdpc) = $(rb{sdp.line,c}{s.substr,9,0}); > if($td == $fd && $td != $var(sdpc)) { > $var(ciptrusted) = "yes"; > } > } > if ($var(ciptrusted)=="yes") { > rtpproxy_offer("focnr"); > } else { > rtpproxy_offer("focn"); > } > } > } > > # Prevent $var(destinationPort) from getting default port number 5060 > for TLS if no port specified in R-URI. > if($(ru{uri.port})=="" && $proto=="tls" && > $var(destinationPort)=="5060") { > $var(destinationPort) = 5061; > } > > # force the transport protocol to the same one the client used > $du = > "sip:"+$var(destinationIp)+":"+$var(destinationPort)+";transport="+$proto; > > t_on_reply("1"); > > # for INVITEs enable some additional helper routes > if (is_method("INVITE")) { > t_on_failure("1"); > } > > if (!t_relay()) { > xlog("L_INFO", "Relay error"); > sl_reply_error(); > } > exit; > } > > The route[1] is set in the main route under this conditions > > if (has_totag()) { > # sequential request within a dialog should > # take the path determined by record-routing > if (loose_route()) { > $var(destinationIp) = $avp(requestIp); > $var(destinationPort) = $rp; > > if (is_method("INVITE")) { > # even if in most of the cases is useless, do RR for > # re-INVITEs alos, as some buggy clients do change route set > # during the dialog. > record_route(); > } > # route it out to whatever destination was set by loose_route() > # in $du (destination URI). > route(1); > ... >exit; > } > > > And if there is no REGISTER, PUBLISH, CANCEL > > route(1); > } > > About the engage_rtp_proxy I was actually thinking about it but I'm a > bit scared because of the bridge mode, as it is a "generic" script, I > need to identify all this cases and create configuration cases to make > scripts automatically for those setups. > > Srly, thanks for the response >.< I have only 1 week experience with > this protocol and I'm having nightmares already. > > Kind regards > Jose Palma > > 2015-09-30 16:51 GMT+02:00 Trevor Steyn <tre...@webon.co.za > <mailto:tre...@webon.co.za>>: > > HI Raistlin, > > from your script we cannot see where you are setting t_on_reply > routes as im sure this is where you are probably missing the > rtpproxy_answer() but cannot see why as that part of the script is > missing > > > maybe you can also try use engage_rtp_proxy() and you wont have to > worry about the answer and you could remove the reply routes and > just relay > > if ($var(ciptrusted)=="yes") { > engage_rtp_proxy("focnr"); > } else { > engage_rtpproxy("focn"); > } > > Regards > Trevor Steyn > > > > > > On 30/09/2015 14:56, Raistlin Majere wrote: >> Hi, >> >> Recently the maintainer of the SIPs proxy in our company quit, >> and well I'm the new in charge of this project, the bad new is I >> had 0 experience with SIP. After some week I got my first case >&g
Re: [OpenSIPS-Users] What rtpproxy version should i be using
Hi Peter, I am using the 1.2.1 from epel, This version makes CPU usage go to 100% and stay's there consistently which is worrying. Is there a problem with the one from epel? Regards Trevor Steyn On 14/08/2015 15:00, Peter Lemenkov wrote: Hello All! I'd say stay with 1.2.1 if unsure / if something goes wrong with 2.x.x Btw are you using rtpproxy from EPEL repository or you compiled it by yourself? 2015-08-14 15:53 GMT+03:00 Trevor Steyn tre...@webon.co.za: Hi Opensips Users, I am running opensips 2.1 and am having some issues with rtpproxy I have tried both 1.2.1 and 2.0.0 with different results. Keep in mind i am using rtpproxy in bridge mode and using the re-packetization feauture also both IP's in the bridge are on the same physical interface just on differant vlans. My OS is Cenots 6 1.2.1 Works great the only issue i see is 100% CPU usage i have not had any bad quality with this version its just very worrying seeing 100% CPU usage all the time. 2.0.0 The CPU issue is resolved almost no CPU usage with a bunch of calls but when i turn on re-packetization the quality of the audio stream is terrible. I would like to choose a version and work on the issues alternativly if there is another version recommended for opensips i would like to go that route, I see there is a version on opensips.org http://opensips.org/pub/rtpproxy/ But this version seems very old and Readme states its for Opnesips 1.6.4. Any guidance on my issues would be very much appreciated. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] What rtpproxy version should i be using
Hi Opensips Users, I am running opensips 2.1 and am having some issues with rtpproxy I have tried both 1.2.1 and 2.0.0 with different results. Keep in mind i am using rtpproxy in bridge mode and using the re-packetization feauture also both IP's in the bridge are on the same physical interface just on differant vlans. My OS is Cenots 6 1.2.1 Works great the only issue i see is 100% CPU usage i have not had any bad quality with this version its just very worrying seeing 100% CPU usage all the time. 2.0.0 The CPU issue is resolved almost no CPU usage with a bunch of calls but when i turn on re-packetization the quality of the audio stream is terrible. I would like to choose a version and work on the issues alternativly if there is another version recommended for opensips i would like to go that route, I see there is a version on opensips.org http://opensips.org/pub/rtpproxy/ But this version seems very old and Readme states its for Opnesips 1.6.4. Any guidance on my issues would be very much appreciated. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Managing Concurrent Calls
Hi The permissions module does this. The standard trunking script has support for limiting channels. Regards Trevor Steyn On 13 Aug 2015 6:14 PM, Terrance Devor ter.de...@gmail.com wrote: Hello Everyone, Was wondering what is the preferred and current means of managing concurrent calls per client IP address. I am thinking it has to do with the Dialog module however there is no number of channels field there. If we can take advantage of caching mechanism it would be great however, I think dialog table is constantly queried? Thanks in Advance, Terrance. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Routing Based on $si and $Ri
Ho Bogdan, Thanks for this just want to make sure i am doing this the right way So im my thinking i have the following tables in dialplan *** 1. row *** id: 6 dpid: 1 pr: 1 match_op: 0 match_exp: 196.2.97.165_41.213.100.100 match_flags: 0 subst_exp: repl_exp: timerec: disabled: 0 attrs: route=2,forced_socket=41.213.100.200 *** 2. row *** id: 4 dpid: 1 pr: 1 match_op: 0 match_exp: 196.2.97.165_41.213.100.200 match_flags: 0 subst_exp: repl_exp: \2 timerec: disabled: 0 attrs: route=1,forced_socket=41.213.100.100 In my script I will have something like this if (dp_translate(1,/$si+_+$Ri,$avp(foo)) { Do some routing } Is this the way you envisioned doing this, Also what is the correct way to to get seperate AVP's for the attributes column i have not been able to find the answer to this i currently manually get the attributes avp Lets say my attributes column has the following route=1;somethingelse=random I currently get the route by using avp_subst like so avp_subst($avp(foo)/$avp(string_custom_route)/, '/.*Route=[^]*([^]*).*/\1/'); then i use ///$avp(string_custom_route)/ to route the call, I feel like this is not good practice if you could guide me here i would appreciate it as i have tried finding examples with no avail. Regards Trevor Steyn / On 05/08/2015 09:50, Bogdan-Andrei Iancu wrote: Hi Trevor, Why not using the dialplan module which allows you do operate with custom data, it does regexp search and caching too. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.08.2015 21:32, Trevor Steyn wrote: Hi All, I would like to be able to route calls based on Source IP and Destination IP (always one of opensips IPs), As usual there are many ways to skin a cat, My first thought was to have a table such as the address table but modify the IP field to a concatenation of $si and $RI so you would have a table like this *** 1. row *** id: 6 grp: 1 ip: 196.2.97.165_41.213.100.100 mask: 32 port: 0 proto: udp pattern: context_info: Route=2;Forced_Socket=41.213.100.200 So in the route script i would do something like this /check_cource_address(1,$si+_+$Ri) / Obviously i cannot just do this with the permissions module as it wont accept this in the IP field as it expects a valid IP, So before i go down that road i was wondering if anyone knows an out of the box way i can do this without impacting performance, I could easily use avp_ops for this but as far as i can see it does a db query for every transaction, this is not something that needs to be called for every new sip transaction it should be loaded into memory at startup. Your thoughts would be appreciated I would just like to be pointed in the right (Best possible way to do this) direction. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Routing Based on $si and $Ri
Thanks Bogdan, You have been a great help this is way better and cleaner way than what i was going towards. And thanks for the great project. Regards Trevor Steyn On 05/08/2015 12:17, Bogdan-Andrei Iancu wrote: Hi Trevor, The proper (as syntax) way of doing the lookup should be: dp_translate(1,$si_$Ri/$var(out),$avp(foo)) Also, instead of using the attr, you can use directly the repl_exp to return some value. In terms of processing and unpacking the returned value, better use transformations. And to really simplify things, use ';' as separator rather than ',' (to have a string similar to a list of parameters: attrs: route=2;forced_socket=41.213.100.200 $var(my_route) = $(avp(foo){param.value,route}); See: http://www.opensips.org/Documentation/Script-Tran-2-1#toc52 Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 05.08.2015 12:44, Trevor Steyn wrote: Ho Bogdan, Thanks for this just want to make sure i am doing this the right way So im my thinking i have the following tables in dialplan *** 1. row *** id: 6 dpid: 1 pr: 1 match_op: 0 match_exp: 196.2.97.165_41.213.100.100 match_flags: 0 subst_exp: repl_exp: timerec: disabled: 0 attrs: route=2,forced_socket=41.213.100.200 *** 2. row *** id: 4 dpid: 1 pr: 1 match_op: 0 match_exp: 196.2.97.165_41.213.100.200 match_flags: 0 subst_exp: repl_exp: \2 timerec: disabled: 0 attrs: route=1,forced_socket=41.213.100.100 In my script I will have something like this if (dp_translate(1,/$si+_+$Ri,$avp(foo)) { Do some routing } Is this the way you envisioned doing this, Also what is the correct way to to get seperate AVP's for the attributes column i have not been able to find the answer to this i currently manually get the attributes avp Lets say my attributes column has the following route=1;somethingelse=random I currently get the route by using avp_subst like so avp_subst($avp(foo)/$avp(string_custom_route)/, '/.*Route=[^]*([^]*).*/\1/'); then i use ///$avp(string_custom_route)/ to route the call, I feel like this is not good practice if you could guide me here i would appreciate it as i have tried finding examples with no avail. Regards Trevor Steyn / On 05/08/2015 09:50, Bogdan-Andrei Iancu wrote: Hi Trevor, Why not using the dialplan module which allows you do operate with custom data, it does regexp search and caching too. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 04.08.2015 21:32, Trevor Steyn wrote: Hi All, I would like to be able to route calls based on Source IP and Destination IP (always one of opensips IPs), As usual there are many ways to skin a cat, My first thought was to have a table such as the address table but modify the IP field to a concatenation of $si and $RI so you would have a table like this *** 1. row *** id: 6 grp: 1 ip: 196.2.97.165_41.213.100.100 mask: 32 port: 0 proto: udp pattern: context_info: Route=2;Forced_Socket=41.213.100.200 So in the route script i would do something like this /check_cource_address(1,$si+_+$Ri) / Obviously i cannot just do this with the permissions module as it wont accept this in the IP field as it expects a valid IP, So before i go down that road i was wondering if anyone knows an out of the box way i can do this without impacting performance, I could easily use avp_ops for this but as far as i can see it does a db query for every transaction, this is not something that needs to be called for every new sip transaction it should be loaded into memory at startup. Your thoughts would be appreciated I would just like to be pointed in the right (Best possible way to do this) direction. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Routing Based on $si and $Ri
Hi All, I would like to be able to route calls based on Source IP and Destination IP (always one of opensips IPs), As usual there are many ways to skin a cat, My first thought was to have a table such as the address table but modify the IP field to a concatenation of $si and $RI so you would have a table like this *** 1. row *** id: 6 grp: 1 ip: 196.2.97.165_41.213.100.100 mask: 32 port: 0 proto: udp pattern: context_info: Route=2;Forced_Socket=41.213.100.200 So in the route script i would do something like this /check_cource_address(1,$si+_+$Ri) / Obviously i cannot just do this with the permissions module as it wont accept this in the IP field as it expects a valid IP, So before i go down that road i was wondering if anyone knows an out of the box way i can do this without impacting performance, I could easily use avp_ops for this but as far as i can see it does a db query for every transaction, this is not something that needs to be called for every new sip transaction it should be loaded into memory at startup. Your thoughts would be appreciated I would just like to be pointed in the right (Best possible way to do this) direction. Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] With OpenSIPS-CP how to make a sip trunk between two opensips
HI Kevin. You have already added the ips to be trusted so all that needs to be done is the routing it depends how you want to do it but simplest from opensips-CP is probably the drouting module you can use prefix match to route to other sip server, On sip server 1 you would add a gateway in the dr_gatway table with the ip of the sip server 2 and add a rule like the following *** 1. row *** ruleid: 1 groupid: 1 prefix: 2000 timerec: priority: 0 routeid: gwlist: your_sip_server_2 attrs: DB Layout: http://www.opensips.org/html/docs/db/db-schema-devel.html#AEN3101 Drouting Module: http://www.opensips.org/html/docs/modules/2.1.x/drouting.html Regards Trevor Steyn On 23/07/2015 20:36, Kevin Kokos wrote: Hi All, First of all, i'm a noob in the sip environment, network and even more in opensips so please excuse my lack of accuracy/knowledge. Here is my goal, in a test purpose (yes it can be weird), i have the following installation: SIP client (1000, registered on OpenSips 1) --- OpenSips 1 (192.168.1.1) --- Opensips 2 (192.168.1.2) ---SIP client (2000, registered on OpenSips 2) The goal is for sip_client with account 1000 to be able to call sip_client with account 2000.It should be easy to do but i can't manage to configure it. Each OpenSips can be managed by Opensips-cp. From what i read, i saw the following step to do: -In the IP Auth tab, add the other sip server ip address in order to be trusted. =Both of sip server should be allowed to talk to each other. Is it enough for linking the two sip servers? -Make a dialplan. Use a prefix, create a dialplan which regex for identifying the prefix in the sip uri and add the ip address of the other sip server. =Let's choose 66 prefix for the Opensips 2 area. In dialing 661000 from sip client 2000, we can have something like that for the dialplan: matching regex: ^661000[0-9].* Matching flags 0 Substitution regex (66100[0-9])@.*(;.*) Replacement expression sip:\1@192.168.1.1 mailto:1@192.168.1.1 -Make a dynamic routing. Give the other sip server ip address and strip the prefix. In that case: Address: 192.168.1.1 Strip 2 PRI Prefix #66 Same thing in the opposite way on the other sip server. Someone could explain to me where i am wrong and/or maybe redirect me to a tutorial for dummies (wasn't able to find anything i understand in googling...maybe lake of good keyword) ? Thank you in advance. Kevin ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Fwd: opensips server dual network card configuration
Hi Kevin, I dont 100% understand what you want to achieve here? I assume you want something like this Private UAC Opensips Eth1 (private)Opensips Eth0 (public) -- Public UAC If you just want to route between the 2 networks you could look at enabling multi homed setting homed=1 or just use something like the following which I assume is less time consuming for opensips. if ( is_method(INVITE) src_ip==LOCAL_IP ) { force_send_socket(PUBLIC_IP); .. } you also need to make sure opensips is listening on the the other interface for traffic by adding another listen line in your global config listen=udp:NEW_IP:5060 Regards Trevor Steyn On 27/07/2015 15:47, kevinfang wrote: HI, I have a opensips servers in a private network, IP address: 10.34.14.24, now I'm going to this private network address 1: 1 NAT to public networks, and modify the opensips.cfg profile. Register now through the public network clients can conduct video and audio communications, and work very well. Now I need to add a network card (IP: 192.168.100.100) on opensips server, and directly connected to a sip client (IP: 192.168.100.200) through this card. How should I modify opensips.cfg, make public sip client the private network sip client to communicate it? Attach opensips.cfg I now use: # # $Id$ # # OpenSIPS residential configuration script # by OpenSIPS Solutions t...@opensips-solutions.com mailto:t...@opensips-solutions.com # # This script was generated via make menuconfig, from # the Residential scenario. # You can enable / disable more features / functionalities by # re-generating the scenario with different options.# # # Please refer to the Core CookBook at: # http://www.opensips.org/Resources/DocsCookbooks # for a explanation of possible statements, functions and parameters. # ### Global Parameters # debug=3 log_stderror=no log_facility=LOG_LOCAL0 fork=yes children=4 /* uncomment the following lines to enable debugging */ #debug=6 #fork=no #log_stderror=yes /* uncomment the next line to enable the auto temporary blacklisting of not available destinations (default disabled) */ #disable_dns_blacklist=no /* uncomment the next line to enable IPv6 lookup after IPv4 dns lookup failures (default disabled) */ #dns_try_ipv6=yes /* comment the next line to enable the auto discovery of local aliases based on revers DNS on IPs */ auto_aliases=no advertised_address=61.132.137.100 alias=61.132.137.100 listen=udp:10.34.14.24:5060 http://10.34.14.24:5060 # CUSTOMIZE ME #listen=udp:10.34.240.150:5060 http://10.34.240.150:5060 disable_tcp=yes disable_tls=yes ### Modules Section #set module path mpath=/usr/local/opensips/lib64/opensips/modules SIGNALING module loadmodule signaling.so StateLess module loadmodule sl.so Transaction Module loadmodule tm.so modparam(tm, fr_timer, 5) modparam(tm, fr_inv_timer, 30) modparam(tm, restart_fr_on_each_reply, 0) modparam(tm, onreply_avp_mode, 1) Record Route Module loadmodule rr.so /* do not append from tag to the RR (no need for this script) */ modparam(rr, append_fromtag, 0) MAX ForWarD module loadmodule maxfwd.so SIP MSG OPerationS module loadmodule sipmsgops.so FIFO Management Interface loadmodule mi_fifo.so modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) URI module loadmodule uri.so modparam(uri, use_uri_table, 0) USeR LOCation module loadmodule usrloc.so modparam(usrloc, nat_bflag, 10) modparam(usrloc, db_mode, 0) REGISTRAR module loadmodule registrar.so modparam(registrar, tcp_persistent_flag, 7) /* uncomment the next line not to allow more than 10 contacts per AOR */ #modparam(registrar, max_contacts, 10) ACCounting module loadmodule acc.so /* what special events should be accounted ? */ modparam(acc, early_media, 0) modparam(acc, report_cancels, 0) /* by default we do not adjust the direct of the sequential requests. if you enable this parameter, be sure the enable append_fromtag in rr module */ modparam(acc, detect_direction, 0) modparam(acc, failed_transaction_flag, 3) /* account triggers (flags) */ modparam(acc, log_flag, 1) modparam(acc, log_missed_flag, 2) ### Authenticated by MySQL ### loadmodule db_mysql.so loadmodule auth.so loadmodule auth_db.so modparam(usrloc, db_mode, 2) modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost/opensips) modparam(auth_db, calculate_ha1, yes) modparam(auth_db, password_column, password) modparam(auth_db, db_url, mysql://opensips:opensipsrw@localhost/opensips) modparam(auth_db, load_credentials, ) ### End Authentivated by MySQL ### loadmodule domain.so modparam(domain, db_url,mysql://opensips:opensipsrw@localhost/opensips) modparam(domain, db_mode, 1) # Use caching loadmodule nat_traversal.so modparam(nat_traversal, keepalive_interval, 90
Re: [OpenSIPS-Users] opensips-cp problem
Hi Ahmed, Have you set short_open_tag = On ; In your php.ini file? Also tailing your http error and access logs might give you some insight to your problem. Regards Trevor Steyn On 27/07/2015 16:15, alneami_ah...@yahoo.co.uk wrote: Hi all, Well I am a new to opensips and I have installed opensips for the third times so far, until now I can go to the opensips-cp in the web and putting admin and admin password then blank page came out meaning it will not take me to the main.php and menu.php etc... I am using opensips-2.1.0 and debain whzeey. opensips-cp 6.1 I had this problem for a month which I cant fix it. Any help will be appriciated .. Thanks and Regards Ahmed Alneami ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] topology hiding not accepting BYE before 200 OK
Hi Anyone have any ideas on the below issue? On 23/07/2015 17:12, Trevor Steyn wrote: Hi Guys, I seem to be having some trouble with the new topology_hiding module in opensips 2.1 here is the call scenario UAC -- Opensips -- UAS UAC Sends Invite to UAS with topology hiding module UAS sends 180 with to-tag UAC sends BYE When the Bye is sent opensips loops the call till max forwards is reached from what i can see from the debugs the Bye from UAC is accepted and matches the topology_hiding_match function but does not rewrite the destination IP so when the message passes t_relay() its sending the Bye to Itself from Itself. I have tried this without topology hiding and the BYE is relayed as it should . My route looks as follows route{ script_trace( 3, $rm from $si, ruri=$ru, me); if (!mf_process_maxfwd_header(10)) { sl_send_reply(483,Too Many Hops); exit; } if ( check_source_address(1,$avp(trunk_attrs)) ) { # request comes from trunks setflag(IS_TRUNK); } else if ( is_from_gw() ) { # request comes from GWs } else { #send_reply(403,Forbidden); xlog(Message is not from Trunk or GW $si); #exit; } if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing #if (loose_route()) { if(topology_hiding_match()) { # validate the sequential request against dialog if ( $DLG_status!=NULL !validate_dialog() ) { xlog(In-Dialog $rm from $si (callid=$ci) is not valid according to dialog\n); ## exit; } if (is_method(BYE)) { setflag(ACC_DO); # do accounting ... setflag(ACC_FAILED); # ... even if the transaction fails } else if (is_method(INVITE)) { # even if in most of the cases is useless, do RR for # re-INVITEs alos, as some buggy clients do change route set # during the dialog. record_route(); } # lets handle re-invites and offer proxy if (has_body(application/sdp)) { # Begin rtp session update gyrations if (method == INVITE) { # INVITE w/ SDP, so early neg # This is offer, reply is answer rtpproxy_offer(iewlz20); t_on_reply(1); } else if (method == ACK) { # ACK w/ SDP, so late neg (done now) # This is answer rtpproxy_answer(iewlz20); } } # route it out to whatever destination was set by loose_route() # in $du (destination URI). route(RELAY); } else { if ( is_method(ACK) ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after # a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction - # ignore and discard exit; } } sl_send_reply(404,Not here); } exit; } INITIAL REQUESTS if ( !isflagset(IS_TRUNK) ) { ## accept new calls only from trunks send_reply(403,Not from trunk); exit; } # CANCEL processing if (is_method(CANCEL)) { if (t_check_trans()) t_relay(); exit; } else if (!is_method(INVITE)) { send_reply(405,Method Not Allowed); exit; } if ($rU==NULL) { # request with no Username in RURI sl_send_reply(484,Address Incomplete); exit; } t_check_trans(); # preloaded route checking if (loose_route()) { xlog(L_ERR, Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]); if (!is_method(ACK)) sl_send_reply(403,Preload Route denied); exit; } # record routing record_route(); setflag(ACC_DO); # do accounting # create dialog with timeout if ( !create_dialog(B) ) { send_reply(500,Internal Server Error); exit; } if (is_avp_set($avp(trunk_attrs)) $avp(trunk_attrs)=~^[0-9]+$) { get_profile_size(trunkCalls,$si,$var(size)); if ( $(var(size){s.int}) = $(avp(trunk_attrs){s.int}) ) { send_reply(486,Busy Here); exit; } } set_dlg_profile(trunkCalls,$si); # apply transformations from dialplan table dp_translate(0,$rU/$rU); # route calls based on prefix if ( !do_routing(1
[OpenSIPS-Users] topology hiding not accepting BYE before 200 OK
;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:permissions:check_src_addr_3: Looking for : 1, 10.10.16.2, 5060, 1 in tables Jul 23 16:01:16 [22780] DBG:permissions:hash_match: no match in the hash table Jul 23 16:01:16 [22780] DBG:permissions:match_subnet_table: subnet table is empty [Script Trace][/etc/opensips/opensips.cfg:185][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:179][me][module is_from_gw] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:183][me][core xlog] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:core:buf_init: initializing... Message is not from Trunk or GW 10.10.16.2[Script Trace][/etc/opensips/opensips.cfg:248][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:187][me][module has_totag] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:uri:has_totag: totag found [Script Trace][/etc/opensips/opensips.cfg:242][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:191][me][module topology_hiding_match] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:core:parse_headers: flags=200 Jul 23 16:01:16 [22780] DBG:core:get_hdr_field: content_length=0 Jul 23 16:01:16 [22780] DBG:core:get_hdr_field: found end of header Jul 23 16:01:16 [22780] DBG:core:grep_sock_info: checking if host==us: 13==13 [10.10.16.2] == [10.10.16.2] Jul 23 16:01:16 [22780] DBG:core:grep_sock_info: checking if port 5060 matches port 5060 Jul 23 16:01:16 [22780] DBG:dialog:w_match_dialog: We found DID param in R-URI with value of dbf.d239f4f3 Jul 23 16:01:16 [22780] DBG:dialog:dlg_onroute: route param is 'dbf.d239f4f3' (len=12) Jul 23 16:01:16 [22780] DBG:dialog:lookup_dlg: ref dlg 0x7f81e1b3c2f8 with 1 - 5 Jul 23 16:01:16 [22780] DBG:dialog:lookup_dlg: dialog id=1062179629 found on entry 4029 Jul 23 16:01:16 [22780] DBG:core:parse_headers: flags=58 Jul 23 16:01:16 [22780] DBG:core:parse_to_param: tag=SDl3i7c02-55B0F3A1-1DDB4E1-0ADE2C1B Jul 23 16:01:16 [22780] DBG:core:parse_to: end of header reached, state=29 Jul 23 16:01:16 [22780] DBG:core:parse_to: display={}, ruri={sip:27115138000@10.10.17.55;user=phone} Jul 23 16:01:16 [22780] DBG:dialog:next_state_dlg: dialog 0x7f81e1b3c2f8 changed from state 2 to state 2, due event 7 [Script Trace][/etc/opensips/opensips.cfg:199][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Trevor [Script Trace][/etc/opensips/opensips.cfg:194][me][module validate_dialog] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:dialog:dlg_validate_dialog: CSEQ validation passed [Script Trace][/etc/opensips/opensips.cfg:210][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:199][me][module is_method] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:200][me][core setflag] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:201][me][core setflag] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:227][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:210][me][module has_body] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:sipmsgops:has_body_f: content length is zero [Script Trace][/etc/opensips/opensips.cfg:227][me][route RELAY] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:340][me][core if] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) [Script Trace][/etc/opensips/opensips.cfg:338][me][module t_relay] - (BYE from 10.10.16.2, ruri=sip:10.10.16.2;did=dbf.d239f4f3) Jul 23 16:01:16 [22780] DBG:tm:t_newtran: transaction on entrance=0x Jul 23 16:01:16 [22780] DBG:core:parse_headers: flags= Jul 23 16:01:16 [22780] DBG:core:parse_headers: flags=78 Jul 23 16:01:16 [22780] DBG:tm:t_lookup_request: start searching: hash=40946, isACK=0 Jul 23 16:01:16 [22780] DBG:tm:matching_3261: RFC3261 transaction matching failed Jul 23 16:01:16 [22780] DBG:tm:t_lookup_request: no transaction found Jul 23 16:01:16 [22780] DBG:tm:run_reqin_callbacks: trans=0x7f81e1b446a0, callback type 1, id 1 entered Jul 23 16:01:16 [22780] DBG:core:parse_headers: flags=78 Jul 23 16:01:16 [22780] DBG:tm:run_reqin_callbacks: trans=0x7f81e1b446a0, callback type 1, id 0 entered Jul 23 16:01:16 [22780] DBG:dialog:ref_dlg: ref dlg 0x7f81e1b3c2f8 with 1 - 6 Jul 23 16:01:16 [22780] DBG:core:mk_proxy: doing DNS lookup... Jul 23 16:01:16 [22780] DBG:core:check_ip_address: params
Re: [OpenSIPS-Users] changing $rU number
Documentation can be found here http://www.opensips.org/html/docs/modules/1.10.x/dialplan.html For egsample to remove all - characters in $rU do the following Add the following into the dialplan table mysql select * from dialplan\G; *** 1. row *** id: 6 dpid: 1 pr: 98 match_op: 0 match_exp: - match_flags: 0 subst_exp: repl_exp: timerec: disabled: 0 attrs: *** 2. row *** Then call dp_translate(1,$rU/$rU); in your script. Regards Trevor Steyn On 23/07/2015 10:51, dpa wrote: And how dialplan helps me to do it, if ,for example, one time I have such characters 8%2089-0987-09, and in another time I have 987-89%20908-1? *From:*users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Trevor Steyn *Sent:* Thursday, July 23, 2015 11:27 AM *To:* users@lists.opensips.org *Subject:* Re: [OpenSIPS-Users] changing $rU number Hi Denis You can use the dialplan module to rewrite variables as below dp_translate(1,$rU/$rU); Then insert you regexp into the dialplan tables, read the dialplan module documentation for more info. Regards Trevor On 23/07/2015 09:49, dpa wrote: Thank you. But what can I use for do it? *From:*users-boun...@lists.opensips.org mailto:users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Schneur Rosenberg *Sent:* Thursday, July 23, 2015 10:40 AM *To:* OpenSIPS users mailling list *Subject:* Re: [OpenSIPS-Users] changing $rU number $rU is read/write so you can use regexp and just rewrite the variable On Thu, Jul 23, 2015 at 10:33 AM, dpa denis7...@mail.ru mailto:denis7...@mail.ru wrote: Hello! Opensips 1.10. I am using DROUTING module from making routing. But some SIP UA sends to Opensips tel. number with some unnecessary characters, such as “%20” and “-”. The question is how can I delete these characters from request user? Thank you for any help. ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] RTP Delay when changing RTP Source port
HI Rik, I removed the all flags and it worked i got audio straight away i then re-added flags one by one to find the culprit seems the re-packetization was the issue when i add z20 there is that delay in audio, The debugs dont show much see below The issue is i really need RTP going to UAS to be at 20ms payload due to a vendor restriction, at least know i know where to look at i will dig into the re-packetization flag to see if i can learn more on why it would do this if you have any ideas please let me know. DBUG:get_command: received command 16653_6 UIEZ20c18,4,8,100,118 SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3 UAC_IP 53266 SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 INFO:handle_command: new session SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3, tag SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 requested, type strong INFO:handle_command: new session on a port 57596 created, tag SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 INFO:handle_command: pre-filling caller's address with 10.10.16.34:53266 INFO:handle_command: RTP packets from caller will be resized to 20 milliseconds DBUG:doreply: sending reply 16653_6 57596 EXT_IP DBUG:get_command: received command 16663_8 LEIZ20c18 SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3 UAS_IP 54274 SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 g56jcvtppqn2wxef.i;1 INFO:handle_command: lookup on ports 57596/33858, session timer restarted INFO:handle_command: pre-filling callee's address with 196.2.126.52:54274 INFO:handle_command: RTP packets from callee will be resized to 20 milliseconds DBUG:doreply: sending reply 16663_8 33858 INT_IP DBUG:get_command: received command 16660_5 LEIZ20c18,100 SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3 UAS_IP 53680 SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 g56jcvtppqn2wxef.i;1 INFO:handle_command: lookup on ports 57596/33858, session timer restarted INFO:handle_command: pre-filling callee's address with 196.2.126.52:53680 INFO:handle_command: RTP packets from callee will be resized to 20 milliseconds DBUG:doreply: sending reply 16660_5 33858 INT_IP DBUG:get_command: received command 16663_9 LEIZ20c18,8,100 SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3 UAS_IP 36606 SDurfbb02-55B0B333-1D600C7-0ADE2C1B;1 g56jcvtppqn2wxef.i;1 INFO:handle_command: lookup on ports 57596/33858, session timer restarted INFO:handle_command: pre-filling callee's address with 196.2.126.52:36606 INFO:handle_command: RTP packets from callee will be resized to 20 milliseconds DBUG:doreply: sending reply 16663_9 33858 INT_IP DBUG:get_command: received command 16658_5 D SDurfbb02-1ceee8fa17f07cf66cdcc9b4c851f49c-ctvvfv3 SDurfbb02-55B0B333-1D600C7-0ADE2C1B g56jcvtppqn2wxef.i INFO:handle_delete: forcefully deleting session 1 on ports 57596/33858 INFO:remove_session: RTP stats: 991 in from callee, 388 in from caller, 1781 relayed, 0 dropped INFO:remove_session: RTCP stats: 2 in from callee, 5 in from caller, 7 relayed, 0 dropped INFO:remove_session: session on ports 57596/33858 is cleaned up DBUG:doreply: sending reply 16658_5 0 Regards Trevor Steyn On 23/07/2015 10:28, Rik Broers wrote: Try it with only the ie flags, wz20 only adds more complexity in troubleshooting. What do the rtpproxy logs tell you? -Oorspronkelijk bericht- Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] Namens Trevor Steyn Verzonden: woensdag 22 juli 2015 21:04 Aan: users@lists.opensips.org Onderwerp: Re: [OpenSIPS-Users] RTP Delay when changing RTP Source port Hi Rik I have tried using rtpproxy_offer/answer functions with the same results, if (has_body(application/sdp)) { if (rtpproxy_offer('iewz20')) { t_on_reply(1); } else { t_on_reply(2); } } t_on_failure(GW_FAILOVER); route(RELAY); } onreply_route[1] { if (has_body(application/sdp)) rtpproxy_answer('eiwz20'); } onreply_route[2] { if (has_body(application/sdp)) rtpproxy_offer('iewz20'); } below you can see that Signalling and RTP flows. You will see rtpproxy only starts relaying packets ~10seconds later after the 200OK even though Callee is sending RTP http://salamander.iburst.co.za:8000/personal/signalling.txt Seems the issue here is when RTP stream is already established (183 with SDP) and the 200OK comes along with different source port it takes some time before RTP proxy relays the packets to caller. Regards Trevor On 22/07/2015 13:30, Rik Broers wrote: I think rtpproxy_engage doesnt work correct with the fact that you bridge internal to external. Also says in docs: ... Note that when used in bridge mode, this function might advertise wrong interfaces in SDP (due to the fact that OpenSIPS is not aware of the RTPProxy configuration), so you might face an undefined behavior. You could try and use the rtpproxy_offer and answer functions. put in the reply route an if (has_body
Re: [OpenSIPS-Users] changing $rU number
Hi Denis You can use the dialplan module to rewrite variables as below dp_translate(1,$rU/$rU); Then insert you regexp into the dialplan tables, read the dialplan module documentation for more info. Regards Trevor On 23/07/2015 09:49, dpa wrote: Thank you. But what can I use for do it? *From:*users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] *On Behalf Of *Schneur Rosenberg *Sent:* Thursday, July 23, 2015 10:40 AM *To:* OpenSIPS users mailling list *Subject:* Re: [OpenSIPS-Users] changing $rU number $rU is read/write so you can use regexp and just rewrite the variable On Thu, Jul 23, 2015 at 10:33 AM, dpa denis7...@mail.ru mailto:denis7...@mail.ru wrote: Hello! Opensips 1.10. I am using DROUTING module from making routing. But some SIP UA sends to Opensips tel. number with some unnecessary characters, such as “%20” and “-”. The question is how can I delete these characters from request user? Thank you for any help. ___ Users mailing list Users@lists.opensips.org mailto:Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] RTP Delay when changing RTP Source port
Hi Rik I have tried using rtpproxy_offer/answer functions with the same results, if (has_body(application/sdp)) { if (rtpproxy_offer('iewz20')) { t_on_reply(1); } else { t_on_reply(2); } } t_on_failure(GW_FAILOVER); route(RELAY); } onreply_route[1] { if (has_body(application/sdp)) rtpproxy_answer('eiwz20'); } onreply_route[2] { if (has_body(application/sdp)) rtpproxy_offer('iewz20'); } below you can see that Signalling and RTP flows. You will see rtpproxy only starts relaying packets ~10seconds later after the 200OK even though Callee is sending RTP http://salamander.iburst.co.za:8000/personal/signalling.txt Seems the issue here is when RTP stream is already established (183 with SDP) and the 200OK comes along with different source port it takes some time before RTP proxy relays the packets to caller. Regards Trevor On 22/07/2015 13:30, Rik Broers wrote: I think rtpproxy_engage doesnt work correct with the fact that you bridge internal to external. Also says in docs: ... Note that when used in bridge mode, this function might advertise wrong interfaces in SDP (due to the fact that OpenSIPS is not aware of the RTPProxy configuration), so you might face an undefined behavior. You could try and use the rtpproxy_offer and answer functions. put in the reply route an if (has_body(application/sdp)) to also catch the 183 with sdp .The docs have examples on how to use them and how to trigger on reply routes. Regards, Rik -Oorspronkelijk bericht- Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] Namens Trevor Steyn Verzonden: woensdag 22 juli 2015 9:52 Aan: users@lists.opensips.org Onderwerp: [OpenSIPS-Users] RTP Delay when changing RTP Source port Hi, All Still quite new to opensips I have the following configuration running on version: opensips 2.1.0 (x86_64/linux) flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535 poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. main.c compiled on 06:22:03 May 8 2015 with gcc 4.4.7 (Topology Hiding) UAC --- Opensips(Internal)Opensips(External) UAS (RTP PROXY BRIDGE) what i am experiencing is the following call is setup between UAC and UAS through opensips UAS sets up RTP with a 183 Session Progress message with SDP Shortly after we get a 180 ringing (i understand this is not correct but cannot be changed), When a 200OK is eventually sent the Source Port is different to what was in the SDP on the 183 message. Media starts flowing from UAS to opensips External from the new source port but for the first 7 seconds or so opensips/rtpproxy does not pass on this media to UAC from Internal. I run rtp proxy as follows rtpproxy -l Internal IP/External IP -s udp:127.0.0.1:12221 -m 25000 -M 65000 -F -d DBUG:LOCAL1 route{ #script_trace( 3, $rm from $si, ruri=$ru, me); if (!mf_process_maxfwd_header(10)) { sl_send_reply(483,Too Many Hops); exit; } if ( check_source_address(1,$avp(trunk_attrs)) ) { # request comes from trunks setflag(IS_TRUNK); } else if ( is_from_gw() ) { # request comes from GWs } else { send_reply(403,Forbidden); exit; } if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if(topology_hiding_match()) { # validate the sequential request against dialog if ( $DLG_status!=NULL !validate_dialog() ) { xlog(In-Dialog $rm from $si (callid=$ci) is not valid according to dialog\n); ## exit; } if (is_method(BYE)) { setflag(ACC_DO); # do accounting ... setflag(ACC_FAILED); # ... even if the transaction fails } else if (is_method(INVITE)) { # even if in most of the cases is useless, do RR for # re-INVITEs alos, as some buggy clients do change route set # during the dialog. record_route(); } route(RELAY); } else { if ( is_method(ACK) ) { if ( t_check_trans() ) { # non loose-route, but stateful ACK; must be an ACK after # a 487 or e.g. 404 from upstream server t_relay(); exit; } else { # ACK without matching transaction - # ignore and discard
[OpenSIPS-Users] RTP Delay when changing RTP Source port
); t_relay(); exit; } send_reply(500,All GW are down); } } local_route { if (is_method(BYE) $DLG_dir==UPSTREAM) { acc_log_request(200 Dialog Timeout); } } Below you can see the call flow http://salamander.iburst.co.za:8000/personal/signalling.txt I have tried a most of the options on rtpproxy_engage with no luck Regards Trevor Steyn ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Large resultset with avp_db_query
Lets work in the am. No need to work tonight. Trevor Francis (mobile) On Feb 20, 2013, at 8:05 PM, Brett Nemeroff br...@nemeroff.com wrote: Hello List, OpenSIP 1.8.2 v9777 I'm using avp_db_query to pull a cursor with a few hundred rows. I think loop over the results pulling the field in with this syntax $(avp(someval)[$var(i)]) This works great for 196 rows. Then it just dies. It doesn't process any more rows. No process death that I can see. I do this in a timer route and this is causing future items that also run in the timer route to not run (like additional avp_db_query processes). Has anyone else seen this? Thanks, Brett ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Crash in db_mysql
Here is the full trace:Program terminated with signal 11, Segmentation fault.#0 0x7f33ce3339b9 in db_mysql_val2bind (v=0x7f330fa18cc0, binds=0x7f33ce88cf00, i=33) at val.c:297297 *(binds[i].is_null) = 0;Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.7.x86_64 hiredis-0.10.1-3.el6.x86_64 json-c-0.10-2.el6.x86_64 keyutils-libs-1.4-4.el6.x86_64 krb5-libs-1.9-33.el6_3.3.x86_64 libcom_err-1.41.12-12.el6.x86_64 libmemcached-0.31-1.1.el6.x86_64 libselinux-2.0.94-5.3.el6.x86_64 mysql-libs-5.1.67-1.el6_3.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64 openssl-1.0.0-25.el6_3.1.x86_64 zlib-1.2.3-27.el6.x86_64(gdb) bt full#0 0x7f33ce3339b9 in db_mysql_val2bind (v=0x7f330fa18cc0, binds=0x7f33ce88cf00, i=33) at val.c:297t = value optimized outmt = value optimized out__FUNCTION__ = "db_mysql_val2bind"#1 0x7f33ce32d34c in db_mysql_do_prepared_query (conn=0x7f33ce88cd68, v=value optimized out, n=36, uv=value optimized out, un=0, query=0x7f33ce5477b0) at dbase.c:584i = 33j = value optimized outcode = value optimized outcols = value optimized outpq_ptr = 0x7f33ce88cec0ctx = 0x7f33ce88e310mysql_bind = 0x7f33ce88cf00start = {tv_sec = 139860479483003, tv_usec = 5334081}buffered_rows = 0x0#2 0x7f33ce32fcae in db_mysql_insert (_h=0x7f33ce88cd68, _k=0x7f330d73197b, _v=0x7f330fa188a0, _n=36) at dbase.c:1028ret = value optimized out#3 0x00517729 in flush_query_list () at db/db_insertq.c:133it = 0x7f330d7318a0my_ps = 0x7f33ce88cec0i = value optimized out__FUNCTION__ = "flush_query_list"#4 0x0051799c in handle_ql_shutdown () at db/db_insertq.c:170No locals.#5 0x0042c2c1 in cleanup (show_status=1) at main.c:347__FUNCTION__ = "cleanup"#6 0x0042cd8b in handle_sigs () at main.c:549chld = value optimized outchld_status = 139overall_status = 139i = value optimized outdo_exit = 1__FUNCTION__ = "handle_sigs"#7 0x00430a4c in main_loop (argc=value optimized out, argv=value optimized out) at main.c:1024i = value optimized outpid = value optimized outsi = value optimized outstartup_done = 0x7f3309db00b8chd_rank = 32rc = value optimized outload_p = 0x7f3309db00d8#8 main (argc=value optimized out, argv=value optimized out) at main.c:1557cfg_log_stderr = value optimized outcfg_stream = value optimized outc = value optimized outr = value optimized outtmp = 0x7fffd232688a ""tmp_len = value optimized outport = value optimized outproto = value optimized outoptions = 0x542498 "f:cCm:M:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:o:"ret = -1seed = 2451141921 rfd = value optimized out__FUNCTION__ = "main" TREVOR FRANCISCEOtre...@46labs.com720-214-3643 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Nosql CDR Storage
I am reading as of 1.8, there is Key value storage for caching values out of a cassandra, redis, etc database. Does that same functionality exist for the acc module, where CDRs can be written directly into Nosql databases? If not does the ACC module support ampq messaging for distributed CDR processing? Thanks in advance. TGF ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Centos 6 Segault
[root@storm1 /]# gdb opensips /core.7748 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-50.el6) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-redhat-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/local/sbin/opensips...done. BFD: Warning: /core.7748 is truncated: expected core file size = 1077735424, found: 871436288. [New Thread 7748] Cannot access memory at address 0x7f9f3aaff168 Cannot access memory at address 0x7f9f3aaff168 Cannot access memory at address 0x7f9f3aaff168 Cannot access memory at address 0x7f9f3aaff168 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Cannot access memory at address 0x7f9f3aaff168 Failed to read a valid object file image from memory. Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid -m 1024'. Program terminated with signal 11, Segmentation fault. #0 fixup_get_svalue (msg=0x7f9f39f75d98, gp=0x0, val=0x7fff4c1c9480) at mod_fix.c:913 913 if(gp-type==GPARAM_TYPE_STR) Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.9.x86_64 (gdb) bt full #0 fixup_get_svalue (msg=0x7f9f39f75d98, gp=0x0, val=0x7fff4c1c9480) at mod_fix.c:913 value = error reading variable value (Cannot access memory at address 0x7fff4c1c9430) __FUNCTION__ = fixup_get_svalue Cannot access memory at address 0x7fff4c1c9458 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Centos 6 Segault
I am able to replicate it on another Centos 6 instance: [root@Test3 /]# gdb opensips core.15257 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-50.el6) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-redhat-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/local/sbin/opensips...done. BFD: Warning: //core.15257 is truncated: expected core file size = 1077755904, found: 862928896. [New Thread 15257] Cannot access memory at address 0x7ffc4ef71168 Cannot access memory at address 0x7ffc4ef71168 Cannot access memory at address 0x7ffc4ef71168 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Failed to read a valid object file image from memory. Core was generated by `/usr/local/sbin/opensips -P /var/run/opensips.pid -m 1024'. Program terminated with signal 11, Segmentation fault. #0 fixup_get_svalue (msg=0x7ffc4e3e7bb0, gp=0x0, val=0x7fffe8708980) at mod_fix.c:913 913 if(gp-type==GPARAM_TYPE_STR) Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.9.x86_64 (gdb) bt full #0 fixup_get_svalue (msg=0x7ffc4e3e7bb0, gp=0x0, val=0x7fffe8708980) at mod_fix.c:913 value = error reading variable value (Cannot access memory at address 0x7fffe8708930) __FUNCTION__ = fixup_get_svalue Cannot access memory at address 0x7fffe8708958 (gdb) ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Centos 6 Segault
Just got done migrating an open sips instance over to Centos. Now it is segfaulting on me: Apr 11 23:55:46 storm1 kernel: opensips[27311]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 kernel: opensips[27313]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 abrt[27464]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 kernel: opensips[27314]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 abrt[27465]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 kernel: opensips[27333]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 abrt[27466]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 kernel: opensips[27334]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 abrt[27467]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 kernel: opensips[27336]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 kernel: opensips[27337]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 abrt[27468]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 abrt[27469]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:46 storm1 kernel: opensips[27339]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:46 storm1 kernel: opensips[27338]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:47 storm1 abrt[27470]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27471]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 kernel: opensips[27340]: segfault at 0 ip 004358dd sp 7fff60cd3350 error 4 in opensips[40+18c000] Apr 11 23:55:47 storm1 abrt[27472]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27473]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27474]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27475]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27476]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27477]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27478]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27479]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27480]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27481]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27482]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27483]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27484]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27485]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27486]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27487]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27488]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:47 storm1 abrt[27489]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:48 storm1 abrt[27490]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:48 storm1 abrt[27491]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:48 storm1 abrt[27492]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:48 storm1 abrt[27493]: not dumping repeating crash in '/usr/local/sbin/opensips' Apr 11 23:55:48 storm1 abrt[27494]: not dumping repeating crash in '/usr/local/sbin/opensips' Any thoughts? I am running 1.8. Trevor Francis ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Opensips-CP Dialplan Add Failure
Whenever I add a dialplan entry in Opensips-CP the following occurs: First dial plan enters correctly. Second dialplan removes all of the expressions and leaves them blank. I also get an error: mysql_real_escape_string() expects parameter 2 to be resource, object given in /var/www/opensips-cp/web/tools/system/dialplan/dialplan.php on line 289 undefined index: dialplan_id in /var/www/opensips-cp/web/tools/system/dialplan/template/dialplan.main.php on line 28, All other modules work correctly. Trevor Francis trevor.fran...@tgrahamcapital.com +1 (405) 757-7620 PO Box 54771 Oklahoma City, OK 73154 Personal Email: tfran...@fas.harvard.edu ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Opensips-CP Dialplan Add Failure
Fixed specifying database parameters into /config/tools/system/dialplan/db.inc.php. I thought they were included in the global params….evidently not. Trevor Francis trevor.fran...@tgrahamcapital.com +1 (405) 757-7620 PO Box 54771 Oklahoma City, OK 73154 Personal Email: tfran...@fas.harvard.edu ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] osipsconsole problem : adding gateways
Running into this error on latest stable version: Used database is mysql Warn fallback to local workdir ./mysql Retrieving data from table failedYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ip='50.56.xxx.xxx'' at line 1 Introducing the address rule 0 50.56.xxx.xxx 255.255.255.255 5060 UDP to the database failed You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '( grp, ip, mask, port, proto , context_info ) VALUES ( 0, '50.56.xxx.xxx', '255.25' at line 1 Any thoughts? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] osipsconsole problem : adding gateways
Good to talk to you again Brett. I trust Austin is pleasant this time of year. -- No spaces I removed the opensips database and re-created with opensipsdbctl and attempted to re-add the gateway. I can readd the gateway using opensipsctl but I cannot refresh the database. For that I had to use osipsconsole. I figured out the problem. For some reason, the opensips database was there, but the tables were not. Must have had a wonky setup when I originally did the db install. Anyway thanks for the assistance.. Cheers, TGF___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] osipsconsole problem : adding gateways
Alright, this is very strange. I can add gateways with opensipsctl but not osipsconsole. The config files are nearly exactly the same (ie. db connection details, etc.). Also, I can refresh the databases with osipsconsole, but not opensipsctl. Am I going crazy here? TGF___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] osipsconsole problem
I am getting these issues when launching osipsconsole: syntax error at /sbin/osipsconsole line 5632, near if syntax error at /sbin/osipsconsole line 5634, near } else syntax error at /sbin/osipsconsole line 5637, near } syntax error at /sbin/osipsconsole line 5649, near } syntax error at /sbin/osipsconsole line 5682, near } Can't use global @_ in my at /sbin/osipsconsole line 5692, near ( $#_ syntax error at /sbin/osipsconsole line 5806, near } Can't use global @_ in my at /sbin/osipsconsole line 5818, near ( $#_ syntax error at /sbin/osipsconsole line 5849, near } Can't use global @_ in my at /sbin/osipsconsole line 5857, near ( $#_ /sbin/osipsconsole has too many errors. They appear to be database errors, but I have configured osipsconsolerc to enable mysql databases. I am running head. TGF ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users