Re: [OpenSIPS-Users] Presence BLF with linksys SPA
On 02/03/10 19:04, vallimamod abdullah wrote: I am trying to implement presence with opensips 1.6.0-notls and linksys spa942 firmware 6.1.5(a). On the phone side, I have configured an idle line with blf (fnc=blf;sub=2...@$proxy;nme=2036) On server side, I am using the presence_dialoginfo.so and pua_dialoginfo.so modules as described on the tutorial (http://www.opensips.org/Resources/DocsPapPa.) When the phone starts, it sends SUBSCRIBE (Event: dialog) to the server and receives NOTIFY from it. But there is no PUBLISH so the light remain blinking orange. The relevant parts of sip traces and opensips config are attached (extension 4590 is monitoring extension 2036). Any hint for where I should look ? To get the light in green before there has been any call involved we ended up patching: http://sourceforge.net/tracker/?func=detailaid=2847397group_id=232389atid=1086412 At least that seemed to be the only way to make blf more usable with spa-9x2 phones. -- Angel Marin http://anmar.eu.org/ ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Access to statistics variables from within script
Paweł, this can be simpler done with an external script that runs on cron and periodically fetch the stats you need (via opensipsctl fifo get_statistics), dump the values somewhere and resets them (via opensipsctl fifo reset_statistics - http://www.opensips.org/Resources/DocsCoreMi16#toc11). The idea is to keep non-sip processing outside opensips - let opensips to its job with the SIP stuff and do other apps to take care of the side jobs (like CDRs, stats, etc). Do you think this will work for you ? Regards, Bogdan Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. Pawel, ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Asterisk and OpenSIPS load_balancer selected destination
Hello all, We are using asterisk as an outbound dialer and OpenSIPS for load balancing the calls between different SIP Gateways. Is there anyway to get the selected destination (by load_balancer) at asterisk end or may be from asterisk Manager Intergace or dialplan. The scenario is as follows, asterisk-OpenSIPSSIP Gateway selected by load_balancer. (I need the selected destination at asterisk) Regards, -- Rajib Deka Software Engineer Servion Global Solution Chennai, India Mobile No: + 91 80157 09130 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] rewritehost using avp
I have to rewrite host by a value that I extract from a DB, stored in an $avp, but the rewritehost function won't accpet it as it expects a string, I've checked the $avp type and it is a string, is there any way to go around this? The Error: Mar 2 14:45:11 [16996] CRITICAL:core:yyerror: parse error in config file, line 377, column 19-20: syntax error Mar 2 14:45:11 [16996] CRITICAL:core:yyerror: parse error in config file, line 377, column 34-35: bad argument, string expected For checking the type I get: AVP with string id IP and having String value exists The value of $avp(s:IP) is a valid IP address. The opensips.cfg relevant part: if(!avp_db_query(select value from usr_preferences where uuid='MTI' LIMIT 1,$avp(s:IP))){ exit; } else { if(is_avp_set($avp(s:IP)/s)) log(AVP with string id IP and having String value exists\n); if(is_avp_set($avp(s:IP)/n)) log(AVP with string id IP and having Int value exists\n); rewritehost($avp(s:IP)); } ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] rewritehost using avp
Hi Eldad, The rewritehost function does not accept variables. Better use directly the variables to set a new IP in RURI: $rd = $avp(s:IP); See: http://www.opensips.org/Resources/DocsCoreVar16#toc56 Regards, Bogdan Eldad Ran wrote: I have to rewrite host by a value that I extract from a DB, stored in an $avp, but the rewritehost function won't accpet it as it expects a string, I've checked the $avp type and it is a string, is there any way to go around this? The Error: Mar 2 14:45:11 [16996] CRITICAL:core:yyerror: parse error in config file, line 377, column 19-20: syntax error Mar 2 14:45:11 [16996] CRITICAL:core:yyerror: parse error in config file, line 377, column 34-35: bad argument, string expected For checking the type I get: AVP with string id IP and having String value exists The value of $avp(s:IP) is a valid IP address. The opensips.cfg relevant part: if(!avp_db_query(select value from usr_preferences where uuid='MTI' LIMIT 1,$avp(s:IP))){ exit; } else { if(is_avp_set($avp(s:IP)/s)) log(AVP with string id IP and having String value exists\n); if(is_avp_set($avp(s:IP)/n)) log(AVP with string id IP and having Int value exists\n); rewritehost($avp(s:IP)); } ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Users Digest, Vol 19, Issue 80
Hi, Thanks for your reply, I've copied dictionary.opensips to /etc/freeradius directory and added few lines in it after that when I make the call I'm getting this same error as mentioned in my previous mail earlier, I even copied the dictionary.freeradius to /etc/clientradius_ng directory as well. Lines for dictionary.opensips are listed below; Attributes ### ATTRIBUTE Sip-Uri-User 208 string # Proprietary, auth_radius ATTRIBUTE Sip-Group211 string # Proprietary, group_radius ATTRIBUTE Sip-Rpid 213 string # Proprietary, auth_radius ATTRIBUTE SIP-AVP 225 string # Proprietary, avp_radius ATTRIBUTE Sip-Method 101 integer ### Service-Type Values ### VALUE Service-Type Group-Check 12 # Proprietary, group_radius VALUE Service-Type Sip-Session 15 VALUE Service-Type SIP-Caller-AVPs 30 # Proprietary, avp_radius VALUE Service-Type SIP-Callee-AVPs 31 # Proprietary, avp_radius ### Sip-Method Values ### VALUE Sip-Method Undefined 0 VALUE Sip-Method Invite 1 VALUE Sip-Method Cancel 2 VALUE Sip-Method Ack4 VALUE Sip-Method Bye8 VALUE Sip-Method Info 16 VALUE Sip-Method Options32 VALUE Sip-Method Update 64 VALUE Sip-Method Register 128 VALUE Sip-Method Message256 VALUE Sip-Method Subscribe 512 VALUE Sip-Method Notify 1024 VALUE Sip-Method Prack 2048 VALUE Sip-Method Refer 4096 VALUE Sip-Method Other 8192 And my dictionary settings are listed below; dictionary(freeradius) $INCLUDE/opt/freeradius/share/freeradius/dictionary $INCLUDE/opt/freeradius/etc/raddb/dictionary.opensips dictionary(radiusclient) ##At the end of the line $INCLUDE /opt/freeradius/etc/raddb/dictionary.opensips Kindly tell me from which section I'm facing this problem. Waiting for your reply. Date: Fri, 26 Feb 2010 15:21:03 +0200 From: Andrew Pogrebennyk andrew.pogreben...@portaone.com Subject: Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius` To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: 4b87cabf.9000...@portaone.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 26.02.2010 14:33, Ahmed Munir wrote: Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:aaa_radius:rad_avp_add: failure Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:acc:acc_aaa_request: failed to add Source-IP, 13 And I also check table radacct in mysql database, no records are inserted into it. I think this means an incorrect RADIUS dictionary. You should verify that the extra attributes you have defined are present there. -- Sincerely, Andrew Pogrebennyk -- Regards, Ahmed Munir ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius
Hi, Thanks for your reply, I've copied dictionary.opensips to /etc/freeradius directory and added few lines in it after that when I make the call I'm getting this same error as mentioned in my previous mail earlier, I even copied the dictionary.freeradius to /etc/clientradius_ng directory as well. Lines for dictionary.opensips are listed below; Attributes ### ATTRIBUTE Sip-Uri-User 208 string # Proprietary, auth_radius ATTRIBUTE Sip-Group211 string # Proprietary, group_radius ATTRIBUTE Sip-Rpid 213 string # Proprietary, auth_radius ATTRIBUTE SIP-AVP 225 string # Proprietary, avp_radius ATTRIBUTE Sip-Method 101 integer ### Service-Type Values ### VALUE Service-Type Group-Check 12 # Proprietary, group_radius VALUE Service-Type Sip-Session 15 VALUE Service-Type SIP-Caller-AVPs 30 # Proprietary, avp_radius VALUE Service-Type SIP-Callee-AVPs 31 # Proprietary, avp_radius ### Sip-Method Values ### VALUE Sip-Method Undefined 0 VALUE Sip-Method Invite 1 VALUE Sip-Method Cancel 2 VALUE Sip-Method Ack4 VALUE Sip-Method Bye8 VALUE Sip-Method Info 16 VALUE Sip-Method Options32 VALUE Sip-Method Update 64 VALUE Sip-Method Register 128 VALUE Sip-Method Message256 VALUE Sip-Method Subscribe 512 VALUE Sip-Method Notify 1024 VALUE Sip-Method Prack 2048 VALUE Sip-Method Refer 4096 VALUE Sip-Method Other 8192 And my dictionary settings are listed below; dictionary(freeradius) $INCLUDE/opt/freeradius/share/freeradius/dictionary $INCLUDE/opt/freeradius/etc/raddb/dictionary.opensips dictionary(radiusclient) ##At the end of the line $INCLUDE /opt/freeradius/etc/raddb/dictionary.opensips Kindly tell me from which section I'm facing this problem. Waiting for your reply. Date: Fri, 26 Feb 2010 15:21:03 +0200 From: Andrew Pogrebennyk andrew.pogreben...@portaone.com Subject: Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius` To: OpenSIPS users mailling list users@lists.opensips.org Message-ID: 4b87cabf.9000...@portaone.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 26.02.2010 14:33, Ahmed Munir wrote: Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:aaa_radius:rad_avp_add: failure Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:acc:acc_aaa_request: failed to add Source-IP, 13 And I also check table radacct in mysql database, no records are inserted into it. I think this means an incorrect RADIUS dictionary. You should verify that the extra attributes you have defined are present there. -- Sincerely, Andrew Pogrebennyk -- Regards, Ahmed Munir ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Access to statistics variables from within script
Most likely this is where Bogdan is headed but, if you only want to increment and reset some variables in the script there are global vars available to do that with. cfgutils module. #first a var that is shared across all processes modparam(cfgutils, shvset, didtracker=i:0) #now one that will be unique to each process thread modparam(cfgutils, varset, threadtracker=s:0) Then in the script to, say, randomly select a from user: $avp(s:newfromheader) = $hdr(From); $avp(s:holder)=$shv(didtracker); $shv(didtracker)=$shv(didtracker) + 1; if( $shv(didtracker) == 5 ) $shv(didtracker)=0; $avp(s:offset)= 5 - $(avp(s:holder){s.len}); $var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) + $avp(s:holder); if( dp_translate(42, $var(matchup)/$var(matchup)) ) { $avp(s:newfromheader) = sip: + $var(matchup) + @ + $fd; #this could change again for oli tag or something so setflag(FLAG_CHANGED_FROMHEADER); #use flag to insure we only change from header once in t_relay route } Richard On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. Pawel,___ 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] Access to statistics variables from within script
Or you could do this too. : On Mar 4, 2010, at 5:48 AM, Bogdan-Andrei Iancu wrote: Paweł, this can be simpler done with an external script that runs on cron and periodically fetch the stats you need (via opensipsctl fifo get_statistics), dump the values somewhere and resets them (via opensipsctl fifo reset_statistics - http://www.opensips.org/Resources/DocsCoreMi16#toc11). The idea is to keep non-sip processing outside opensips - let opensips to its job with the SIP stuff and do other apps to take care of the side jobs (like CDRs, stats, etc). Do you think this will work for you ? Regards, Bogdan Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. Pawel, ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ 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] Access to statistics variables from within script
Hi Richard, 1 important comment here - the global vars are something more powerful than statistic vars. And of course, they come with more penalties. Operating with the global vars requires internal locking (over the variable) - this may lead to a general slowdown of opensips as all the procs will keep syncronizing over the lock for the this vars. The stat vars are using atomic ops (internally) and they do not require locking. just my 2 cents on this, Bogdan Richard Revels wrote: Most likely this is where Bogdan is headed but, if you only want to increment and reset some variables in the script there are global vars available to do that with. cfgutils module. #first a var that is shared across all processes modparam(cfgutils, shvset, didtracker=i:0) #now one that will be unique to each process thread modparam(cfgutils, varset, threadtracker=s:0) Then in the script to, say, randomly select a from user: $avp(s:newfromheader) = $hdr(From); $avp(s:holder)=$shv(didtracker); $shv(didtracker)=$shv(didtracker) + 1; if( $shv(didtracker) == 5 ) $shv(didtracker)=0; $avp(s:offset)= 5 - $(avp(s:holder){s.len}); $var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) + $avp(s:holder); if( dp_translate(42, $var(matchup)/$var(matchup)) ) { $avp(s:newfromheader) = sip: + $var(matchup) + @ + $fd; #this could change again for oli tag or something so setflag(FLAG_CHANGED_FROMHEADER); #use flag to insure we only change from header once in t_relay route } Richard On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. Pawel,___ 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 -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Access to statistics variables from within script
Good to remember. Thank you. I normally spend tons of time thinking about how and why I'm accessing the database and file system and no time thinking about how I'm manipulating variables in script. While we are on this subject, I've always wondered about something, but not enough to test it out. I had to modify the snippet below quite a bit before sending it due to the fact that I use m4 and let it convert strings to integer named avp's. One of the primary reasons I started using m4 was the warning in the docs about the speed difference of manipulating avp's with string names vs avp's with integer names and how using aliases on the avp's was a better idea. Do you know if any comparisons were ever done to quantify that difference? I'm wondering if the difference between reading, then modifying 1000 avp's using string vs integer would be like 10 milliseconds vs 1 second or 10 milliseconds vs 100 milliseconds. Like I say, this was never a big enough concern to make me test it out but if you know then I would like to know. : Richard On Mar 4, 2010, at 6:45 AM, Bogdan-Andrei Iancu wrote: Hi Richard, 1 important comment here - the global vars are something more powerful than statistic vars. And of course, they come with more penalties. Operating with the global vars requires internal locking (over the variable) - this may lead to a general slowdown of opensips as all the procs will keep syncronizing over the lock for the this vars. The stat vars are using atomic ops (internally) and they do not require locking. just my 2 cents on this, Bogdan Richard Revels wrote: Most likely this is where Bogdan is headed but, if you only want to increment and reset some variables in the script there are global vars available to do that with. cfgutils module. #first a var that is shared across all processes modparam(cfgutils, shvset, didtracker=i:0) #now one that will be unique to each process thread modparam(cfgutils, varset, threadtracker=s:0) Then in the script to, say, randomly select a from user: $avp(s:newfromheader) = $hdr(From); $avp(s:holder)=$shv(didtracker); $shv(didtracker)=$shv(didtracker) + 1; if( $shv(didtracker) == 5 ) $shv(didtracker)=0; $avp(s:offset)= 5 - $(avp(s:holder){s.len}); $var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) + $avp(s:holder); if( dp_translate(42, $var(matchup)/$var(matchup)) ) { $avp(s:newfromheader) = sip: + $var(matchup) + @ + $fd; #this could change again for oli tag or something so setflag(FLAG_CHANGED_FROMHEADER); #use flag to insure we only change from header once in t_relay route } Richard On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. Pawel,___ 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 -- Bogdan-Andrei Iancu www.voice-system.ro ___ 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] [RFC] What repo to use for 2.0 ?
Bogdan, Thanks for the link. I have to say after looking it over, git does look very nice. I do wonder, however, if conflict resolution is a bigger deal with a DVCS? -Brett On Wed, Mar 3, 2010 at 12:27 PM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi Brett, if you look here http://git.or.cz/course/svn.html, GIT and SVN (at least from user perspective) are very similar (as concepts and commands too). I would go for GIT (even if never used it so far), mainly because it is distributed - sometime SF is slow (when using from europe) and sometimes you want to keep private custom copies, but sync with the public version - of course, this is for developers :) Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] [RFC] What repo to use for 2.0 ?
Hey, I know this is outside of the scope of opensips.. but does git support keyword substitutions? Thanks, Brett On Tue, Mar 2, 2010 at 12:18 PM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: Hi everyone, As we are getting closed to first working code for OpenSIPS 2.0 (a proto core including config, transport, threading, reactor and dispatcher), we will upload the code the public SF repo. I would like to get some feedback from you about what repo type to use - as we have the opportunity to start a fresh new piece of code, we have the option to use a different repo than SVN. SF offers the following options - SVN - git - mercurial - bazaar Should we keep SVN ? pros ? minuses ? something much better ? Regards, Bogdan PS: should we create a poll on the project web site ? -- Bogdan-Andrei Iancu www.voice-system.ro ___ 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] Presence BLF with linksys SPA
On March 3, 2010 6:44:25 PM CEST, Ovidiu Sas o...@voipembedded.com wrote: You need to create a dialog for calls between users involved in dialog presence *and* you will also need mark the dialogs that will generate PUBLISH: dialoginfo_set(). See: http://www.opensips.org/html/docs/modules/1.6.x/pua_dialoginfo.html#id228322 Thank you Ovidiu for your answer. Your hint and Angel's patch (http://sourceforge.net/tracker/?func=detailaid=2847397group_id=232389atid=1086412 ) helped me a lot to go ahead with my issues. I am still having problems with PSTN incoming calls that I am currently debugging. Regards, - vma . ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Planning release 1.6.2
Hi all, Following the new release policy (see http://www.opensips.org/Development/Development), the next release is 1.6.2 - it will not be minor as it will include new enhancement (relative to 1.6.1 ) and not only bug fixes. The plan is to have the 1.6.2 out next Thursday (11st of March). We will start the work to : - fix the pending bugs - backport all news stuff from trunk Please report all issues / patches / reports asap, so that we can address them for the new release. Also, if anyone is aware of any major stopper, please let me know. Again, testing is welcome. Thanks and regards, Bogdan -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Asterisk and OpenSIPS load_balancer selected destination
Hi Rajib, First, if you send an email addressed to the list (with a new topic), please do not CC me personally ! Now, regarding to your question - Asterisk will see in the 200 OK that it will receive the IP of the GW in the contact hdr. This is by default, so nothing to change to have it. Regards, Bogdan rajib deka wrote: Hello all, We are using asterisk as an outbound dialer and OpenSIPS for load balancing the calls between different SIP Gateways. Is there anyway to get the selected destination (by load_balancer) at asterisk end or may be from asterisk Manager Intergace or dialplan. The scenario is as follows, asterisk-OpenSIPSSIP Gateway selected by load_balancer. (I need the selected destination at asterisk) Regards, -- Rajib Deka Software Engineer Servion Global Solution Chennai, India Mobile No: + 91 80157 09130 -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius
Hi Ahmed, Do you see in any RADIUS dictionary the Source-IP AVP ? if yes, please post here its definition. Regards, Bogdan Ahmed Munir wrote: Hi, Thanks for your reply, I've copied dictionary.opensips to /etc/freeradius directory and added few lines in it after that when I make the call I'm getting this same error as mentioned in my previous mail earlier, I even copied the dictionary.freeradius to /etc/clientradius_ng directory as well. Lines for dictionary.opensips are listed below; Attributes ### ATTRIBUTE Sip-Uri-User 208 string # Proprietary, auth_radius ATTRIBUTE Sip-Group211 string # Proprietary, group_radius ATTRIBUTE Sip-Rpid 213 string # Proprietary, auth_radius ATTRIBUTE SIP-AVP 225 string # Proprietary, avp_radius ATTRIBUTE Sip-Method 101 integer ### Service-Type Values ### VALUE Service-Type Group-Check 12 # Proprietary, group_radius VALUE Service-Type Sip-Session 15 VALUE Service-Type SIP-Caller-AVPs 30 # Proprietary, avp_radius VALUE Service-Type SIP-Callee-AVPs 31 # Proprietary, avp_radius ### Sip-Method Values ### VALUE Sip-Method Undefined 0 VALUE Sip-Method Invite 1 VALUE Sip-Method Cancel 2 VALUE Sip-Method Ack4 VALUE Sip-Method Bye8 VALUE Sip-Method Info 16 VALUE Sip-Method Options32 VALUE Sip-Method Update 64 VALUE Sip-Method Register 128 VALUE Sip-Method Message256 VALUE Sip-Method Subscribe 512 VALUE Sip-Method Notify 1024 VALUE Sip-Method Prack 2048 VALUE Sip-Method Refer 4096 VALUE Sip-Method Other 8192 And my dictionary settings are listed below; dictionary(freeradius) $INCLUDE/opt/freeradius/share/freeradius/dictionary $INCLUDE/opt/freeradius/etc/raddb/dictionary.opensips dictionary(radiusclient) ##At the end of the line $INCLUDE /opt/freeradius/etc/raddb/dictionary.opensips Kindly tell me from which section I'm facing this problem. Waiting for your reply. Date: Fri, 26 Feb 2010 15:21:03 +0200 From: Andrew Pogrebennyk andrew.pogreben...@portaone.com mailto:andrew.pogreben...@portaone.com Subject: Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius` To: OpenSIPS users mailling list users@lists.opensips.org mailto:users@lists.opensips.org Message-ID: 4b87cabf.9000...@portaone.com mailto:4b87cabf.9000...@portaone.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 26.02.2010 14:33, Ahmed Munir wrote: Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:aaa_radius:rad_avp_add: failure Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:acc:acc_aaa_request: failed to add Source-IP, 13 And I also check table radacct in mysql database, no records are inserted into it. I think this means an incorrect RADIUS dictionary. You should verify that the extra attributes you have defined are present there. -- Sincerely, Andrew Pogrebennyk -- Regards, Ahmed Munir ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Access to statistics variables from within script
Hi Richard, definitely there is a difference , but never tried to quantify it - of course, we can make a simple script to loop 10 times and search for an AVP in a list of 100 AVPs. But as searching for an AVP is pure CPU, the question is how relevant is this difference relative to a DB query duration or DNS lookup ;) Regards, Bogdan Richard Revels wrote: Good to remember. Thank you. I normally spend tons of time thinking about how and why I'm accessing the database and file system and no time thinking about how I'm manipulating variables in script. While we are on this subject, I've always wondered about something, but not enough to test it out. I had to modify the snippet below quite a bit before sending it due to the fact that I use m4 and let it convert strings to integer named avp's. One of the primary reasons I started using m4 was the warning in the docs about the speed difference of manipulating avp's with string names vs avp's with integer names and how using aliases on the avp's was a better idea. Do you know if any comparisons were ever done to quantify that difference? I'm wondering if the difference between reading, then modifying 1000 avp's using string vs integer would be like 10 milliseconds vs 1 second or 10 milliseconds vs 100 milliseconds. Like I say, this was never a big enough concern to make me test it out but if you know then I would like to know. : Richard On Mar 4, 2010, at 6:45 AM, Bogdan-Andrei Iancu wrote: Hi Richard, 1 important comment here - the global vars are something more powerful than statistic vars. And of course, they come with more penalties. Operating with the global vars requires internal locking (over the variable) - this may lead to a general slowdown of opensips as all the procs will keep syncronizing over the lock for the this vars. The stat vars are using atomic ops (internally) and they do not require locking. just my 2 cents on this, Bogdan Richard Revels wrote: Most likely this is where Bogdan is headed but, if you only want to increment and reset some variables in the script there are global vars available to do that with. cfgutils module. #first a var that is shared across all processes modparam(cfgutils, shvset, didtracker=i:0) #now one that will be unique to each process thread modparam(cfgutils, varset, threadtracker=s:0) Then in the script to, say, randomly select a from user: $avp(s:newfromheader) = $hdr(From); $avp(s:holder)=$shv(didtracker); $shv(didtracker)=$shv(didtracker) + 1; if( $shv(didtracker) == 5 ) $shv(didtracker)=0; $avp(s:offset)= 5 - $(avp(s:holder){s.len}); $var(matchup)=$(var(threadtracker){s.substr,0,$avp(s:offset)}) + $avp(s:holder); if( dp_translate(42, $var(matchup)/$var(matchup)) ) { $avp(s:newfromheader) = sip: + $var(matchup) + @ + $fd; #this could change again for oli tag or something so setflag(FLAG_CHANGED_FROMHEADER); #use flag to insure we only change from header once in t_relay route } Richard On Mar 3, 2010, at 7:56 PM, Paweł Pierścionek wrote: On 2010-03-03, at 19:20, Bogdan-Andrei Iancu wrote: Hi Pawel, for read, the stats vars are available only via the MI interface (the get_statistics function). do you want to read the stats from the statistics module only, or all of them? Nah, only the ones defined in my script/statistics module and log/print them and reset them in a timer route. -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius
I've got the following (among other attributes) defined in a local.dictionary file: ATTRIBUTE Source-IP 214 string If it's added to opensips.dictionary, then it no longer needs to be in my local.dictionary. Regards, Norm Bogdan-Andrei Iancu wrote: Hi Ahmed, Do you see in any RADIUS dictionary the Source-IP AVP ? if yes, please post here its definition. Regards, Bogdan Ahmed Munir wrote: Hi, Thanks for your reply, I've copied dictionary.opensips to /etc/freeradius directory and added few lines in it after that when I make the call I'm getting this same error as mentioned in my previous mail earlier, I even copied the dictionary.freeradius to /etc/clientradius_ng directory as well. Lines for dictionary.opensips are listed below; Attributes ### ATTRIBUTE Sip-Uri-User 208 string # Proprietary, auth_radius ATTRIBUTE Sip-Group211 string # Proprietary, group_radius ATTRIBUTE Sip-Rpid 213 string # Proprietary, auth_radius ATTRIBUTE SIP-AVP 225 string # Proprietary, avp_radius ATTRIBUTE Sip-Method 101 integer ### Service-Type Values ### VALUE Service-Type Group-Check 12 # Proprietary, group_radius VALUE Service-Type Sip-Session 15 VALUE Service-Type SIP-Caller-AVPs 30 # Proprietary, avp_radius VALUE Service-Type SIP-Callee-AVPs 31 # Proprietary, avp_radius ### Sip-Method Values ### VALUE Sip-Method Undefined 0 VALUE Sip-Method Invite 1 VALUE Sip-Method Cancel 2 VALUE Sip-Method Ack4 VALUE Sip-Method Bye8 VALUE Sip-Method Info 16 VALUE Sip-Method Options32 VALUE Sip-Method Update 64 VALUE Sip-Method Register 128 VALUE Sip-Method Message256 VALUE Sip-Method Subscribe 512 VALUE Sip-Method Notify 1024 VALUE Sip-Method Prack 2048 VALUE Sip-Method Refer 4096 VALUE Sip-Method Other 8192 And my dictionary settings are listed below; dictionary(freeradius) $INCLUDE/opt/freeradius/share/freeradius/dictionary $INCLUDE/opt/freeradius/etc/raddb/dictionary.opensips dictionary(radiusclient) ##At the end of the line $INCLUDE /opt/freeradius/etc/raddb/dictionary.opensips Kindly tell me from which section I'm facing this problem. Waiting for your reply. Date: Fri, 26 Feb 2010 15:21:03 +0200 From: Andrew Pogrebennyk andrew.pogreben...@portaone.com mailto:andrew.pogreben...@portaone.com Subject: Re: [OpenSIPS-Users] Getting Error When Configuring OpenSIPS + FreeRadius` To: OpenSIPS users mailling list users@lists.opensips.org mailto:users@lists.opensips.org Message-ID: 4b87cabf.9000...@portaone.com mailto:4b87cabf.9000...@portaone.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 26.02.2010 14:33, Ahmed Munir wrote: Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:aaa_radius:rad_avp_add: failure Feb 26 14:47:47 rose /usr/local/sbin/opensips[25988]: ERROR:acc:acc_aaa_request: failed to add Source-IP, 13 And I also check table radacct in mysql database, no records are inserted into it. I think this means an incorrect RADIUS dictionary. You should verify that the extra attributes you have defined are present there. -- Sincerely, Andrew Pogrebennyk -- Regards, Ahmed Munir ___ 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] [RFC] What repo to use for 2.0 ?
Yeah.. I tried looking around for it, but all I could find was a bunch of posts where people said it was a horrible idea. I understand the problems with keyword expansion, I'd still like to use it. The explanations of how to go around using keyword expansion with file hashes and post commit scripts just seems like more hacking than necessary. What a pain! Maybe I'm missing something.. On Thu, Mar 4, 2010 at 11:52 AM, Bogdan-Andrei Iancu bog...@voice-system.ro wrote: you mean like SVN keywords Id, Author, etc ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Performing math functions in OpenSIPs
Hello List, Im trying to do some math functions, ive tried a few different ways and get either invalid string operands or no value in right expression, ive tried the following: $avp(i:70) is set to say .005 $avp(i:55) = $avp(i:70) * (6 / 100); $avp(i:55) = ($avp(i:70) * (6 / 100)); $avp(i:55) = $avp(i:70) * 6 / 100; $avp(i:55) = $avp(i:70) * .006; $avp(i:55) = ($avp(i:70) * .006); Im sure I tried a few more to, but basically i want to take a AVP then multiply it by a number and get a result, this will be a decimal like 0.00234 Any suggestions? Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Performing math functions in OpenSIPs
Hi Brad, The arithmetic ops do work only with integer values (no floats). Also be sure that the assignment to the avp you use was done as integer: $avp(i:1) = 3 ; and not like: $avp(i:1) = 3 ; Regards, Bogdan Brad Bendy wrote: Hello List, Im trying to do some math functions, ive tried a few different ways and get either invalid string operands or no value in right expression, ive tried the following: $avp(i:70) is set to say .005 $avp(i:55) = $avp(i:70) * (6 / 100); $avp(i:55) = ($avp(i:70) * (6 / 100)); $avp(i:55) = $avp(i:70) * 6 / 100; $avp(i:55) = $avp(i:70) * .006; $avp(i:55) = ($avp(i:70) * .006); Im sure I tried a few more to, but basically i want to take a AVP then multiply it by a number and get a result, this will be a decimal like 0.00234 Any suggestions? Thanks ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Performing math functions in OpenSIPs
On 04.03.2010 20:05, Brad Bendy wrote: That makes since now, we had a float actually. At this time no way to work with floats at all right? There's always a workaround :) $avp(i:55) = $avp(i:70) * .006; $avp(i:55) = $avp(i:70) * 6; Just treat i:55 as if it was multiplied by 1000. It seems like you're trying to do some cost calculation - so just assume that i:55 is expressed as the number of 10'ths of a cent. Then format it properly when needed for output. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Performing math functions in OpenSIPs
Yeah, that's exactly what I just did. Works like a champ, little confusing on the eyes when your use to seeing 5 digit decimals, but it gets the job done! Thanks for the suggestion. On Thu, 2010-03-04 at 20:23 +, Stanisław Pitucha wrote: On 04.03.2010 20:05, Brad Bendy wrote: That makes since now, we had a float actually. At this time no way to work with floats at all right? There's always a workaround :) $avp(i:55) = $avp(i:70) * .006; $avp(i:55) = $avp(i:70) * 6; Just treat i:55 as if it was multiplied by 1000. It seems like you're trying to do some cost calculation - so just assume that i:55 is expressed as the number of 10'ths of a cent. Then format it properly when needed for output. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Brad Bendy Chief Technical Officer brad.be...@benganetworks.com Benga Networks, LLC. 10115 E. Bell Rd, Ste. 107-451 Scottsdale, AZ 85260-2189 Toll Free:877-44-BENGA Local: 480-970-5200 Cell: 602-550-4004 Fax: 866-852-4468 ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] RES: ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo
That fixed it, thanks for the help!!! Regards, Alex On Mon, Mar 1, 2010 at 8:46 PM, Flavio E. Goncalves fla...@voffice.com.br wrote: Add the following parameter modparam(mi_fifo, fifo_mode,0666) Just in case, check your opensipsctlrc file. This file controls where opensipsctl finds the FIFO. Flavio E. Goncalves -Mensagem original- De: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] Em nome de Alejandro Recarey Enviada em: Monday, March 01, 2010 4:43 PM Para: users@lists.opensips.org Assunto: [OpenSIPS-Users] ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo Hello everybody, I have just made a fresh install of OpenSIPS 1.6.1 using the http://debian.leurent.eu/ mirror. I am using debian lenny 5.0. I have read all of the tutorials and I believe I have a working configuration. OpenSIPS is running and my cfg file is loaded without problems. However, whenever y try to run the command opensipsctl ul show, or opensipsctl monitor I get the following error ERROR: Error opening OpenSIPS's FIFO /tmp/opensips_fifo Yes, I have the line modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) uncommented and the mi_fifo module is also uncommented. The file /usr/lib/opensips/modules/mi_fifo.so exists. What am I doing wrong?? I am attaching my opensips.cfg file contents. Regards, Alex # # $Id: opensips.cfg 6046 2009-08-30 17:13:08Z bogdan_iancu $ # # OpenSIPS basic configuration script # by Anca Vamanu a...@voice-system.ro # # Please refer to the Core CookBook at: # http://www.opensips.org/index.php?n=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 disable TCP (default on) */ #disable_tcp=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 /* uncomment the next line to disable the auto discovery of local aliases based on revers DNS on IPs (default on) */ #auto_aliases=no /* uncomment the following lines to enable TLS support (default off) */ #disable_tls = no #listen = tls:your_IP:5061 #tls_verify_server = 1 #tls_verify_client = 1 #tls_require_client_certificate = 0 #tls_method = TLSv1 #tls_certificate = /etc/opensips/tls/user/user-cert.pem #tls_private_key = /etc/opensips/tls/user/user-privkey.pem #tls_ca_list = /etc/opensips/tls/user/user-calist.pem port=5060 /* uncomment and configure the following line if you want opensips to bind on a specific interface/port/proto (default bind on all available) */ #listen=udp:192.168.1.2:5060 ### Modules Section #set module path mpath=/usr/lib/opensips/modules/ /* uncomment next line for MySQL DB support */ loadmodule db_mysql.so loadmodule signaling.so loadmodule sl.so loadmodule tm.so loadmodule rr.so loadmodule maxfwd.so loadmodule usrloc.so loadmodule registrar.so loadmodule textops.so loadmodule mi_fifo.so loadmodule uri.so loadmodule xlog.so loadmodule acc.so /* uncomment next lines for MySQL based authentication support NOTE: a DB (like db_mysql) module must be also loaded */ loadmodule auth.so loadmodule auth_db.so /* uncomment next line for aliases support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule alias_db.so /* uncomment next line for multi-domain support NOTE: a DB (like db_mysql) module must be also loaded NOTE: be sure and enable multi-domain support in all used modules (see multi-module params section ) */ #loadmodule domain.so /* uncomment the next two lines for presence server support NOTE: a DB (like db_mysql) module must be also loaded */ #loadmodule presence.so #loadmodule presence_xml.so # - setting module-specific parameters --- # - mi_fifo params - modparam(mi_fifo, fifo_name, /tmp/opensips_fifo) # - rr params - # add value to ;lr param to cope with most of the UAs modparam(rr, enable_full_lr, 1) # do not append from tag to the RR (no need for this script) modparam(rr, append_fromtag, 0) # - registrar params - /* uncomment the next line not to allow more than 10 contacts per AOR */ #modparam(registrar, max_contacts, 10) # - usrloc params - #modparam(usrloc, db_mode, 0) /* uncomment the following lines if you want to enable DB persistency for location entries */ modparam(usrloc, db_mode, 2) modparam(usrloc, db_url, mysql://opensips:opensip...@localhost/opensips) # - uri params - modparam(uri, use_uri_table, 0) # - acc
Re: [OpenSIPS-Users] [OpenSIPS-RLS Module] Cannot receive NOTIFY updates
Hi, About the problem I reported earlier I made some progress and found out that there is an error in the method rls_handle_notify. That's probably why I do not see any NOTIFY with presence state information. I see the following error: DBG:rls:rls_handle_notify: no dialog match found in hash table This is because res_id is zero after a call to if(pua_get_record_id(dialog, res_id) 0) // verify if within a stored dialog Does anyone have a hint? Thanks -Patrice On Wed, Mar 3, 2010 at 9:19 AM, Patrice Dalle patda...@gmail.com wrote: Hi, I would really appreciate if anyone can give me feedback about the problem described below. I am trying to setup opensips to use rls with a resource list. So far I have been able to populate the rls-services XML file using XCAP and to subscribe to the resource-list but I cannot receive NOTIFYs with presence state. I only receive the initial NOTIFY... I suspect that there might be a problem with the handling of PUBLISH requests as I see the following error in the opensips logs. ERROR:mi_datagram:mi_datagram_server: command not available I also see this warning but cannot tell if this is a problem? DBG:pua:db_update: NO_UPDATEDB_FLAG Logs are provided in attachment: rls-services - The RLS document on the XCAP server opensips.cfg sip_log_presence_rls_no_notify.txt - The SIP packets logging opensips.log Thanks, Patrice ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] [RFC] What repo to use for 2.0 ?
Hi Brett, you mean http://www.gelato.unsw.edu.au/archives/git/0610/28891.html To be honest I also like the keyword substitution (the ID stuff, as I can see quite fast how changed and when a file for the last time). On the other hand, I understand the reasons for not having such an idiotic feature - they do make sense (generally speaking, but maybe not for us as project) -, but as time we find an alternative solution to this, it is fine with me. Regards, Bogdan Brett Nemeroff wrote: Yeah.. I tried looking around for it, but all I could find was a bunch of posts where people said it was a horrible idea. I understand the problems with keyword expansion, I'd still like to use it. The explanations of how to go around using keyword expansion with file hashes and post commit scripts just seems like more hacking than necessary. What a pain! Maybe I'm missing something.. On Thu, Mar 4, 2010 at 11:52 AM, Bogdan-Andrei Iancu bog...@voice-system.ro mailto:bog...@voice-system.ro wrote: you mean like SVN keywords Id, Author, etc ? Regards, Bogdan ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users -- Bogdan-Andrei Iancu www.voice-system.ro ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users