Hey all,
I have a question regarding usrloc. I have run into a problem..
We have static routes sent to an asterisk server for all of our SIP
usernames. In addition our IAD's will register with the same username, so
that calls coming into our switch for that username will be routed to both
the asterisk box and the SIP IAD. This way, whichever endpoint (IAD or
asterisk) answers the call first will take the call.
For example.
root:/ # serctl ul show +18646404810
<sip:+18646404810@192.168.1.60>;q=1;expires=-1012151
<sip:+18646404810@192.168.1.157:5060>;q=;expires=403
192.168.1.60 is the asterisk server. This is a static route added by
serctl.
192.168.1.157 is my IAD which registers with the switch every 10 minutes.
So when calls are made to (864) 640-4810 then SER will send an INVITE to
both location.
I explained all of this just to explain now what my problem is, and ask if
anyone may know a possible solution.
Now, we also use asterisk to perform call fwd'ing functions. Asterisk will
answer the call and then originate another call out back to SER to a new
location. Now the problem! (finally!) This call fwd'ing method works very
well in most cases, except that if the call fwd'ing is being sent to another
location registered with SER then it will be redirected back to asterisk
again, albeit to a different URI, and asterisk will kill the call because it
thinks that it has looped (which I guess it has. sort of).
So, I'm wondering if there is possibly a way to retrieve only the usrloc
locations that don't contain the IP address 192.168.1.60 in the contact URI?
This way I can just check if the src_ip is 192.168.1.60 and if so then
retrieve all the usrloc locations - without asterisk - and the call will not
be redirected back to asterisk.
Is this possible? Or if anyone has any other ideas that may help then I am
definitely open to suggestions.
Thanks for your help!!
Darren Nay
Ionosphere, Inc
VoIP Network Development
dnay(a)ionosphere.net
Hello
I have two Cisco 7940 phones with private addresses (10.0.11.239 and
10.0.11.140) connected to SER also with private address (10.0.0.135),
but in another network.
My SER is with the default configuration.
Between the networks I have a Checkpoint Firewall-1NG
The Cisco IP phones can register because the REGISTER packets arent blocked.
But the INVITEs never reach SER (I checked with ngrep), because the
Firewall drops them, saying there was an illegal redirection.
The most strange part, is that, when I try to make a phone call from
PhoneA(10.0.11.239) to PhoneB(10.0.11.240), the INVITE is dropped before
reaching SER, and it says "Illegal redirection 10.0.0.135->10.0.11.240".
How can the firewall know that the INVITE was going to be redirected by
SER to PhoneB(10.0.11.240) ????
my ser.cfg (the default one):
# $Id: ser.cfg,v 1.25 2004/11/30 16:28:24 andrei Exp $
# simple quick-start config script
# ----------- global configuration parameters ------------------------
debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
listen = 10.0.0.135
/* Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
Hi,
The problem I'm facing is that if I have multiple clients behind the same
firewall, calls between them don't work as each is using the same sip port.
The clients can be made to use a random port, but the registrar server has
to listen on all ports and respond to the client using the port it was sent
on... does SER support this? Is there any other way to solve this problem?
Thanks,
Imran
Hi Sebastian,
not sure if you can do this - a kind of middle registrar; but you can
try to experiment by using the latest UAC module which provides the FROM
mangling and authentication features.
http://www.openser.org/docs/modules/1.1.x/uac.html
regards,
bogdan
BASTARD Sebastien wrote:
> Ok, it seems to work...but I have another question:
> I would like to have a static configuration on the PC on a LAN with a
> local account test1(a)test.net <mailto:test1@test.net>. There is openser
> running on a computer of this LAN which is managing domain test.net
> <http://test.net>.
> I would like to have an association of accounts on the openser server
> (I know asterisk is able to do it):
> SIP client connect to my local openser with account test1(a)test.net
> <mailto:test1@test.net>
> OPENSER associates test1(a)test.net <mailto:test1@test.net> with
> test1(a)iptel.org <mailto:test1@iptel.org> and inform iptel.org
> <http://iptel.org> that this account is managed locally: it's like
> openser act as a client / iptel ser server.
> Then I can be called from outside without problem.
>
> Do you think it's possible to do it or to implement a module for that.
>
> Thanks a lot for your help
> Sebastien
>
> On 11/9/05, *BASTARD Sebastien* <sebastien.bastard(a)gmail.com
> <mailto:sebastien.bastard@gmail.com>> wrote:
>
> Ok, i'm going to try.
>
> Thanks for your help.
>
> sebastien
>
>
> On 11/8/05, *Bogdan-Andrei Iancu* < bogdan(a)voice-system.ro
> <mailto:bogdan@voice-system.ro>> wrote:
>
> Hi,
>
> if I'm not wrong, you are talking about routing outbound requests
> (requests which are not targeting your domain). If so, the
> routing will
> be done via DNS based on the domain name; you do not have to
> specify
> each of them. Just do like:
>
> if (!uri==myself) {
> # this is an outbound call
> t_relay();
> exit;
> }
> # process inbound calls
> ........
>
> regards,
> bogdan
>
> BASTARD Sebastien wrote:
>
>> Hi,
>>
>> I would like to make run openser as a sip client when a client is
>> connecting to it but with an unmanaged domain. I tried with the
>> following configuration but with no result:
>>
>> if (!uri==myself) {
>> # mark routing logic in request
>> append_hf("P-hint: outbound\r\n");
>> # if you have some interdomain connections via TLS
>> if(uri=~" iptel.org <http://iptel.org>") {
>> forward("iptel.org <http://iptel.org>",5060);
>> exit;
>> } #else if(uri=~"@tls_domain2.net") {
>> # t_relay_to_tls("IP_domain2","port_domain2");
>> # exit;
>> #}
>> route(1);
>> };
>>
>> Thanks for any help.
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Users mailing list
>>Users(a)openser.org <mailto:Users@openser.org>
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
>
Hi,
A newbie question:
Is there a way for OpenSER to use SIP headers (other than the URI
set) that have been modified/processed by an external command
(exec_dst, exec_msg)?
Reading the documentation and mailing list archives revealed some
questions similar to mine but no answer.
The problem is: Delegate the change of one or more SIP message
headers (or the whole SIP message) to an external application via
exec module.
Two straight-forward solutions:
1. exec_rmsg() - for "replace message". A merge of the functionality
of exec_dst() and exec_msg(), i.e. OpenSER uses the output of
exec_rmsg(command) to replace the current SIP message. This is
imho an extremly flexible solution but slightly difficult to
implement as it requires at least parsing the command's output
- similar to a message received by OpenSER.
2. The command executed by exec_msg() can modify the environment
variables SIP_HF_<hf_name> and OpenSER reuses these values after
the exec() returned control to SER.
Setvars could be used to switch between the current, read-only
meaning of env-variables (e.g., modparam("exec", "setvars", 1))
and a read-write behavior (e.g. modparam("exec", "setvars", 2).
This solution does not require any special handling except that
OpenSER must read back the content of all environment variables
which were passed to the command. Probably quite easy to implement
but has the drawback that no new header fields can be added.
Imho no major limitation as users can add their (dummy) header
fields prior to invoking the command via exec()
Or is there any other existing/planned procedure for SER to use the
output of external commands for rewriting an existing SIP message.
tia
best regards
--Joachim
hi everyone,
In my configuration, I trust some source ips and if call comes from these src ips, without any authentication they are t_relayed to a gateway ip address for pstn termination.
Is there any potential problems by trusting some clients by src_ips, I do so as I dont want them to login from anywhere else.
I also wanted to know that if I do not get reply from a particular gateway, can I forward them to another gateway. I dont want to use LCR for this. I thought of using failure route, but the call does not fail it keeps on sending invite.
What I wanted to do is, if I dont get a reply within 5 seconds, it will try the next t_relay_to_udp statement.
the logic goes something like this:
if(allow_trusted()) {
if(uri=="sip:011...") {
t_relay_to_udp("to a pstn gateway");
# if no reply for 5 seconds
t_relay_to_udp("to another gateway)
break;
};
};
can somebody pls help on this. I am currently using 0.9.5 and will soon be upgrading to 1.0.0.
Thanks a lot in advance
Jayesh
---------------------------------
Enjoy this Diwali with Y! India Click here
Hi all
I want to know how i can configure the NAT helper module to make call
between 2 LANs separated by internet,or simply to do Nat Transversal?
Can the mediaproxy module help me to do NAT transversal?
Regards!
Hi all
I install openser in a host with private ip. i can make a call
between clients in the same LAN.
But now, i install openser in a host with public IP. I want to make a
call between a client in LAN A and a client in a LAN B. the 2 LANs
are separated by Internet.What can i use the nathelp module and
configure openser to make this call possible?
help me please!