Hi!
whats difference $var() and $avp()?
Victor V. Kustov writes:
whats difference $var() and $avp()?
see
http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables
-- juha
В Fri, 19 Apr 2013 11:54:18 +0300 Juha Heinanen jh@tutpro.com пишет:
http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables
I think info from all comments in this thread must be included in cookbook. Without such layer, without conceptual things it not 'book', just remarks on fields.
19 apr 2013 kl. 13:52 skrev "Victor V. Kustov" coyote@bks.tv:
В Fri, 19 Apr 2013 11:54:18 +0300 Juha Heinanen jh@tutpro.com пишет:
http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables
I think info from all comments in this thread must be included in cookbook. Without such layer, without conceptual things it not 'book', just remarks on fields.
Please tell me what's missing from that page and I'll update. I don't see anything missing myself, but I could be documentation-blind, having spent so much time with it.
Thanks, /O
В Fri, 19 Apr 2013 13:55:37 +0200 "Olle E. Johansson" oej@edvina.net пишет:
Please tell me what's missing from that page and I'll update. I don't see anything missing myself, but I could be documentation-blind, having spent so much time with it.
What is $avp? What is $var? Whats the difference between that things? When I need use $avp? When I need use $var?
Blackhole: concept model. Look, I spent more than month and make too little, 'cause two things: no concept model + megatons of outdated examples.
More than month. Any other system already would work. For example freeswitch. But I believe than Kamailio - has higher potential. Make less level of occurrence. Write good documentation. Existing is catastrophically incomplete.
Main question "How it work?" had partially answer for modules and no answer at all on whole system.
On 04/19/2013 08:26 AM, Victor V. Kustov wrote:
What is $avp? What is $var? Whats the difference between that things? When I need use $avp? When I need use $var?
Blackhole: concept model. Look, I spent more than month and make too little, 'cause two things: no concept model + megatons of outdated examples.
More than month. Any other system already would work. For example freeswitch. But I believe than Kamailio - has higher potential. Make less level of occurrence. Write good documentation. Existing is catastrophically incomplete.
Main question "How it work?" had partially answer for modules and no answer at all on whole system.
I can't speak for everyone centrally involved with the project, but from my perspective, yes, I absolutely agree. This is a serious problem and its biggest obstacle to more widespread adoption.
19 apr 2013 kl. 14:26 skrev "Victor V. Kustov" coyote@bks.tv:
В Fri, 19 Apr 2013 13:55:37 +0200 "Olle E. Johansson" oej@edvina.net пишет:
Please tell me what's missing from that page and I'll update. I don't see anything missing myself, but I could be documentation-blind, having spent so much time with it.
What is $avp? What is $var?
These two are clearly answered
Whats the difference between that things? When I need use $avp? When I need use $var?
These needs to be worked on.
Blackhole: concept model. Look, I spent more than month and make too little, 'cause two things: no concept model + megatons of outdated examples.
More than month. Any other system already would work. For example freeswitch. But I believe than Kamailio - has higher potential. Make less level of occurrence. Write good documentation. Existing is catastrophically incomplete.
Main question "How it work?" had partially answer for modules and no answer at all on whole system.
OK, thanks for the feedback! Very useful.
We will certainly look into this. There are trainings, but no books and very few guides on the web. Please feel free to contribute, after all it is Open Source and we depend on community contributions in order to get documentation written.
Have a great weekend. /O
В Fri, 19 Apr 2013 14:46:00 +0200 "Olle E. Johansson" oej@edvina.net пишет:
We will certainly look into this. There are trainings, but no books and very few guides on the web. Please feel free to contribute, after all it is Open Source and we depend on community contributions in order to get documentation written.
My english very poor :) And still doesn't clear for how it work.
В Fri, 19 Apr 2013 14:46:00 +0200 "Olle E. Johansson" oej@edvina.net пишет:
We will certainly look into this. There are trainings, but no books and very few guides on the web. Please feel free to contribute, after all it is Open Source and we depend on community contributions in order to get documentation written.
OK, i think any function need examples. Not for call only, but for use result.
radius_load_callee_avps(callee)
I see in doc:
radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
I call this function, but where are results? How can i check errors, where i must look results? In which avps?
Victor V. Kustov writes:
radius_load_callee_avps(callee)
I see in doc:
radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
I call this function, but where are results? How can i check errors, where i must look results? In which avps?
as the name of the function indicates, the result is in the avps. if the function call fails, result value will be -1 as usual and you get error message to syslog.
-- juha
В Mon, 29 Apr 2013 15:34:11 +0300 Juha Heinanen jh@tutpro.com пишет:
as the name of the function indicates, the result is in the avps. if the function call fails, result value will be -1 as usual and you get error message to syslog.
in which avps?
kk, radius answer:
Session-Timeout = '4284860' next-hop-ip = 'SIP/111111111@cisco-out' session-protocol = 'SIP'
how i can access to reply?
29 apr 2013 kl. 14:44 skrev "Victor V. Kustov" coyote@bks.tv:
В Mon, 29 Apr 2013 15:34:11 +0300 Juha Heinanen jh@tutpro.com пишет:
as the name of the function indicates, the result is in the avps. if the function call fails, result value will be -1 as usual and you get error message to syslog.
in which avps?
kk, radius answer:
Session-Timeout = '4284860' next-hop-ip = 'SIP/111111111@cisco-out' session-protocol = 'SIP'
how i can access to reply?
Documentation says:
All functions of this module load AVPs from SIP-AVP reply items received from RADIUS upon a successful request. Value of the SIP-AVP reply item must be a string of form:
• value = SIP_AVP_NAME SIP_AVP_VALUE
• SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER
• SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE
/O
В Mon, 29 Apr 2013 14:46:34 +0200 "Olle E. Johansson" oej@edvina.net пишет:
All functions of this module load AVPs from SIP-AVP reply items received from RADIUS upon a successful request. Value of the SIP-AVP reply item must be a string of form:
• value = SIP_AVP_NAME SIP_AVP_VALUE
• SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER
• SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE
sorry its not clear for me.
$avp('next-hop-ip') is ok in my case? Or i need _special_ radius answer?
On 04/29/2013 03:52 PM, Victor V. Kustov wrote:
В Mon, 29 Apr 2013 14:46:34 +0200 "Olle E. Johansson" oej@edvina.net пишет:
All functions of this module load AVPs from SIP-AVP reply items received from RADIUS upon a successful request. Value of the SIP-AVP reply item must be a string of form:
• value = SIP_AVP_NAME SIP_AVP_VALUE
• SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER
• SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE
sorry its not clear for me.
$avp('next-hop-ip') is ok in my case? Or i need _special_ radius answer?
Not so "special" .. You need to add SIP-AVP attributes to an access-accept reply from radius. As I remember this attribute must be declared somewhere in dictionary.openser.
В Tue, 30 Apr 2013 12:38:11 +0300 Vitaliy Aleksandrov vitalik.voip@gmail.com пишет:
Not so "special" .. You need to add SIP-AVP attributes to an access-accept reply from radius. As I remember this attribute must be declared somewhere in dictionary.openser.
bad news for me. radius already work with other systems and all of them receive standart response like described.
29 apr 2013 kl. 14:29 skrev "Victor V. Kustov" coyote@bks.tv:
В Fri, 19 Apr 2013 14:46:00 +0200 "Olle E. Johansson" oej@edvina.net пишет:
We will certainly look into this. There are trainings, but no books and very few guides on the web. Please feel free to contribute, after all it is Open Source and we depend on community contributions in order to get documentation written.
OK, i think any function need examples. Not for call only, but for use result.
radius_load_callee_avps(callee)
I see in doc:
radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
I call this function, but where are results? How can i check errors, where i must look results? In which avps?
It is explained in section 1. Overview.
Now, I realize you missed that so there propably needs to be a pointer to that section in the function descriptions.
/O
That is a general - and highly valid - objection to the state of Kamailio documentation. By and large, it's a reference, with no conceptual glue, in narrative form, or methodological instruction. There is only information on how to do X, not what X is or why you would want to do it.
We are trying to change that. Progress is slow, undeniably.
"Victor V. Kustov" coyote@bks.tv wrote:
В Fri, 19 Apr 2013 11:54:18 +0300 Juha Heinanen jh@tutpro.com пишет:
http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables
I think info from all comments in this thread must be included in cookbook. Without such layer, without conceptual things it not 'book', just remarks on fields.
-- SY, Victor JID: coyote@bks.tv JID: coyote@bryansktel.ru I use FREE operation system: 3.8.4-calculate GNU/Linux
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my Nexus 10, with all the figments of autocorrect that might imply.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
On 04/19/2013 11:43 AM, Victor V. Kustov wrote:
Hi!
whats difference $var() and $avp()?
$var() - is bound to a kamailio process. If you set $var(xxx) for a one request/reply, it will be available during processing other messages. $avp() - is bound to a transaction. If you set $avp(xxx) for an INVITE, it will be available for replies for that INVITE if it was sent in a stateful way (t_relay)
19 apr 2013 kl. 10:54 skrev Vitaliy Aleksandrov vitalik.voip@gmail.com:
On 04/19/2013 11:43 AM, Victor V. Kustov wrote:
Hi!
whats difference $var() and $avp()?
$var() - is bound to a kamailio process. If you set $var(xxx) for a one request/reply, it will be available during processing other messages.
Right - but only in that process.
/O
19 apr 2013 kl. 10:43 skrev "Victor V. Kustov" coyote@bks.tv:
Hi!
whats difference $var() and $avp()?
There's a whole set of differences.
- $var is stored in process memory.
- $avp is stored in transactions (in shared memory), so if you set them while processing a request you have them when processing responses and failures.
- avp's are stacks, so you can store a set of data in them, not just one value.
You can find out more details in the core cookbok on the web site.
/O
You can have arrays of $vars too, though that is probably not what you meant by "stacks".
"Olle E. Johansson" oej@edvina.net wrote:
19 apr 2013 kl. 10:43 skrev "Victor V. Kustov" coyote@bks.tv:
Hi!
whats difference $var() and $avp()?
There's a whole set of differences.
$var is stored in process memory.
$avp is stored in transactions (in shared memory), so if you set them
while processing a request you have them when processing responses and failures.
- avp's are stacks, so you can store a set of data in them, not just
one value.
You can find out more details in the core cookbok on the web site.
/O _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from my Nexus 10, with all the figments of autocorrect that might imply.
Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
В Fri, 19 Apr 2013 10:56:26 +0200 "Olle E. Johansson" oej@edvina.net пишет:
- $avp is stored in transactions (in shared memory), so if you set
them while processing a request you have them when processing responses and failures.
is memory freeing automatically or i need to do it myself?
19 apr 2013 kl. 16:50 skrev "Victor V. Kustov" coyote@bks.tv:
В Fri, 19 Apr 2013 10:56:26 +0200 "Olle E. Johansson" oej@edvina.net пишет:
- $avp is stored in transactions (in shared memory), so if you set
them while processing a request you have them when processing responses and failures.
is memory freeing automatically or i need to do it myself?
When the transaction dies, the AVPs associated with it are released and the bits are reused.
Kamailio is environmentally friendly, with a green logotype :-)
/O
Sorry to hear this really negative news on open-source Kamailio. I want to share the following two good articles with you. Both articles shed light on the positive impact of building with SIP. The 1st good article "H.323 and SIP Becoming Legacy. XMPP and JS are the Future" April 12, 2012 The 12 comments for the article are also worth reading. http://bloggeek.me/h323-sip-xmpp-js/ The 2nd good article "SIP vs XMPP or SIP and XMPP?" compares the 2 most popular signaling protocols - SIP and XMPP. November 09, 2009 http://p2p-sip.blogspot.ca/2009/11/sip-vs-xmpp-or-sip-and-xmpp.html Due to its popularity, SIP faces with overload issue recently. Build-in overload mechanism cannot prevent overload effectively. Therefore, IETF SIP Overload Control (soc) Working Group works on IETF RFC "SIP Overload Control" currently. http://tools.ietf.org/html/draft-ietf-soc-overload-control-12
IETF SIP Overload Control discussion archives http://www.ietf.org/mail-archive/web/sip-overload/current/threads.html#00874
We have published a survey on SIP overload control algorithms (including IETF RFC "SIP Overload Control"). "A Comparative Study of SIP Overload Control Algorithms" http://www.researchgate.net/publication/231609451_A_Comparative_Study_of_SIP... http://arxiv.org/abs/1210.1505 http://www.igi-global.com/chapter/comparative-study-sip-overload-control/674...
We have also used control theorectic approaches to model the interactions between an overloaded SIP server and its upstream servers as a feedback control system in two different scenarios - redundant retransmission ratio control and round trip delay control (IEEE Globecom 2010 and ICC 2011).
"Mitigating SIP Overload Using a Control-Theoretic Approach" IEEE Globecom 2010 http://www.researchgate.net/publication/221284946_Mitigating_SIP_Overload_Us... http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5683124&url=ht...
Implementation of implicit SIP overload control in the real system "An Efficient Earthquake Early Warning Message Delivery Algorithm Using an in Time Control-Theoretic Approach" http://link.springer.com/chapter/10.1007%2F978-3-642-23641-9_15# http://www.ipv6.org.tw/docu/elearning8_2011/1010004798p_3-7.pdf "Design Of A PI Rate Controller for Mitigating SIP Overload" IEEE ICC 2011 http://www.researchgate.net/publication/224249824_Design_of_a_PI_Rate_Contro... http://features.rr.com/article/01vBgtc8TR17z?q=Skype http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5963029&url=ht... Best regards, Winston Hong Software Engineer InBay Technologies Inc. Ottawa, Canada K2K 1Y3 http://www.inbaytech.com/solutions.html > On Mar 31, 2013 6:33 PM, "Alex Balashov" abalas...@evaristesys.com wrote:
For immediate release:
ATLANTA, GA (1 April 2013)--Evariste Systems LLC, an Atlanta-based consultancy specialising in Kamailio-based VoIP infrastructure solutions for the ITSP and CLEC market, has announced that beginning in the second quarter of 2013, it will be abandoning its Kamailio-based technology portfolio to focus on its new role as a preferred VAR (Value Added Reseller) for Acme Packet (NASDAQ:APKT).
"It is with a heavy heart that we abandon five years of Kamailio-oriented work and the Canonical SIP Routing Platform product derived from it," said Alex Balashov, the principal of the company.
Use $var when you want to manipulate values inside a route block, for example, when you want to store a value that will live only in the scope of that route block. When the route block exits, it will be automatically deallocated.
Use $avp when you want to store a value that you want to read anywhere. It will live as long as the SIP transaction lives.
- $var is stored in private memory, it is per process. This means that only the process that created it can read it. - $avp is stored in shared memory. It can be accessed from any process in kamailio's process list (childs)
- $var has local route block scope. - $avp has SIP transaction scope.
- Both $avp and $var are automatically freed.
On Fri, Apr 19, 2013 at 10:50 AM, Victor V. Kustov coyote@bks.tv wrote:
В Fri, 19 Apr 2013 10:56:26 +0200 "Olle E. Johansson" oej@edvina.net пишет:
- $avp is stored in transactions (in shared memory), so if you set
them while processing a request you have them when processing responses and failures.
is memory freeing automatically or i need to do it myself?
-- SY, Victor JID: coyote@bks.tv JID: coyote@bryansktel.ru I use FREE operation system: 3.8.4-calculate GNU/Linux
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users