Greetings All.
I have managed to set up OpenSER with LDAP authentication. Now I would
like it to create memory cached aliases each time a user registers. I
do not wan to use any persistent storage because I have it already it
is my LDAP directory. However, I would like OpenSER to cache those
aliases as doing ldap lookup for every message does not look too apealing
to me.
Let me explain how I see it:
if (is_method("REGISTER"))
{
if(is_present_hf("Proxy-Authorization"))
{
if (!ldap_search("ldap://sipaccounts/ou=dept,o=TELMARK,c=PL?uid,mail,uidNumber,userPassword?one?(uid=$f))
{ #error handling }
ldap_result("uid/$avp(s:username)");
ldap_result("userPassword/$avp(s:password)");
ldap_result("mail/$avp(s:longalias)");
ldap_result("uidNumber/$avp(s:numalias)");
if(pv_proxy_authorize("telmark"))
{
proxy_challenge("telmark", "1");
exit;
}
} else {
proxy_challenge("telmark", "1");
exit;
}
if(!save("location"))
sl_reply_error();
# And here the big thing!
}
What to do to make
save("aliases");
(called twice) save uidNumber and mail (without @domain, these are
transformations, I know) as aliases in usrloc?
PS. Please cc answers I am not a subscriber.
--
Best regards,
>Łukasz<
Ovidiu,
Ok, so now it's routing but it's not selecting the carrier by matching the source IP address in the subscriber table against the IP address of the incoming INVITE. Is that even possible?
If it's not possible, how do I have a different routing table for each OpenSER system? I was going to use my carrier as my OpenSER instance.... that would have worked...
I have these tables...
mysql> select * from carrierroute;
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
| id | carrier | scan_prefix | domain | prob | strip | rewrite_host | rewrite_prefix | rewrite_suffix | comment |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
| 1 | 0 | | 1 | 1 | 0 | 200.1.1.1 | | | NULL |
| 4 | 0 | | 2 | 1 | 0 | 200.1.1.2 | | | NULL |
| 5 | 0 | | 3 | 1 | 0 | 200.1.1.3 | | | NULL |
| 9 | 1 | | 1 | 1 | 0 | 100.1.1.1 | | | NULL |
| 10 | 1 | | 2 | 1 | 0 | 100.1.1.2 | | | NULL |
| 11 | 1 | | 3 | 1 | 0 | 100.1.1.3 | | | NULL |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
6 rows in set (0.00 sec)
mysql> select * from route_tree;
+----+-----------+
| id | carrier |
+----+-----------+
| 1 | Hong Kong |
| 0 | default |
| 2 | San Jose |
+----+-----------+
mysql> select username, domain, cr_preferred_carrier from subscriber;
+----------+----------------+----------------------+
| username | domain | cr_preferred_carrier |
+----------+----------------+----------------------+
| | 192.168.255.53 | 2 |
| | 192.168.1.240 | 1 |
+----------+----------------+----------------------+
----- Original Message ----
From: Ovidiu Sas <osas(a)voipembedded.com>
To: Douglas Garstang <dougmig33(a)yahoo.com>
Cc: Henning Westerholt <henning.westerholt(a)1und1.de>; users(a)lists.openser.org
Sent: Wednesday, March 26, 2008 6:56:15 AM
Subject: Re: [OpenSER-Users] Carrierroute... Do I almost have it???
On Wed, Mar 26, 2008 at 2:31 AM, Douglas Garstang <dougmig33(a)yahoo.com> wrote:
>
> >I am using this module in production with more then 400k routes loaded
> >for 8 different providers and it is working like a charm.
> >As Henning mentioned, the interface is a little bit cumbersome but usable.
> >You can put all the carriers under the same table and prioritize the
> >gateway based on domains. Like tis you don't need to hardcode
> >anything in the config file.
> >
> >Carrierroute was designed to deal with a big amount of routing rules
> >and it is doing an amazing job.
> >LCR was designed to deal with a limited number of routes/gateways but
> >it has a different level of flexibility and a more mature interface.
> >
> >Carrierroute is a brand new module and for sure it will improve in
> >flexibility as times go by (just like the lcr did along releases).
>
> Ovidiu (or anyone else....)
>
> I think I may almost have it..... If I treat all routes as being in the same
> carrier, I can just use cr_rewrite_uri("1","call_id"), and then
> cr_rewrite_uri("2","call_id") in failure_route[1] and
> cr_rewrite_uri("2","call_id") in failure_route[2], correct? I tested this
> and it seems to work. I guess it's up to me then to populate the
> rewrite_host column with a gateway belonging to the cheapest carrier for
> domain 1, the a gateway from the next cheapest carrier for domain 2 and so
> on. Still sound right?
finally you got it ;)
> Here's where it gets a bit tricky. We have OpenSER running in 6 different
> locations. The gateways we use will differ for each location (we always want
> to use the closest gateway belonging to a carrier). So, I figured I could
> use the 'user' functionality in carrierroute to do this. I could simply put
> the domain (IP address) in the domain column, leave the user blank (we don't
> have users... calls are forwarded from asterisk), and then associate a
> carrier in the cr_preferred_carrier column. You can see all that in my
> subscriber table below.
>
> Doesn't seem to work though. When routing a call, OpenSER complains that it
> can't find a default carrier, and then because it seems not to match the
> incoming call against an entry in the subscriber table, it can't find a
> carrier to use, and fails the call.
add a 'default' carrier into the route_tree table
> So... how would I be able to use the source IP address of the asterisk box
> that sends the calls to OpenSER in the subscriber table so that I could have
> different routing entries for each OpenSER system???
>
> Here's my db tables...
>
>
> mysql> select * from route_tree;
> +----+-----------+
> | id | carrier |
> +----+-----------+
> | 1 | Hong Kong |
> | 0 | San Jose |
> +----+-----------+
>
> mysql> select * from carrierroute order by carrier, scan_prefix, domain;
> +----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
> | id | carrier | scan_prefix | domain | prob | strip | rewrite_host |
> rewrite_prefix | rewrite_suffix | comment |
> +----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
> | 1 | 0 | | 1 | 1 | 0 | 200.1.1.1 |
> | | NULL |
> | 4 | 0 | | 2 | 1 | 0 | 200.1.1.2 |
> | | NULL |
> | 5 | 0 | | 3 | 1 | 0 | 200.1.1.3 |
> | | NULL |
> | 9 | 1 | | 1 | 1 | 0 | 100.1.1.1 |
> | | NULL |
> | 10 | 1 | | 2 | 1 | 0 | 100.1.1.2 |
> | | NULL |
> | 11 | 1 | | 3 | 1 | 0 | 100.1.1.3 |
> | | NULL |
> +----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
>
> mysql> select id, username, domain, cr_preferred_carrier from subscriber;
> +----+----------+----------------+----------------------+
> | id | username | domain | cr_preferred_carrier |
> +----+----------+----------------+----------------------+
> | 1 | | 192.168.255.53 | 0 |
> | 2 | | 192.168.255.54 | 1 |
> +----+----------+----------------+----------------------+
>
>
>
>
>
>
> ________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Spam detection software, running on the system "h1063274.serverkompetenz.net", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: ram wrote: > On Mon, Mar 24, 2008 at 3:32 PM, Allan
Jardinel <ajardinel2002(a)yahoo.com> > wrote: > > > I'm using ubuntu 7.10
and install ser 0.9.7 and rtp, after the > > installation i test and it
can call both users, when i try to restart the > > computer xten can not
register anymore so i check the settings and its ok. > > but when i
check the /var/run/ser.pid there is no file, also the > > /tmp/ser_fifo
has no file so restart the ser using the /etc/ser restart or > >
force-reload but still pid and fifo has no file. pls. help me to solve
this > > problem.... > > > > > Hi > > you try run manuall with > > ser
-c -f config file > > see you see any errrors [...]
Content analysis details: (2.3 points, 2.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.3 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email
2.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address
[80.218.12.224 listed in dnsbl.sorbs.net]
Corrected list address.
Andreas Granig wrote:
> Hi Bogdan,
>
> Yes, and I also read some older discussions about this topic like
> http://www.ietf.org/mail-archive/web/sipping/current/msg03071.html but
> still I'm quite uneasy regarding the phrasing in RFC3261 saying "that
> the To tag of the response to the CANCEL and the To tag in the response
> to the original request SHOULD be the same". It doesn't clearly state to
> which response it refers - the final 487 for the INVITE or maybe to
> possible 180/183 (although I understand the consequences and
> implications of parallel forking etc.).
>
> I currently don't have a trace available, but is the To-tag in the 200
> to the CANCEL really the same as the To-tag in 487 to the INVITE, as the
> RFC suggests, or is the 487 just passed through?
>
> Andreas
>
> Bogdan-Andrei Iancu wrote:
>> Hi Andreas,
>>
>> Have you went through this:
>>
>> http://sourceforge.net/tracker/index.php?func=detail&aid=1818469&group_id=1…
>>
>> There is also a reference to a discussion (on the topic) on sip
>> implementers list.
>>
>> Regards,
>> Bogdan
>>
>> Andreas Granig wrote:
>>> Hi,
>>>
>>> Actually, someone pointed out a previous discussion about that issue.
>>> Interesting read.
>>> http://www.openser.org/pipermail/users/2007-October/014049.html
>>>
>>> Andreas
>>>
>>> Andreas Granig wrote:
>>>> Hi,
>>>>
>>>> One more question regarding the CANCEL processing:
>>>>
>>>> RFC says in §9.2 regarding the 200 for a CANCEL:
>>>>
>>>> #+
>>>> This response is
>>>> constructed following the procedures described in Section 8.2.6
>>>> noting that the To tag of the response to the CANCEL and the To tag
>>>> in the response to the original request SHOULD be the same.
>>>> #-
>>>>
>>>> OpenSER (1.3.1) on the other hand does generate a different To-tag
>>>> and doesn't use the one from the response of the original request.
>>>> Why is that? Anything we can do about this?
>>>>
>>>> Best regards,
>>>> Andreas
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users(a)lists.openser.org
>>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>>
>>
>
>I am using this module in production with more then 400k routes loaded
>for 8 different providers and it is working like a charm.
>As Henning mentioned, the interface is a little bit cumbersome but usable.
>You can put all the carriers under the same table and prioritize the
>gateway based on domains. Like tis you don't need to hardcode
>anything in the config file.
>
>Carrierroute was designed to deal with a big amount of routing rules
>and it is doing an amazing job.
>LCR was designed to deal with a limited number of routes/gateways but
>it has a different level of flexibility and a more mature interface.
>
>Carrierroute is a brand new module and for sure it will improve in
>flexibility as times go by (just like the lcr did along releases).
Ovidiu (or anyone else....)
I think I may almost have it..... If I treat all routes as being in the same carrier, I can just use cr_rewrite_uri("1","call_id"), and then cr_rewrite_uri("2","call_id") in failure_route[1] and cr_rewrite_uri("2","call_id") in failure_route[2], correct? I tested this and it seems to work. I guess it's up to me then to populate the rewrite_host column with a gateway belonging to the cheapest carrier for domain 1, the a gateway from the next cheapest carrier for domain 2 and so on. Still sound right?
Here's where it gets a bit tricky. We have OpenSER running in 6 different locations. The gateways we use will differ for each location (we always want to use the closest gateway belonging to a carrier). So, I figured I could use the 'user' functionality in carrierroute to do this. I could simply put the domain (IP address) in the domain column, leave the user blank (we don't have users... calls are forwarded from asterisk), and then associate a carrier in the cr_preferred_carrier column. You can see all that in my subscriber table below.
Doesn't seem to work though. When routing a call, OpenSER complains that it can't find a default carrier, and then because it seems not to match the incoming call against an entry in the subscriber table, it can't find a carrier to use, and fails the call.
So... how would I be able to use the source IP address of the asterisk box that sends the calls to OpenSER in the subscriber table so that I could have different routing entries for each OpenSER system???
Here's my db tables...
mysql> select * from route_tree;
+----+-----------+
| id | carrier |
+----+-----------+
| 1 | Hong Kong |
| 0 | San Jose |
+----+-----------+
mysql> select * from carrierroute order by carrier, scan_prefix, domain;
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
| id | carrier | scan_prefix | domain | prob | strip | rewrite_host | rewrite_prefix | rewrite_suffix | comment |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
| 1 | 0 | | 1 | 1 | 0 | 200.1.1.1 | | | NULL |
| 4 | 0 | | 2 | 1 | 0 | 200.1.1.2 | | | NULL |
| 5 | 0 | | 3 | 1 | 0 | 200.1.1.3 | | | NULL |
| 9 | 1 | | 1 | 1 | 0 | 100.1.1.1 | | | NULL |
| 10 | 1 | | 2 | 1 | 0 | 100.1.1.2 | | | NULL |
| 11 | 1 | | 3 | 1 | 0 | 100.1.1.3 | | | NULL |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
mysql> select id, username, domain, cr_preferred_carrier from subscriber;
+----+----------+----------------+----------------------+
| id | username | domain | cr_preferred_carrier |
+----+----------+----------------+----------------------+
| 1 | | 192.168.255.53 | 0 |
| 2 | | 192.168.255.54 | 1 |
+----+----------+----------------+----------------------+
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
Hi,
One more question regarding the CANCEL processing:
RFC says in §9.2 regarding the 200 for a CANCEL:
#+
This response is
constructed following the procedures described in Section 8.2.6
noting that the To tag of the response to the CANCEL and the To tag
in the response to the original request SHOULD be the same.
#-
OpenSER (1.3.1) on the other hand does generate a different To-tag and
doesn't use the one from the response of the original request. Why is
that? Anything we can do about this?
Best regards,
Andreas
Hi All
My UA cant connect to tls on my openser server, as per logs everything
seems fine ..I don't know why it disconnects in the end ..the log is
http://java.pastebin.ca/948774
My TLS settings are
/* uncomment the following lines to enable TLS support (default off) */
#disable_tls = yes
disable_tls = no
listen = tls:xx.xx.x.xx.x
tls_verify_server = 1
tls_verify_client = 1
tls_require_client_certificate = 0
tls_method = TLSv1
#tls_certificate = "/usr/local/eyeball/license/cert.pem"
#tls_private_key = "/usr/local/eyeball/license/privkey.pem"
#tls_ca_list = "/usr/local/eyeball/license/splendor3.crtpvk.pem"
tls_certificate = "/usr/local/etc/openser/tls/user/user-cert.pem"
tls_private_key = "/usr/local/etc/openser/tls/user/user-privkey.pem"
tls_ca_list = "/usr/local/etc/openser/tls/user/user-calist.pem"
#port=5060
/* uncomment and configure the following line if you want openser to
bind on a specific interface/port/proto (default bind on all
available) */
listen=udp:87.236.144.13:5060
#listen=tcp:87.236.144.12:5060
sip_warning=yes
Hi Valerio,
not sure if this will be sufficient as, as far I understood, you take
care only on signalling part. You should also look for RTP stream.
Regards,
Bogdan
Valerio Di Marino wrote:
> Hi Andrei,
> thanks for your answer: I already seen the file redirect.cfg.
>
> My doubt is about the possibility to solve the problem with NAT.
>
> Using a public proxy I need to open several ports on the canopy router
> (see my first message): in other case I can't listen the caller.
> Mi idea is to install a redirect server in my network, on a my public
> machine, pointing my ATA on this: redirect server will redirect data
> to the public proxy server. Is it possible to do this, and should this
> configuration solve my problem ?
>
> In this moment, I cant try this solution...
>
> Thanks
> Valerio
>
> 2008/3/25, Bogdan-Andrei Iancu <bogdan(a)voice-system.ro
> <mailto:bogdan@voice-system.ro>>:
>
> Hi Valerio,
>
> If you want to learn how to do redirect with openser, take a look at:
> examples/redirect.cfg
>
> in the SVN tree.
>
> Regards,
> Bogdan
>
>
> Valerio Di Marino wrote:
> > Good morning to all.
> >
> > I am Valerio, and this im my first post.
> > I was never using OPENSER: I discovered it this morning,
> searcing for
> > a solution.
> >
> > I have this situation: I am using Motorola Canopy wireless
> antennas to
> > deploy internet connection, but it implements a symmetric NAT which
> > make not operating STUN protocol.
> > I think that one of solution should be to install a proxy server
> which
> > redirects registering and calls to the public proxy (euteliavoip).
> > I thought that OPENSER should be a good solution: can you
> confirm this?
> > Thanks for every your suggestions.
> > Valerio
> >
> >
> >
> >
> >
>
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users(a)lists.openser.org <mailto:Users@lists.openser.org>
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
>
>
>
>
>I am using this module in production with more then 400k routes loaded
>for 8 different providers and it is working like a charm.
>As Henning mentioned, the interface is a little bit cumbersome but usable.
>You can put all the carriers under the same table and prioritize the
>gateway based on domains. Like tis you don't need to hardcode
>anything in the config file.
>
>Carrierroute was designed to deal with a big amount of routing rules
>and it is doing an amazing job.
>LCR was designed to deal with a limited number of routes/gateways but
>t has a different level of flexibility and a more mature interface.
Ovidiu, ok... but I'm still a bit confused. How do you simulate LCR with carrierroute?
Doug.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ