----- "Anca Vamanu" <anca(a)voice-system.ro> wrote:
> If you do not use an xcap server, you should set the force_active
> presence module parameter in 1.2.x and presence_xml module parameter
> in
> 1.3 to positive value.
> More info here:
> http://www.openser.org/dokuwiki/doku.php/presence:module-exports
I'm using force-active=1 - still, no NOTIFY information is sent.
Relevant parts from config:
modparam("presence|pua", "db_url", "mysql://openserrw:openserrw@192.168.0.134/openser")
modparam("presence", "server_address", "sip:192.168.0.134:9876")
modparam("presence", "fallback2db", 1)
modparam("presence_xml", "db_url", "mysql://openserrw:openserrw@192.168.0.134/openser")
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "xcap_table", "xcap_xml")
modparam("pua_usrloc", "default_domain", "XXX")
in route:
handle_publish, handle_subscribe on is_method("PUBLISH") and is_method("SUBSCRIBE")
(looks mostly like http://www.openxcap.org/wiki/Installation, but I'm not using openxcap)
Anything else I should have added there?
> > 2. Phone issue. Trying to start subscribe on snom 190 - messages
> There was an wrong match with the dialog;sla event that version 1.3
> has support for. It is fixed now. Thanks.
With last svn update it stops after subscribe, I don't even get 202 OK like before.
Messages from Snom 190:
SUBSCRIBE sip:AAA@XXX;user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.0.112:2078;branch=z9hG4bK-cilxh214xgmc;rport
From: <sip:BBB@XXX>;tag=bhscby89jz
To: <sip:AAA@XXX;user=phone>
Call-ID: 3c26700c5573-eye598917qwu@snom190
CSeq: 1 SUBSCRIBE
Max-Forwards: 70
Contact: <sip:BBB@192.168.0.112:2078;line=g4ev9jb3>
Event: dialog
Accept: application/dialog-info+xml
Expires: 3600
Content-Length: 0
It gets "489 bad event" response.
>From openser output:
ERROR:presence:handle_subscribe: Missing or unsupported event header field value
ERROR:presence:handle_subscribe: event= dialog
Thanks.
OK I got it now working after the update you recommended it.
When I un-subscribe I get now the final notify with:
Subscription-State: terminated;reason=timeout
Thank you very much to everybody for your help and prompt responses.
Regards,
Pascal
On Nov 9, 2007 11:19 AM, Anca Vamanu <anca(a)voice-system.ro> wrote:
>
> You have to take the latest svn repository for the 1.2.x branch:
>
> # svn co
> https://openser.svn.sourceforge.net/svnroot/openser/branches/1.2 openser
>
> More info: http://www.openser.org/mos/view/Download/.
>
> Anca
>
>
> Pascal Maugeri wrote:
> > Do you mean I have to update again with 1.2.2 or should I update to "trunk" ?
> >
> > Thanks
> > Pascal
> >
> > On Nov 9, 2007 11:00 AM, Anca Vamanu <anca(a)voice-system.ro> wrote:
> >
> >> Hello Pascal ,
> >>
> >> Indeed the 1.2.x version did not sent Notify when unSubscribe was
> >> received. It has been fixed in trunk but a back port was forgotten.
> >> It was fixed with the latest commit.
> >>
> >> Thanks and regards,
> >> Anca Vamanu
> >>
> >>
> >> Pascal Maugeri wrote:
> >>
> >>> Hi
> >>>
> >>> I've update to 1.2.2
> >>> (http://openser.svn.sourceforge.net/svnroot/openser/tags/1.2.2/) and I
> >>> get the same problem.
> >>>
> >>> This is the log of openser I get when I try an unsubscribe:
> >>>
> >>> 6(18125) PRESENCE:update_subscription: querying database
> >>> 6(18125) PRESENCE:update_subscription: expires =0 -> deleting from database
> >>> 6(18125) parse_headers: flags=ffffffffffffffff
> >>> 6(18125) check_via_address(10.1.1.7, 10.1.1.7, 0)
> >>> 6(18125) PRESENCE: get_subs_dialog:The query for subscribtion for
> >>> [user]= pascal,[domain]= mydomain.net for [event]= presence.winfo
> >>> returned no result
> >>> 6(18125) PRESENCE:query_db_notify: Could not get subs_dialog from database
> >>> 6(18125) PRESENCE:update_subscription:Could not send notify for presence.winfo
> >>> 6(18125) DEBUG: cleanup_uac_timers: RETR/FR timers reset
> >>> 6(18125) DEBUG: add_to_tail_of_timer[2]: 0xb60af2b8 (414)
> >>> 6(18125) DEBUG:tm:UNREF_UNSAFE: after is 0
> >>> 6(18125) DEBUG:destroy_avp_list: destroying list (nil)
> >>> 6(18125) receive_msg: cleaning up
> >>> 13(18132) DEBUG: timer routine:2,tl=0xb60af2b8 next=(nil), timeout=414
> >>> 13(18132) DEBUG: wait_handler : removing 0xb60af270 from table
> >>> 13(18132) DEBUG: delete transaction 0xb60af270
> >>> 13(18132) DEBUG: wait_handler : done
> >>>
> >>> It looks there is something wrong with my configuration
> >>> "query_db_notify: Could not get subs_dialog from database", doesn't it
> >>> ?
> >>>
> >>> FYI, subscription and notifications work OK.
> >>>
> >>> Regards
> >>> Pascal
> >>>
> >>>
> >>> On Nov 8, 2007 9:40 AM, Bogdan-Andrei Iancu <bogdan(a)voice-system.ro> wrote:
> >>>
> >>>
> >>>> Hi Pascal,
> >>>>
> >>>> be sure you are using the latest version for 1.2 - try using the SVN
> >>>> snapshots for 1.2.2
> >>>>
> >>>> Regards,
> >>>> Bogdan
> >>>>
> >>>>
> >>>> Pascal Maugeri wrote:
> >>>>
> >>>>
> >>>>> Hi
> >>>>>
> >>>>> I'm testing the presence module (OpenSER 1.2) and noticed that there
> >>>>> is no final NOTIFY request sent when I send a SUBSCRIBE to
> >>>>> un-subscribe from a subscription.
> >>>>>
> >>>>> Is there anything to be configured ?
> >>>>>
> >>>>> Regards,
> >>>>> Pascal
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> Users mailing list
> >>>>> Users(a)lists.openser.org
> >>>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users(a)lists.openser.org
> >>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >>>
> >>>
> >>>
> >>
> >
> >
>
>
Daniel,
I found that I was able to do this, and openser accepts it, and inserts a database record...
avp_db_query("insert into sip_responses (response_code, response_reason) values ('$rs','abc')");
That is in a failure block. However, in the failure block, $rs is 0. I
tried putting the avp_db_query into the reply block, and openser tells
me that avp_db_query isn't allowed in the reply block, SO I then tried
putting this:
avp_write("$rs","$avp(result)");
into the reply block, and openser tells me that avp_write can't be used in a reply block.
Argh!
I just want to get a sip response code for the call and put it into the database.
I'm using version 1.1.
Douglas.
----- Original Message ----
From: Daniel-Constantin Mierla <daniel(a)voice-system.ro>
To: Douglas Garstang <dougmig33(a)yahoo.com>
Cc: users(a)lists.openser.org
Sent: Thursday, November 8, 2007 1:30:50 PM
Subject: Re: [OpenSER-Users] Storing SIP Response Codes with avpops?
What version are you using? I just tested with trunk version and all
ok?
For the other issue, just set:
modparam("avpops", "avp_table", "usr_preferences")
Daniel
On 11/08/07 23:20, Douglas Garstang wrote:
> Thanks, but when I try that, I get the following error from openser:
>
> Nov 7 23:17:32 localhost openser[7035]: ERROR:xl_parse_spec: bad
pvar
> name "rr{s.escape.common})') "
> Nov 7 23:17:32 localhost openser[7035]:
> ERROR:avpops:fixup_db_query_avp: wrong format[insert into
> sip_responses (response_code, response_reason) values ('$rs',
> '$(rr{s.escape.common})') ]
> Nov 7 23:17:32 localhost openser[7035]: ERROR: fix_actions: fixing
> failed (code=-1) at cfg line 139
>
> OpenSER also complains that i need to specify an avp table, but since
> I am specifying the table in the query, I don't understand why that's
> required.
>
> Douglas.
>
>
> ----- Original Message ----
> From: Daniel-Constantin Mierla <daniel(a)voice-system.ro>
> To: Douglas Garstang <dougmig33(a)yahoo.com>
> Cc: users(a)lists.openser.org
> Sent: Thursday, November 8, 2007 11:57:35 AM
> Subject: Re: [OpenSER-Users] Storing SIP Response Codes with avpops?
>
> Hello,
>
> On 11/08/07 21:40, Douglas Garstang wrote:
> > All,
> >
> > I'd like to store SIP response codes in mysql using avpops. Is this
> > possible?
> >
> > I tried to do this a few years ago and couldn't find any
> > documentation. Unfortunately, I still can't find any.
> >
> > Can someone post an example? All I can find online is reference
> > documentation for avpops.
> >
> > I'd really like to see a full example with the modparams defining
the
> > table structure, and how I would use avp_write and avp_db_store to
> > write the $rr response code.
> the easiest way is to use avp_db_query(), you can give as parameter
any
> sql query. In your case, you can use in onreply_route:
>
> avp_db_query("insert into sip_responses (response_code,
response_reason)
> values ('$rs', '$(rr{s.escape.common})') ");
>
> You need to create the table sip_responses, with the two string
columns.
>
> Daniel
>
> >
> > Thanks.
> > Douglas.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users(a)lists.openser.org <mailto:Users@lists.openser.org>
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------- Original Message --------
Subject: Re: [OpenSER-Users] Presence module - NOTIFY not sent after
un-SUBSCRIBE
Date: Fri, 09 Nov 2007 12:19:57 +0200
From: Anca Vamanu <anca(a)voice-system.ro>
To: Pascal Maugeri <pascal.maugeri1(a)gmail.com>
References:
<990aed650711050832u17bcebeey5fea7e4b593ebf2b(a)mail.gmail.com>
<990aed650711071336i16268d29v7826e6c40ec580dd(a)mail.gmail.com>
<4732CB99.2020104(a)voice-system.ro>
<990aed650711090100l16fc5cd2h32c94ad0504ac12a(a)mail.gmail.com>
<47342FBF.7060208(a)voice-system.ro>
<990aed650711090210q4112985bt16cbbd28255cdd5f(a)mail.gmail.com>
You have to take the latest svn repository for the 1.2.x branch:
# svn co
https://openser.svn.sourceforge.net/svnroot/openser/branches/1.2 openser
More info: http://www.openser.org/mos/view/Download/.
Anca
Pascal Maugeri wrote:
> Do you mean I have to update again with 1.2.2 or should I update to "trunk" ?
>
> Thanks
> Pascal
>
> On Nov 9, 2007 11:00 AM, Anca Vamanu <anca(a)voice-system.ro> wrote:
>
>> Hello Pascal ,
>>
>> Indeed the 1.2.x version did not sent Notify when unSubscribe was
>> received. It has been fixed in trunk but a back port was forgotten.
>> It was fixed with the latest commit.
>>
>> Thanks and regards,
>> Anca Vamanu
>>
>>
>> Pascal Maugeri wrote:
>>
>>> Hi
>>>
>>> I've update to 1.2.2
>>> (http://openser.svn.sourceforge.net/svnroot/openser/tags/1.2.2/) and I
>>> get the same problem.
>>>
>>> This is the log of openser I get when I try an unsubscribe:
>>>
>>> 6(18125) PRESENCE:update_subscription: querying database
>>> 6(18125) PRESENCE:update_subscription: expires =0 -> deleting from database
>>> 6(18125) parse_headers: flags=ffffffffffffffff
>>> 6(18125) check_via_address(10.1.1.7, 10.1.1.7, 0)
>>> 6(18125) PRESENCE: get_subs_dialog:The query for subscribtion for
>>> [user]= pascal,[domain]= mydomain.net for [event]= presence.winfo
>>> returned no result
>>> 6(18125) PRESENCE:query_db_notify: Could not get subs_dialog from database
>>> 6(18125) PRESENCE:update_subscription:Could not send notify for presence.winfo
>>> 6(18125) DEBUG: cleanup_uac_timers: RETR/FR timers reset
>>> 6(18125) DEBUG: add_to_tail_of_timer[2]: 0xb60af2b8 (414)
>>> 6(18125) DEBUG:tm:UNREF_UNSAFE: after is 0
>>> 6(18125) DEBUG:destroy_avp_list: destroying list (nil)
>>> 6(18125) receive_msg: cleaning up
>>> 13(18132) DEBUG: timer routine:2,tl=0xb60af2b8 next=(nil), timeout=414
>>> 13(18132) DEBUG: wait_handler : removing 0xb60af270 from table
>>> 13(18132) DEBUG: delete transaction 0xb60af270
>>> 13(18132) DEBUG: wait_handler : done
>>>
>>> It looks there is something wrong with my configuration
>>> "query_db_notify: Could not get subs_dialog from database", doesn't it
>>> ?
>>>
>>> FYI, subscription and notifications work OK.
>>>
>>> Regards
>>> Pascal
>>>
>>>
>>> On Nov 8, 2007 9:40 AM, Bogdan-Andrei Iancu <bogdan(a)voice-system.ro> wrote:
>>>
>>>
>>>> Hi Pascal,
>>>>
>>>> be sure you are using the latest version for 1.2 - try using the SVN
>>>> snapshots for 1.2.2
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>>
>>>> Pascal Maugeri wrote:
>>>>
>>>>
>>>>> Hi
>>>>>
>>>>> I'm testing the presence module (OpenSER 1.2) and noticed that there
>>>>> is no final NOTIFY request sent when I send a SUBSCRIBE to
>>>>> un-subscribe from a subscription.
>>>>>
>>>>> Is there anything to be configured ?
>>>>>
>>>>> Regards,
>>>>> Pascal
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users(a)lists.openser.org
>>>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>>>>
>>>>>
>>>>>
>>>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users(a)lists.openser.org
>>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>
>
>
Information on TLS and OpenSER with this specific issues seems to be
scarce.
I have 2 different setups. One with about 130 registrations, one with
about 250. Both with SSLv23 turned on, and TLS is enabled in the phones.
What's odd is after some unknown amount of time, phones start dropping
like files and fail to re-register. (Our registration timer is set at 60
seconds to aid in failover).
What's interesting is it appears that the SSL handshake completely fails
when this starts to happen. The requests from the phones are smaller in
size (733 bytes about 970 for a good one). Suspicion would normally lie
with the phones. They're obviously not doing something right!
Here's the kicker. If I fail over to another OpenSER proxy (we move the
IP over, use the same certs, etc...) everyone comes back up, and
everything is happy for hours, maybe a day, maybe a week, and then it all
starts going downhill again.
I've increased the number of OpenSER children, I've played with the
tcp_persistent_flag. None of these things have stopped the madness.
Anyone have any ideas or thoughts?
--Chris
Hi
I'm testing the presence module (OpenSER 1.2) and noticed that there
is no final NOTIFY request sent when I send a SUBSCRIBE to
un-subscribe from a subscription.
Is there anything to be configured ?
Regards,
Pascal
Hi all,
I was trying to keep persistent registrations in the mysql db, but it
seems that something is broken in the latest svn:
version: openser 1.3.0-pre1-notls (i386/linux)
flags: STATS: Off, EXTRA_DEBUG, USE_IPV6, USE_TCP, DISABLE_NAGLE,
USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
svnrevision: 2:3034M
@(#) $Id: main.c 3015 2007-11-05 13:08:50Z henningw $
main.c compiled on 11:41:03 Nov 6 2007 with gcc 4.1.2
The config that I used for testing is pretty simple:
# ----------- global configuration parameters ------------------------
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
children=1
disable_tcp=yes
# ------------------ module loading ----------------------------------
mpath="/usr/local/lib/openser/modules/"
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
loadmodule "usrloc.so"
modparam("usrloc", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
modparam("usrloc", "db_mode", 1)
loadmodule "registrar.so"
#------------------------- request routing logic -------------------
route{
if (!method=="REGISTER")
record_route();
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
if (!uri==myself) {
append_hf("P-hint: outbound\r\n");
route(1);
};
if (uri==myself) {
if (method=="REGISTER") {
save("location");
exit;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};
route(1);
}
route[1] {
if (!t_relay()) {
sl_reply_error();
};
exit;
}
Here are the relevant debug logs:
Nov 6 12:19:04 localhost /usr/local/sbin/openser[8963]:
core:db_double2str: Error in snprintf
Nov 6 12:19:04 localhost /usr/local/sbin/openser[8963]:
mysql:val2str: error while converting string to double
Nov 6 12:19:04 localhost /usr/local/sbin/openser[8963]:
core:db_print_values: Error while converting value to string
Nov 6 12:19:04 localhost /usr/local/sbin/openser[8963]:
usrloc:db_insert_ucontact: inserting contact in db failed
Nov 6 12:19:04 localhost /usr/local/sbin/openser[8963]:
usrloc:insert_ucontact: failed to insert in database
I can see the in memory registration via `openserctl ul show' command,
but the mysql database is not updated (verified via `openserctl db
show location')
Regards,
Ovidiu Sas
Hi Daniel,
Could please check the latest SVN version of 1.3 - I made a fix there.
If everything ok, I will backport it to 1.2 also.
Regards,
Bogdan
Daniel Grotti wrote:
> *Hi Bogdan,*
>> Hi Daniel,
>>
>> Hmmm....I see - you say (for outgoing scenario) that the location set
>> is initialized with the A destination instead of B destination, right?
> *yes, it's right.*
>> If so, please open a bug report on the tracker.
> *well, on the bug Repert, if I don't set any location (as in the last
> script I have sended), I can see this DEBUG line:
> " DEBUG:cpl_proxy_to_loc_set: rewriting Request-URI with <
> A@A_ip_address>"
>
> where : "A@A_ip_address" is the caller IP address, not the destination
> address (that is B).
> *
>
> *regards.
> daniel
> *
>> regards,
>> Bogdan
>>
>
>
>
>> Daniel Grotti wrote:
>>> Hi bogdan,
>>> If it's my cpl outgoing script configuration, from USER A
>>> ******************************************************
>>> <cpl>
>>> <outgoing>
>>> <address-switch field="destination" subfield="user">
>>> <address is="B">
>>> <proxy />
>>> </address>
>>> </address-switch>
>>> </outgoing>
>>> <cpl>
>>> *******************************************************
>>> When I make a call from A to B, then the script has called, but in
>>> debug I can see that CPL rewrites R-URI with source address
>>> (A@A_ip_address) instead of destination address (B@B_ip_address). So
>>> the message goes back to user A.
>>>
>>> regards,
>>> Daniel
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>> Hi Daniel,
>>>>
>>>> there are no differences - the implementation follows the RFC. For
>>>> incoming calls, the location set is empty, but it can be populated
>>>> by the CPL script during execution. So, when you do "proxy", you
>>>> may have multiple entries in the location set.
>>>>
>>>> The comment in the cpl_sig.c file refers to some implementation
>>>> details - how to process the available location set, depeding if it
>>>> is the first time doing proxy (for the call) or a second time.
>>>>
>>>> regards,
>>>> bogdan
>>>>
>>>> daniel grotti wrote:
>>>>> Hi all,
>>>>> this is what CPL_SIG.c says about forwarding a given message to
>>>>> the given location set:
>>>>>
>>>>> " forwards the msg to the given location set; if flags has set the
>>>>> CPL_PROXY_DONE, all locations will be added as branches,
>>>>> otherwise, the first one will set as RURI (this is ha case when
>>>>> this is the first proxy of the message)
>>>>> The given list of location will be freed, returning 0 instead.
>>>>> Returns: 0 - OK "
>>>>>
>>>>>
>>>>> My question is : which and what is "the first one" location ? Can
>>>>> you explain it better?
>>>>> Because RFC 3880 say that : "For the incoming top-level call
>>>>> processing action, the location set is initialized to the empty set.
>>>>> For the outgoing action, it is initialized to the destination
>>>>> address of the call."
>>>>>
>>>>> So RFC is very clear. I think there are considerable differences
>>>>> between RFC and the behavior of CPL interpreter.
>>>>>
>>>>> Thanks.
>>>>> Daniel
>>>>>
>>
>>
>
So voip-info.org's wiki page on CPL-C notest that the XML processing is
resource consuming and thus common features can be implemented in other
OpenSER modules.
I was under the impression that the upload of a CPL script into openser
caused a binary compile of the script that gets used at runtime to
eliminate the terrible overhead of libxml, etc...
Or am I completely off base?
--Chris
Hey
I've got 2 issues with pub/sub:
1. Openser does correct subscription on grandstream 2020 phone. But then anything happens: register, invite, whatever from monitored phone, openser doesn't generate any notifications for subscribers. Any pointers on it? Is there some variable, that I should set to enable those?
2. Phone issue. Trying to start subscribe on snom 190 - messages sent are:
-----
SUBSCRIBE ...
...
Event: dialog
Accept: application/dialog-info+xml
-----
202 OK
-----
NOTIFY ...
Event: dialog;sla
Subscription-State: active;expires=3600\r\n
-----
489 Bad Event
-----
Anything I can do about it?
I've tried it with svn version with the same effect. Couldn't really find anything in docs that I could change in config. pub/sub is handled with simple handle_publish/handle_subscribe - nothing fancy in config - just location storing on register and message passing.
Thanks for all info.