You can rate sip calls to specific SIP URIs, which are not telephone
numbers in CDRTool.
The SIP URIs must be fully qualified, that is you can set a price for
user(a)example.com
but you cannot do a wildcard matching for *(a)example.com
Just add the SIP URI in the destination table as any other PSTN prefix.
Regards,
Adrian
>>>>>>>>>
Apologies if this is off-topic here, but this seemed like a good
friendly place to ask. Apologies for being so naïve also...
Question is, how can I get cdrtool to rate voip-to-voip calls when
destination is non-numeric? As in, say, sip:holmes at example.com calls
sip:watson at example.com. How do I get cdrtool to match *(a)example.com
or *(a)example2.com? (FWIW, I'm just trying to see how this works... no
plan of rolling out this Evil Scheme into a real world deployment.)
While cdrtool has decent documentation, I wish this was a little more
easy on me. Has anyone read/reviewed this book yet?
http://www.packtpub.com/building-telephony-systems-with-openser/book
I'm specifically interested in the "Billing with Freeradius and
CDRTool" part.
Thanks,
Sajith.
Hi,
we are done all the configuration of presence module in openser.cfg
file
set all the parameters..........i.e.
modparam("presence|presence_xml", "db_url",
"mysql://openser:openser@localhost/openser")
modparam("presence_xml", "force_active", 1)
modparam("presence", "server_address", "sip:domain:5060")
modparam("presence", "fallback2db", 1)
modparam("presence", "presentity_table", "presentity")
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "watchers_table", "watchers")
modparam("presence", "clean_period", 100)
modparam("presence", "to_tag_pref", 'pres')
modparam("presence", "expires_offset", 10)
modparam("xcap_client", "db_url",
"mysql://openser:openser@localhost/openser")
modparam("xcap_client", "xcap_table","xcap")
modparam("presence_xml", "db_url",
"mysql://openser:openser@localhost/openser")
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "xcap_table", "xcap")
modparam("presence_xml", "pidf_manipulation", 1)
modparam("presence_xml", "integrated_xcap_server", 1)
and route the PUBLISH and SUBSCRIBE massages
if( is_method("PUBLISH|SUBSCRIBE"))
route(2);
route[2] is:::::
route[2]
{
sl_send_reply("100","trying");
if (!t_newtran())
{
sl_reply_error();
exit;
};
if(is_method("PUBLISH"))
{
if($hdr(Sender)!= NULL)
handle_publish("$hdr(Sender)");
else
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
t_release();
}
exit;
}
when we are run X-lite is asking you want to allow or deny the
user-B...........
but not showing online even we are allow the user-B..........
when we are allow the user x-lite not send any type of message......
we see in Notify openser sending a notify with watcher-list but with the
status pending inside XML format.
please tell me where we are wrong????????????
there is a problem with X-lite or our configuration?????
Thanks in advance
Amit Vijayvargiya
Dear All:
I want to use SER's Presence module to do presence server , but someone say it's not stable , so ,
1. Does anyone could tell me why it doesn't stable ? because it looks work after i do some testing with eyebeam.
2. how does openser's presence ? is it better than SER's presence ?
thanks,
allan
DISCLAIMER:
Sample Disclaimer added in a VBScript.
Have you found any solution for this issue ?
I'm facing with a similar problem (not the same because the source of
same error is line 520).
Thanks in advance
Francesco la Torre
IIT/CNR-Pisa
Guys,
while dealing with presence/presence_xml modules, I came into one situation
when one user crashes simultaneously and each time displaying different
presence info (online, away, offline). Have noticed that the presence server
is smart enough to inform all the other watchers about three different
status information for the same user.
My question is, how can the watcher know the most recent status information.
Have looked on both order of info in the tuple as well as on ids but did not
find any logic. Can u please guide me about possibilities I have?
Thank you in advance,
DanB
PS: FYI, I am pasting such a tuple example.
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="t9062">
<status xmlns="urn:ietf:params:xml:ns:pidf">
<basic>closed</basic>
</status>
</tuple>
<dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
id="p8838"><rpid:activities/></dm:person>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="t5358">
<status><basic>open</basic></status><contact>sip:user@domain.com<sip%3Auser(a)domain.com>
</contact><note>Online</note>
</tuple>
<dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
id="p4226"><rpid:activities><rpid:away/></rpid:activities></dm:person>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="t7139">
<status><basic>open</basic></status><contact>sip:user@domain.com<sip%3Auser(a)domain.com>
</contact><note>Away</note>
</tuple>
<dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
id="p4606"><rpid:activities/></dm:person>
<tuple xmlns="urn:ietf:params:xml:ns:pidf" id="t5632">
<status><basic>open</basic></status><contact>sip:user@domain.com<sip%3Auser(a)domain.com>
</contact><note>Online</note>
</tuple></presence>
Hi Friends,
I have the following route plan in my openser.cfg all blocks are working well instead of 800800.
if (uri=~"sip:800800[1-9][0-9]+@.*") {
rewritehostport("officePBX-IP:5060");
route(1);
exit;
} else if ($(rU{s.len})>=8) {
rewritehostport("MyPSTNprovider-IP:5061");
route(1);
exit;
}else{
lookup("location");
route(1);
exit;
};
When i am trying to call 800800 the error message appearing is "513 Message too big" 800800 is routed to the asterisk for our internal office's extensions.
Pls guide us how i can solve this issue.
Regards,
www.Go4Calls.Com
VoIP Forums
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx…
Hello Sir,
I have been able to make the DISC code compatible with
openser-1.1.1-notls. I have eliminated some of the bugs which were there
in the source code of DISC.But the thing is that the disc code is not
able to work with x86_64 architecture. But it is successfully running
with i386 arch. Could u please suggest me the neccessary task,i have to
perform in order to make DISC compiled on x86_64 arch.
I tried taking the successfully running code from i386 arch and copying
it on x86_64 arch and then to compile it, but it is giving some
architecture compilation problem which is given below.
In file included from ../mem/shm_mem.h:53,
from avp.c:33:
../mem/../lock_ops.h:182:2: error: #error "no locking method selected"
../mem/../lock_ops.h:265:2: error: #error "no lock set method selected"
In file included from avp.c:33:
../mem/shm_mem.h:79: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '*' token
../mem/shm_mem.h: In function '_shm_malloc':
../mem/shm_mem.h:111: warning: implicit declaration of function 'lock_get'
../mem/shm_mem.h:111: error: 'mem_lock' undeclared (first use in this
function)
../mem/shm_mem.h:111: error: (Each undeclared identifier is reported
only once
../mem/shm_mem.h:111: error: for each function it appears in.)
../mem/shm_mem.h:113: warning: implicit declaration of function
'lock_release'
avp.c: In function 'AAACreateAVP':
avp.c:124: warning: passing argument 3 of '_shm_malloc' discards
qualifiers from pointer target type
avp.c:140: warning: passing argument 3 of '_shm_malloc' discards
qualifiers from pointer target type
avp.c: In function 'AAAFreeAVP':
avp.c:321: error: 'mem_lock' undeclared (first use in this function)
avp.c:321: warning: passing argument 4 of 'qm_free' discards qualifiers
from pointer target type
avp.c:323: warning: passing argument 4 of 'qm_free' discards qualifiers
from pointer target type
avp.c: In function 'AAACloneAVP':
avp.c:438: warning: passing argument 3 of '_shm_malloc' discards
qualifiers from pointer target type
avp.c:448: warning: passing argument 3 of '_shm_malloc' discards
qualifiers from pointer target type
avp.c:451: error: 'mem_lock' undeclared (first use in this function)
avp.c:451: warning: passing argument 4 of 'qm_free' discards qualifiers
from pointer target type
make[2]: *** [avp.lo] Error 1
Please Do help me ,to sort out the problem.
regards,
Dilip
Hi,
I have an asterisk server running with an private IP. This asterisk
forwards all calls to a SER server with a public IP. The SER server then
forwards its calls to a public SIP provider. The problem now is that SER
tries to stay in the loop which it shouldn't because there is no media
proxy running. I don't get any audio because of this issue. But if I
register the asterisk box directly to the SIP provider it works. Does
anybody know how to fix this.
My ser.cfg
debug=4 # debug level (cmd line: -dddddddddd)
#debug=0
fork=no
log_stderror=yes # (cmd line: -E)
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#listen=0.0.0.0
#listen=82.98.89.140
port=5060
children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
#loadmodule "/opt/ser/lib/ser/modules/mysql.so"
loadmodule "/usr/local/ser/lib/ser/modules/sl.so"
loadmodule "/usr/local/ser/lib/ser/modules/tm.so"
loadmodule "/usr/local/ser/lib/ser/modules/rr.so"
loadmodule "/usr/local/ser/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/ser/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/ser/lib/ser/modules/registrar.so"
loadmodule "/usr/local/ser/lib/ser/modules/textops.so"
loadmodule "/usr/local/ser/lib/ser/modules/avpops.so"
#loadmodule "/usr/local/ser/lib/ser/modules/group.so"
loadmodule "/usr/local/ser/lib/ser/modules/xlog.so"
loadmodule "/usr/local/ser/lib/ser/modules/auth.so"
loadmodule "/usr/local/ser/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/ser/lib/ser/modules/uri.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
#loadmodule "/opt/ser/lib/ser/modules/auth.so"
#loadmodule "/opt/ser/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
modparam("rr", "enable_full_lr", 1)
#modparam("registrar", "nat_flag", 6)
#modparam("nathelper", "natping_interval", 30) # Ping interval 30 s
#modparam("nathelper", "ping_nated_only", 1) # Ping only clients
behind NAT
# ------------------------- 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 >= 2048 ) {
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=="ACK") {
route(1);
break;
}
if (method=="REGISTER") {
#record_route();
save("location");
break;
};
if (method=="INVITE") {
#if (uri =~ "sip:[0-9]@*") {
# if (nat_uac_test("19")) {
# fix_nated_contact();
# fix_nated_sdp("3");
# }
# route(3);
# break;
#}
if (uri =~ "sip:[0-9]@*") {
# record_route();
route(3);
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();
};
}
route[3]
{
if (uri =~ "sip:[0-9]@*") {
log(1, "Forwarding to mg3.net-m.de \n");
#rewritehostport("192.168.13.102:5060");
rewritehostport("62.214.145.199:5060");
#forward(62.214.145.199, 5060);
route(1);
break;
}
}
My extensions.conf
[toser]
exten => _X.,1,Dial(sip/${EXTEN}(a)82.98.89.139)
Thanks for any help
Ciao
Thorsten
HI,
I use aliases table set sip forwarding.
During the forwarding I want to do is set FROM uri to a different
sip address. ( I want to hide the original FROM uri).
How do I do it? I check the cook book and don't see any function
that I can use to do that work.
Any hint?
Thanks,
Stanley
hi,
i m add presence module in openser 1.3.
but it not working properly.
when x-lite send a subscribe to client-B, it receive notify but
with different body.
i see in the table presentity it shows right body.
where is the problem?????
my configuration like this for subscribe and publish......
route[2]
{
sl_send_reply("100","trying");
append_to_reply("Contact: <sip:sip.pyrogroup.com:5060>\r\n");
if (!t_newtran())
{
sl_reply_error();
exit;
};
if(is_method("PUBLISH"))
{
if($hdr(Sender)!= NULL)
handle_publish("$hdr(Sender)");
else
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
t_release();
}
exit;
}
Thanks & Regards,
Amit