Hi Robert, remove_hf() does not interfere with the dialog stuff at all....only the loose_route() - its presence in the script is mandatory for dialog module to work.
I do not have the big picture of your cfg, but for the getting rid of the proxy-auth hdr, you should simply use the algorithm: if you do auth -> use consume_credentials -> if no auth, use remove_hf() Regards, Bogdan Robert Borz wrote: > Hi Bogdan, > > sorry for delay... I think I found the reason why my dialogs didn't get > cleared correctly. > > I had issues with some SIP phones including proxy auth. credentials in loose > routed ACK and BYE messages (see "Contents of ACK in up-to-date RFC3261", > http://lists.opensips.org/pipermail/users/2009-January/002639.html). > > Because I wanted to remove the credentials for upstream and avoid the > annoying error message "ERROR:auth:consume_credentials: no authorized > credentials found (error in scripts)", I included the following code snippet > in my outbound route around the "consume_credentials()" function: > > if (is_present_hf("Proxy-Authorization")) { > if (loose_route() && is_method("ACK|BYE")) { > remove_hf("Proxy-Authorization"); > } else { > consume_credentials(); > } > } > > After commenting out my additions, the "ERROR:auth:consume_credentials: no > authorized credentials found (error in scripts)" message reappeared, but all > dialogs get cleared correctly and the error message from the dialog module > disappeared. Maybe the "remove_hf()" function is the problem here? > > > Regards, > Robert > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Bogdan-Andrei Iancu > Sent: Monday, March 09, 2009 2:08 PM > To: [email protected] > Cc: [email protected] > Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use > > Hi Robert, > > Please post the dialog module parameters and the SIP trace for the call > with x-lite - I will check if xlite does something wrong in the > signalling. Also please attach the full debug log (debug=6) from > opensips (for the call). > > Thanks and regards, > Bogdan > > Robert Borz wrote: > >> Hi Brett, >> >> after having a look at it with "opensipsctl fifo dlg_list" I can see, that >> after the BYEs, the dialog gets still listed. The only value which >> distinguishes the call during the dialog and after the dialog is the value >> of the "timeout" attribute. >> >> If I exchange the X-Lite client by the snom soft-client, the dialog gets >> correcntly destroyed and is not listed in the dialog list anymore after >> hangup. >> >> Could you have a look at it using the free x-lite client from counterpath >> (www.counpterpath.com) and verify my issue, please? Maybe it is not >> regarding to my configuration but to the client... :-( >> >> >> Regards, >> Robert >> >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] >> Sent: Friday, March 06, 2009 11:28 PM >> To: 'Brett Nemeroff'; [email protected] >> Cc: [email protected] >> Subject: RE: [OpenSIPS-Users] Restrict Simultaneous-Use >> >> Hi Brett, >> >> no, didn't have a look at it, yet. Thanks for the hint, I'll do it. The BYE >> is there... but after some traces via ngrep/tcpdump I wasn't sure if my >> Asterisk (1.4) really sent included the did-information within the >> record-route header in every case (depending if the caller ort he calle >> hangs up the call). Nevertheless, I tested the different matching modes 0, 1 >> and 2 - without any difference. >> >> Now I also tried downgrading opensips to 1.4.4 without success. Afterwards >> upgraded asterisk to 1.6 (because I always wanted SST support) and doing the >> same, without the create_dialog() function in OpenSIPS (as in your snippet) >> - same result. I received warnings like: >> >> WARNING:dialog:dlg_onroute: unable to find dialog for BYE with route param >> '3e9.031ba213' >> >> So I started thinking about my software-client for testing (X-Lite) is the >> reason form y problems. So I used the software-phone from snom, which >> doesn't show the same behaviour. So I exchanged the x-lite client by a >> grandstream voip phone - again, the same. :-( >> >> I'm really confused, my configuration was working with the last release from >> OpenSER, but there I wasn't using the dialog module. >> >> >> Regards, >> Robert >> >> >> >> ________________________________________ >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Brett Nemeroff >> Sent: Friday, March 06, 2009 11:12 PM >> To: [email protected] >> Cc: [email protected] >> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >> >> It was in regards to me loose routing problems I had.. but in my call >> traces, I simply wasn't getting a BYE back from the carrier. >> >> Since I've gotten that resolved, my dialog count is nice and clean. nothing >> left open for the dialog expiration timeout. Have you looked at the output >> of: >> opensipsctl fifo dlg_list ? >> >> On Fri, Mar 6, 2009 at 10:21 AM, Robert Borz <[email protected]> wrote: >> I'm sure not setting the profile twice. I wrapped the part by setting a flag >> and now I additionally used the is_in_profile() method to preventing setting >> the profile twice. >> >> Hmm, I've really no idea at the moment. >> >> Can you give me the subject of the thread you're meaning? Which mailing list? >> >> Thank you. >> >> >> Robert. >> >> ________________________________________ >> From: [email protected] [mailto:[email protected]] >> Sent: Friday, March 06, 2009 4:10 PM >> To: [email protected] >> Cc: [email protected]; [email protected] >> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >> >> Is it possible that you are setting the profile more than once ever? if you >> are, that could be the problem. I don't think anything prevents that from >> happening, and if you added it twice, the destruction of the dialog would >> only reduce the count by one, instead of two. I may be wrong here.. The >> times I've had dialogs left open that couldn't get cleared, I had >> record-routing problems (see list history!) or I was doing something silly >> with setting the profiles >> >> BTW, I do this now. I'm not sure if it's even necessary. I'm using 1.4, so I >> don't have a create_dialog() function.. >> if (!is_in_profile("SRC","$si")) { >> set_dlg_profile("SRC","$si"); >> } >> >> Now, if I could pull avps from memory. that'd be sweet. :) I'm going to >> upgrade when 1.5 is released and then we'll start with the memcache fun. :) >> -BRett >> >> >> >> On Fri, Mar 6, 2009 at 9:04 AM, Robert Borz <[email protected]> wrote: >> Hi Brett, >> >> thanks for the hints, but doesn't work for me. >> The did information in the record route header and the BYEs are there. >> I also tried the other two match modes, with no success. :-( >> >> Any idea? >> >> >> Regards, >> Robert >> >> ________________________________________ >> From: [email protected] [mailto:[email protected]] >> Sent: Friday, March 06, 2009 3:32 PM >> To: [email protected] >> Cc: [email protected]; [email protected] >> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >> >> Check to be sure you really get the BYE at the end of the call. >> >> Also take a look at the bye and see if the 'did=' is in there, if it's not >> (ie: if the other end UAC removes it, which it really shouldn't) then you >> may need to change your dialog match mode. See the dialog module docs for >> that. >> >> -Brett >> >> On Fri, Mar 6, 2009 at 7:25 AM, Robert Borz <[email protected]> wrote: >> Hi Bogdan, >> >> now I'm currently using the svn head of opensips version 1.5. >> >> I succeeded in pushing the channel value from the radius server into >> opensips by an SIP-AVP in the auth-reply. :-) >> >> But I've got problems with the dialog profiling. Maybe I'm missing something >> here. At the moment I've got the following configuration for the dialog >> module: >> >> ---------------------------------------------------------------------------- >> loadmodule "dialog.so" >> modparam("dialog", "dlg_flag", 4) >> modparam("dialog", "profiles_with_value", "caller") >> ---------------------------------------------------------------------------- >> >> >> Following the link you told me I do the following in my invite-route after >> radius_proxy_authorize(): >> >> ---------------------------------------------------------------------------- >> if (create_dialog() && set_dlg_profile("caller", "$fu")) { >> xlog("L_INFO", "created dialog/added profile"); >> } >> xlog("L_INFO", "SIP-AVP ===> $avp(s:channels)"); >> >> if (is_avp_set("$avp(s:channels)/n") && avp_check("$avp(s:channels)", >> "gt/i:0")) { >> get_profile_size("caller", "$fu", "$avp(s:active_channels)"); >> xlog("L_INFO", "===> User has $avp(s:active_channels) active >> channels!"); >> } >> setflag(4); >> ---------------------------------------------------------------------------- >> >> The log statements prints "===> User has 1 active channels!" when the first >> invite comes in. But the number doesn't decrease when the dialog gets >> finished. With the next invite (doesn't matter if the previous dialog is >> alive), it prints " ===> User has 2 active channels!" and so forth. >> >> Any idea what's wrong here? >> >> >> Regards, >> Robert >> >> >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] >> Sent: Thursday, March 05, 2009 5:55 PM >> To: [email protected] >> Cc: [email protected] >> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >> >> Robert, >> >> if you do auth via RADIUS, you can push some AVPs in the reply: >> >> http://www.opensips.org/html/docs/modules/1.4.x/auth_radius.html#id227162 >> >> The 1.5.0 is plan to be release in 2 weeks from now, if no major bugs >> are discovered :) >> >> Regards, >> Bogdan >> >> Robert Borz wrote: >> >> >>> Hi Bogdan, >>> >>> thank you for this hint. I'll check it out. >>> >>> Yes, I also do auth over radius. Currently I've still OpenSER v1.3.2 >>> installed on debian/lenny and it is working fine. >>> >>> Currently I'm thinking of updating to the latest OpenSIPS release. What's >>> the current schedule for the first stable 1.5 release? >>> >>> >>> Regards, >>> Bogdan >>> >>> >>> -----Original Message----- >>> From: [email protected] >>> [mailto:[email protected]] On Behalf Of Bogdan-Andrei Iancu >>> Sent: Thursday, March 05, 2009 4:57 PM >>> To: [email protected] >>> Cc: [email protected] >>> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >>> >>> Hi Robert, >>> >>> Well, you can use the avp_radius module to load from a RADIUS server the >>> number of maximum allowed calls: >>> http://www.opensips.org/html/docs/modules/devel/avp_radius.html >>> >>> This is the most generic way to do it. >>> >>> Do you do auth via RADIUS also ? >>> >>> Regards, >>> Bogdan >>> >>> Robert Borz wrote: >>> >>> >>> >>>> Hi Bogdan, >>>> >>>> thanks a lot. Looks really pretty with the example you showed. >>>> >>>> My problem is that, depending on the amount of concurrent calls a user can >>>> do, the user belongs to a different group in radius. Imagine a user >>>> belonging to the group 'pots' has a simultaneous call limit of 1, a user >>>> belonging to the group 'isdn' has a limit of 2 concurrent calls... >>>> >>>> All rate information/customer attributes is/are stored in the radius and >>>> we want to keep it like this. So I think I've to get the information about >>>> how many calls the user can do out of the radius into SER to use the >>>> example. Any idea how to do that? >>>> >>>> >>>> Regards, >>>> Robert >>>> >>>> -----Original Message----- >>>> From: [email protected] [mailto:[email protected]] >>>> Sent: Thursday, March 05, 2009 12:49 PM >>>> To: [email protected] >>>> Cc: [email protected] >>>> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use >>>> >>>> Hi Robert, >>>> >>>> You do not need Radius for this. OpenSIPS can do this by itself. See a >>>> nice tutorial on this topic: >>>> http://www.opensips.org/index.php?n=Resources.DocsTutConcurrentCalls >>>> >>>> Regards, >>>> Bogdan >>>> >>>> Robert Borz wrote: >>>> >>>> >>>> >>>> >>>>> Hi, >>>>> >>>>> currently I'm using a FreeRADIUS server for authentication and billing >>>>> purposes. Now I want to restrict the count of simultaneous calls a user >>>>> can do. For this I implemented it with the "Simultaneous-Use" check in >>>>> FreeRADIUS and it works fine, for outgoing calls initiated from my >>>>> customers. Just trying to initiate a second call when one is still up, >>>>> the request is rejected (Proxy authorization fails for the new call). >>>>> >>>>> But incoming calls from the PSTN come in over an Asterisk machine. >>>>> There's no proxy authorization for invites from the Asterisk, just a >>>>> from_gw() check. So how I can restrict the amount of simultaneous calls >>>>> per user for incoming _and_ outgoing calls? >>>>> >>>>> >> >> >> >> >> >>>>> Any hint would be really appreciated... >>>>> >>>>> >>>>> Regards, >>>>> Robert >>>>> >>>>> >>>>> _______________________________________________ >>>>> Users mailing list >>>>> [email protected] >>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >>> >>> >>> >>> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
