Module: sip-router
Branch: master
Commit: bb5d5155daefe654f1998f61c3a92c07830d9204
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bb5d515…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Aug 18 17:21:14 2010 +0200
pua: updated devel API documentation
- updated documentation to reflect latest source code
- patch by Nikita Kozlov
---
modules_k/pua/README | 18 ++++++++----------
modules_k/pua/doc/pua_devel.xml | 22 +++++++++-------------
2 files changed, 17 insertions(+), 23 deletions(-)
diff --git a/modules_k/pua/README b/modules_k/pua/README
index 97a00bc..99f832a 100644
--- a/modules_k/pua/README
+++ b/modules_k/pua/README
@@ -344,18 +344,9 @@ typedef struct publ_info
should match */
str* extra_headers /* (optional) extra_headers that should be added
to Publish msg*/
- publrpl_cb_t* cbrpl;/* callback function to be called when receiving
- the reply for the sent request */
- void* cbparam; /* extra parameter for tha callback function */
-
}publ_info_t;
...
- The callback function type:
-...
-typedef int (publrpl_cb_t)(struct sip_msg* reply, void* extra_param);
-...
-
3. send_subscribe
Field type:
@@ -422,7 +413,7 @@ typedef int (*register_puacb_t)(int types, pua_cb f, void* param );
...
This function registers a callback to be called on receiving the reply
- message for a sent Subscribe request. The type parameter should be set
+ message for a sent Publish or Subscribe request. The type parameter should be set
the same as the source_flag for that request. The function registered
as callback for pua should be of type pua_cb , which is: typedef void
(pua_cb)(ua_pres_t* hentity, struct msg_start * fl); The parameters are
@@ -438,6 +429,13 @@ typedef int (*register_puacb_t)(int types, pua_cb f, void* param );
}
...
+ The callback function type:
+
+...
+typedef int (pua_cb)(ua_pres_t* hentity, struct sip_msg*);
+...
+
+
6. add_event
Field type:
diff --git a/modules_k/pua/doc/pua_devel.xml b/modules_k/pua/doc/pua_devel.xml
index a5ea3b9..246c17d 100644
--- a/modules_k/pua/doc/pua_devel.xml
+++ b/modules_k/pua/doc/pua_devel.xml
@@ -88,21 +88,9 @@ typedef struct publ_info
should match */
str* extra_headers /* (optional) extra_headers that should be added
to Publish msg*/
- publrpl_cb_t* cbrpl;/* callback function to be called when receiving
- the reply for the sent request */
- void* cbparam; /* extra parameter for tha callback function */
-
}publ_info_t;
...
</programlisting>
- <para>
- The callback function type:
- <programlisting format="linespecific">
-...
-typedef int (publrpl_cb_t)(struct sip_msg* reply, void* extra_param);
-...
- </programlisting>
- </para>
</section>
<section>
@@ -199,7 +187,7 @@ typedef int (*register_puacb_t)(int types, pua_cb f, void* param );
<para>
This function registers a callback to be called on receiving the reply message
- for a sent Subscribe request.
+ for a sent Publish or Subscribe request.
The type parameter should be set the same as the source_flag for that request.
The function registered as callback for pua should be of type pua_cb , which is:
typedef void (pua_cb)(ua_pres_t* hentity, struct msg_start * fl);
@@ -217,6 +205,14 @@ typedef int (*register_puacb_t)(int types, pua_cb f, void* param );
}
...
</programlisting>
+ <para>
+ The callback function type:
+ <programlisting format="linespecific">
+...
+typedef int (pua_cb)(ua_pres_t* hentity, struct sip_msg*);
+...
+ </programlisting>
+ </para>
</example>
</section>
Module: sip-router
Branch: master
Commit: 78beed37b8975e11851553c41c17578481772dad
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=78beed3…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Wed Aug 18 15:32:36 2010 +0200
dns cache: fix manually inserted SRV record order
The manually inserted SRV records thought the RPC interface
were not ordered by their priority and weight which resulted in
wrong SRV look-ups, i.e. not the highest priority record
was chosen first.
---
dns_cache.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/dns_cache.c b/dns_cache.c
index 182e61f..ef3a986 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -4221,6 +4221,8 @@ int dns_cache_add_record(unsigned short type,
ticks_t expire;
int err, h;
int size;
+ struct dns_rr *new_rr, **rr_p, **rr_iter;
+ struct srv_rdata *srv_rd;
/* eliminate gcc warnings */
ip_addr = 0;
@@ -4358,6 +4360,7 @@ int dns_cache_add_record(unsigned short type,
/* let the rr point to the new structure */
rr = (struct dns_rr*)translate_pointer((char*)new, (char*)old,
(char*)rr);
+ new_rr = rr;
if (type == T_SRV) {
/* fix the priority, weight, and port */
@@ -4392,6 +4395,7 @@ int dns_cache_add_record(unsigned short type,
"DNS cache entry\n");
goto error;
}
+ new_rr = rr;
switch(type) {
case T_A:
@@ -4409,6 +4413,46 @@ int dns_cache_add_record(unsigned short type,
/* maximum expire value has been already fixed by
* dns_cache_clone_entry() */
}
+
+ if (type == T_SRV) {
+ /* SRV records must be ordered by their priority and weight.
+ * With modifying an exising rr, or adding new rr to the DNS entry,
+ * the ordered list might got broken which needs to be fixed.
+ */
+ rr_p = NULL;
+ for ( rr_iter = &new->rr_lst;
+ *rr_iter;
+ rr_iter = &((*rr_iter)->next)
+ ) {
+ if (*rr_iter == new_rr) {
+ rr_p = rr_iter;
+ continue;
+ }
+ srv_rd = (struct srv_rdata*)(*rr_iter)->rdata;
+ if ((priority < srv_rd->priority) ||
+ ((priority == srv_rd->priority) && (weight > srv_rd->weight))
+ )
+ break; /* insert here */
+ }
+
+ if (!rr_p)
+ for ( rr_p = rr_iter;
+ *rr_p && (*rr_p != new_rr);
+ rr_p = &((*rr_p)->next)
+ );
+ if (!rr_p) {
+ LOG(L_ERR, "ERROR: Failed to correct the orderd list of SRV resource records\n");
+ goto error;
+ }
+
+ if (*rr_iter != new_rr->next) {
+ /* unlink rr from the list */
+ *rr_p = (*rr_p)->next;
+ /* link it before *rr_iter */
+ new_rr->next = *rr_iter;
+ *rr_iter = new_rr;
+ }
+ }
}
}
Module: sip-router
Branch: master
Commit: 408983f8a1403e844d679300f0c1ee2ece3cbd6c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=408983f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Aug 18 10:48:16 2010 +0200
kamailio.cfg: updated users list email address
- fixed small typo
---
etc/kamailio.cfg | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 98fa69d..e4de392 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -4,7 +4,7 @@
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
-# Direct your questions about this file to: <users(a)lists.kamailio.org>
+# Direct your questions about this file to: <sr-users(a)lists.sip-router.org>
#
# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
# for an explanation of possible statements, functions and parameters.
@@ -87,7 +87,7 @@ children=4
#disable_tcp=yes
/* uncomment the next line to disable the auto discovery of local aliases
- based on revers DNS on IPs (default on) */
+ based on reverse DNS on IPs (default on) */
#auto_aliases=no
/* add local domain aliases */
Hello,
the path to modules can be specified via command line option -L or cfg
parameter loadpath (aliased as mpath for K backward compat). loadpath
overwrites the value given by -L.
The question is whether the value given via -L shouldn't be effective
all the time (i.e., loadpath cfg parameter ignored when -L is given)
since it is via command line parameter -- my expectation is command line
options should have higher priority. Changing it now will break backward
compatibility (if anyone used it like now) while in testing, but if all
think is a bug, then can be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
Module: sip-router
Branch: master
Commit: 5004a60ad8a9cd47a2c6a7fc6eae82c1b371f92a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5004a60…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Tue Aug 17 13:10:33 2010 -0400
modules_k:rtpproxy - remove trailing whitespaces from documentation
---
modules_k/rtpproxy/doc/nathelper_admin.xml | 60 ++++++++++++++--------------
1 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/modules_k/rtpproxy/doc/nathelper_admin.xml b/modules_k/rtpproxy/doc/nathelper_admin.xml
index d50665a..671dff1 100644
--- a/modules_k/rtpproxy/doc/nathelper_admin.xml
+++ b/modules_k/rtpproxy/doc/nathelper_admin.xml
@@ -21,7 +21,7 @@
via an rtpproxy.
</para>
<para>
- Known devices that get along over &nat;s with rtpproxy are ATAs
+ Known devices that get along over &nat;s with rtpproxy are ATAs
(as clients) and Cisco Gateways (since 12.2(T)) as servers. See <ulink
url="http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_gui…">
http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_gui…"></ulink>
@@ -35,10 +35,10 @@
balancing/distribution and control/selection purposes.
</para>
<para>
- The module allows the definition of several sets of rtpproxies -
+ The module allows the definition of several sets of rtpproxies -
load-balancing will be performed over a set and the user has the
ability to choose what set should be used. The set is selected via
- its id - the id being defined along with the set. Refer to the
+ its id - the id being defined along with the set. Refer to the
<quote>rtpproxy_sock</quote> module parameter definition for syntax
description.
</para>
@@ -47,13 +47,13 @@
the weight of each rtpproxy from the set.
</para>
<para>
- The selection of the set is done from script prior using
+ The selection of the set is done from script prior using
[un]force_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer()
functions - see the set_rtp_proxy_set() function.
</para>
<para>
- For backward compatibility reasons, a set with no id take by default
- the id 0. Also if no set is explicitly set before
+ For backward compatibility reasons, a set with no id take by default
+ the id 0. Also if no set is explicitly set before
[un]force_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer()
the 0 id set will be used.
</para>
@@ -81,7 +81,7 @@
<section>
<title>External Libraries or Applications</title>
<para>
- The following libraries or applications must be installed before
+ The following libraries or applications must be installed before
running &kamailio; with this module loaded:
<itemizedlist>
<listitem>
@@ -99,7 +99,7 @@
<section>
<title><varname>rtpproxy_sock</varname> (string)</title>
<para>
- Definition of socket(s) used to connect to (a set) RTPProxy. It may
+ Definition of socket(s) used to connect to (a set) RTPProxy. It may
specify a UNIX socket or an IPv4/IPv6 UDP socket.
</para>
<para>
@@ -129,7 +129,7 @@ modparam("rtpproxy", "rtpproxy_sock",
<title><varname>rtpproxy_disable_tout</varname> (integer)</title>
<para>
Once RTPProxy was found unreachable and marked as disable, rtpproxy
- will not attempt to establish communication to RTPProxy for
+ will not attempt to establish communication to RTPProxy for
rtpproxy_disable_tout seconds.
</para>
<para>
@@ -241,12 +241,12 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
<function moreinfo="none">set_rtp_proxy_set()</function>
</title>
<para>
- Sets the Id of the rtpproxy set to be used for the next
+ Sets the Id of the rtpproxy set to be used for the next
[un]force_rtp_proxy(), rtpproxy_offer() or rtpproxy_answer()
command.
</para>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
+ This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE.
</para>
<example>
@@ -264,7 +264,7 @@ force_rtp_proxy();
<function moreinfo="none">force_rtp_proxy([flags [, ip_address]])</function>
</title>
<para>
- Rewrites &sdp; body to ensure that media is passed through
+ Rewrites &sdp; body to ensure that media is passed through
an &rtp; proxy. It can have optional parameters to force additional
features. If ip_address is provided, it will be used to replace the
one in SDP.
@@ -298,7 +298,7 @@ force_rtp_proxy();
</para></listitem>
<listitem><para>
<emphasis>l</emphasis> - force <quote>lookup</quote>, that is,
- only rewrite SDP when corresponding session is already exists
+ only rewrite SDP when corresponding session is already exists
in the RTP proxy. By default is on when the session is to be
completed (reply in non-swap or ACK in swap mode).
</para></listitem>
@@ -318,29 +318,29 @@ force_rtp_proxy();
the 'w' flag for clients behind NAT! See also above notes!
</para></listitem>
<listitem><para>
- <emphasis>f</emphasis> - instructs rtpproxy to ignore marks
- inserted by another rtpproxy in transit to indicate that the
- session is already goes through another proxy. Allows creating
+ <emphasis>f</emphasis> - instructs rtpproxy to ignore marks
+ inserted by another rtpproxy in transit to indicate that the
+ session is already goes through another proxy. Allows creating
chain of proxies.
</para></listitem>
<listitem><para>
- <emphasis>r</emphasis> - flags that IP address in SDP should
- be trusted. Without this flag, rtpproxy ignores address in
- the SDP and uses source address of the SIP message as media
+ <emphasis>r</emphasis> - flags that IP address in SDP should
+ be trusted. Without this flag, rtpproxy ignores address in
+ the SDP and uses source address of the SIP message as media
address which is passed to the RTP proxy.
</para></listitem>
<listitem><para>
- <emphasis>o</emphasis> - flags that IP from the origin
+ <emphasis>o</emphasis> - flags that IP from the origin
description (o=) should be also changed.
</para></listitem>
<listitem><para>
- <emphasis>c</emphasis> - flags to change the session-level
- SDP connection (c=) IP if media-description also includes
+ <emphasis>c</emphasis> - flags to change the session-level
+ SDP connection (c=) IP if media-description also includes
connection information.
</para></listitem>
<listitem><para>
- <emphasis>s</emphasis> - flags to swap creation with
- confirmation between requests and replies. By default, a
+ <emphasis>s</emphasis> - flags to swap creation with
+ confirmation between requests and replies. By default, a
request creates the RTP session and a reply confirms it. If
swapped, a reply will create the RTP session and a request
will confirm it. The flag is considered depreciated and
@@ -348,7 +348,7 @@ force_rtp_proxy();
rtpproxy_offer() or rtpproxy_answer() instead.
</para></listitem>
<listitem><para>
- <emphasis>w</emphasis> - flags that for the UA from which
+ <emphasis>w</emphasis> - flags that for the UA from which
message is received, support symmetric RTP must be forced.
</para></listitem>
<listitem><para>
@@ -371,7 +371,7 @@ force_rtp_proxy();
</para></listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
+ This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
FAILURE_ROUTE, BRANCH_ROUTE.
</para>
<example>
@@ -568,7 +568,7 @@ unforce_rtp_proxy();
<function moreinfo="none">start_recording()</function>
</title>
<para>
- This command will send a signal to the RTP-Proxy to record
+ This command will send a signal to the RTP-Proxy to record
the RTP stream on the RTP-Proxy.
</para>
<para>
@@ -600,7 +600,7 @@ start_recording();
Disables it if a zero value is given.
</para>
<para>
- The first parameter is the rtp proxy url (exactly as defined in
+ The first parameter is the rtp proxy url (exactly as defined in
the config file).
</para>
<para>
@@ -624,7 +624,7 @@ $ &ctltool; fifo nh_enable_rtpp udp:192.168.2.133:8081 0
<section>
<title><function moreinfo="none">nh_show_rtpp</function></title>
<para>
- Displays all the rtp proxies and their information: set and
+ Displays all the rtp proxies and their information: set and
status (disabled or not, weight and recheck_ticks).
</para>
<para>
@@ -635,7 +635,7 @@ $ &ctltool; fifo nh_enable_rtpp udp:192.168.2.133:8081 0
<function moreinfo="none">nh_show_rtpp</function> usage</title>
<programlisting format="linespecific">
...
-$ &ctltool; fifo nh_show_rtpp
+$ &ctltool; fifo nh_show_rtpp
...
</programlisting>
</example>