Hi,
I just committed serial proper forking support into core - it was
migrated from LCR module. I mean proper, since it has q value support
and it can be used by any module without any inter-module dependencies.
The idea behind was to allow to all module that performs parallel
forking to do also serial forking - exec, enum, registrar, etc.
There are two new script functions :
*serialize_branches(n)* : it inherits the functionality of
load_contacts() from LCR; gets all parallel branches and convert them
into AVPs for serial forking; numerical parameter 'n' says if any
previous AVP should be removed (if non-0) or not (if 0). Returns true is
no error (even if no serialization happened).
*next_branches()* : it inherits the functionality of
next_contacts() from LCR; get (based on q value) the next contact(s) to
be used in sequential forking. Returns true only if a new contact was
got to be used.
The AVP containing the branches is accessible only via alias - its ID is
not configurable or visible; the alias (automatically exported by core)
is "serial_branch" - it is visible from any module that uses the avp
core aliasing system.
here are some examples of how to uses this new functionality:
1) enum doing serial forking:
{
.....
enum_query("e164.arpa.","voice");
serialize_branches(1);
if (!next_branches()) {
sl_send_reply(...no enum found...);
exit;
}
t_on_failure("1");
t_relay();
}
failure_route[1] {
if (next_branches()) {
t_relay();
}
}
2) same for registrar, just replace enum_query() with
lookup("location"). NOTE that this will not work yet if there are nated
contacts: there is no support to save also the flags and the dst_uri in
order to perform proper nat traversal.
The code was not yet heavily tested, so any help on this is highly
appreciated.
On the TO-DO list, related to this subject are:
1) SRV lookup to use this functionality to provide any additional
entries.
2) full support for registrar for nat traversal
3) remove load/next_contacts() from LCR (once this new functions
prove to be stable).
regards,
bogdan
I don't think this will work.
That means not only would the Asterisk box need to let REGISTER requests through without authentication, it would also need to let every other type of request through (INVITES come from OpenSER as well). You can't drill down to that level of detail in Asterisk and tell it to not authenticate for REGISTERs from OpenSER, but to authenticate for INVITE requests.
Doug
-----Original Message-----
From: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
Sent: Wednesday, November 30, 2005 2:54 PM
To: Douglas Garstang
Cc: users(a)openser.org
Subject: Re: [Users] Sending Authorisation Credentials
configure asterisk to accept REGISTER without authentication, if it is
received from your proxy (IP address)
klaus
Douglas Garstang wrote:
> I have user agents registering with OpenSER. I wanted to 'copy' the registration to an Asterisk server, so I modified a standard openser.cfg as such:
>
> if (method=="REGISTER") {
>
> # Uncomment this if you want to use digest authentication
> if (!www_authorize("voip.com", "subscriber")) {
> www_challenge("voip.com", "0");
> exit;
> };
>
> save("location");
> t_replicate("192.168.10.7","5060"); # Added this line...
> exit;
> };
>
> I just stuck the t_replicate() call in there. OpenSER sends the REGISTER packet to the Asterisk box who requests credentials. How can I get OpenSER to send credentials (ie act as a UAC) for a given user, to a UAS?
>
> Thanks,
> Doug
>
>
> _______________________________________________
> Users mailing list
> Users(a)openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>
hi,
i read the onsip.org <http://onsip.org> getting started manual.
i tried again with ser and rtpproxy but i received same errors...
then i decided to try with mediaproxy:
i downloaded ser-0.9.0 (emerged from gentoo portage) and mediaproxy-1.4.2.
i followed this instructions: http://www.voip-info.org/wiki-MediaProxy
but i cannot even start it (neither --help works)
$ /etc/init.d/mediaproxy start
: bad interpreter: No such file or directory
and:
$ /usr/local/mediaproxy/mediaproxy.py
: No such file or directory
i got ensured that EOL are not dos-style and i tried that a simple file
called test.py (it just prints something) just to make sure that python
works...
sorry, i understand it is not properly a ser problem but i don't know where
else to ask...
thank you so much!
Nevermind, I was putting the username only in the authorization user and it needs the username and the domain ie. bob(a)foobar.com.
Thanks
>>> Klaus Darilion <klaus.mailinglists(a)pernau.at> 11/29/2005 1:56 AM >>>
The SIP_DOMAIN is only used for serctl as default domain (when you
create a new user without specifiying the domain of the SIP AoR).
You can specify the domain for which ser is responsibly (== myself) by
using the alias=... parameter in ser.cfg, e.g.:
alias=foo.combar.comiptel.orgmysipproxy.com
Then you can verify using e.g.
if (uri == myself) ...
Another approach is using the domain module. Then the domains are stored
in a DB table and you can add/delete domains without restarting ser.
Then you have to use the functions provided my the domain module, e.g.
if (is_uri_host_local()) ...
regards
klaus
George Lambson wrote:
> For some reason my SER isn't using the sip domain I specify (export SIP_DOMAIN="whatever.edu"). When my UA registers it will only register if I take out all of the digect authentication from my config file (I leave all of them blank instead of putting in a domain) and then use the host name of my server instead of a domain.
>
> Any ideas what I am doing wrong?
>
> Thanks,
> George
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
Okay, that makes a lot of sense.
But...
I did it and changed the realm accordingly in my UA and now it won't authenticate with either realm.
What now?
>>> Klaus Darilion <klaus.mailinglists(a)pernau.at> 11/29/2005 1:56 AM >>>
The SIP_DOMAIN is only used for serctl as default domain (when you
create a new user without specifiying the domain of the SIP AoR).
You can specify the domain for which ser is responsibly (== myself) by
using the alias=... parameter in ser.cfg, e.g.:
alias=foo.combar.comiptel.orgmysipproxy.com
Then you can verify using e.g.
if (uri == myself) ...
Another approach is using the domain module. Then the domains are stored
in a DB table and you can add/delete domains without restarting ser.
Then you have to use the functions provided my the domain module, e.g.
if (is_uri_host_local()) ...
regards
klaus
George Lambson wrote:
> For some reason my SER isn't using the sip domain I specify (export SIP_DOMAIN="whatever.edu"). When my UA registers it will only register if I take out all of the digect authentication from my config file (I leave all of them blank instead of putting in a domain) and then use the host name of my server instead of a domain.
>
> Any ideas what I am doing wrong?
>
> Thanks,
> George
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
In the scenario below, if the first t_replicate fails because 192.168.10.5 returns "Not Found", the second t_replicate command does not execute. Why? How can I make it execute? Call me crazy, but this doesn't seem at all intuitive to me. In a functional programming world, if the first fails, the next should still run.
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("voip.com", "subscriber")) {
www_challenge("voip.com", "0");
exit;
};
save("location");
t_replicate("192.168.10.5","5060");
t_replicate("192.168.10.7","5060");
exit;
};
Thanks,
Doug.
I hope someone can help answer this question.
I am using Mysql acc table to generate cdr's and I am having problems with
missing BYE records. I am using the totag field as a unique identifier to
match up the INVITES, ACK and BYE's. Is this the field I should be using? I
know ser changes the BYE uri to reflect the uac that issued the BYE but I
don't know if it changes the totag.
Thanks for your reply.
Rick Thompson
I have user agents registering with OpenSER. I wanted to 'copy' the registration to an Asterisk server, so I modified a standard openser.cfg as such:
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("voip.com", "subscriber")) {
www_challenge("voip.com", "0");
exit;
};
save("location");
t_replicate("192.168.10.7","5060"); # Added this line...
exit;
};
I just stuck the t_replicate() call in there. OpenSER sends the REGISTER packet to the Asterisk box who requests credentials. How can I get OpenSER to send credentials (ie act as a UAC) for a given user, to a UAS?
Thanks,
Doug
(I know this is a bit out of topic, please dont feel offended)
Hi there!
I was about to try out CDRTool to see if it does what it says - however,
it doesn't run at all. There is no forum (that i know of) that discusses
CDRTool so i hope someone here can help.
The box is a debian unstable (tried stable aswell) and CDRTools is
installed according to the instructions. When i try to execute ie
something in the scripts/-directory i get the following error:
Warning: main(SOAP/Client.php): failed to open stream: No such file or
directory in /var/www/CDRTool/rating_lib.phtml on line 5
Fatal error: main(): Failed opening required 'SOAP/Client.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/CDRTool/rating_lib.phtml on line 5
Ok, SOAP/Client.php doesn't exist, SOAP/client.php does however. A
symlink ought to solve that problem?
Running in the scripts/-directory again gives the error:
#!/usr/bin/php4
Fatal error: Cannot redeclare class db_sql in
/var/www/CDRTool/phplib/db_mysql.inc on line 13
Now i'm stuck and dont know what to do. If someone has any clues, please
let me know.
Thanks
Martin
Hi folks,
I am new to the mailing lists - unsure as to which list is the most
appropriate I have mailed to both - I apologise for this in advance!
I am using SIPP and SER(v 0.9.4) to load test an application - SIPP is
sending calls via UDP to SER at 15 cps and with a duration of 180
seconds. SER is then forwarding on the calls to the application using
TCP and receiving the replies back over TCP.
However I am seeing quite a few errors in SER after a while. I'd like to
determine if the issues I am seeing are with SER or with the application
itself so I'd appreciate some help with the following errors.
Can someone tell me, for each of the error traces below, what is the
root cause of it and (even better) how I can resolve it for SER - if it
is indeed an issue with SER and not with the application.
1) 123(14715) ERROR: tcpconn_new: mem. allocation failure
123(14715) ERROR: tcp_main_loop: tcpconn_new failed, closing socket
2) 54(14646) ERROR: tsend_stream: failed to send: (32) Broken pipe
54(14646) ERROR: tcp_send: failed to send
3) 65(14785) ERROR: tcp_blocking_connect: SO_ERROR (146) Connection
refused
65(14785) ERROR: tcpconn_connect: tcp_blocking_connect failed
65(14785) ERROR: tcp_send: connect failed
65(14785) msg_send: ERROR: tcp_send failed
4) 63(14783) ERROR: tsend_stream: send timeout (10000)
63(14783) ERROR: tcp_send: failed to send
5) There was also another error on the TCP select loop - select failed:
Too many connections (or something similar).
I have been playing around with the number of descriptors set using
limit but without success.
Like I said, my main concern is to eliminate SER where possible as the
cause of these issues before focusing attention on the application.
Thanks in advance,
Steve.