Re: [SR-Users] simple question but can't find the answer

2011-09-30 Thread Daniel-Constantin Mierla

Hello,

On 9/30/11 12:11 AM, JJ Zeng wrote:


Thanks Daniel.  I followed your advice and install kamailio 3.1.  Now 
I get a weird problem:  it works 1 out 5 times for the relaying.


try to set like tcp_connection_lifetime=3604 global parameter, or to a 
value higher than the longer registration time.


The t_relay is where the the problem is, because I check the response 
code and route(LOCATION)  always succeeds, which means the entries 
exist in "location".


If I don't put set_forward_no_connect, then t_relay will take a long 
time until my client time out.  If I put it, then the client will get 
477 right away.


BTW, the original config didn't work, either.  That's why I started to 
strip down some irrelevant stuff.



What errors you got with the default config?

Cheers,
Daniel


--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Making iPhone SIP client work with Kamailio

2011-09-30 Thread Daniel-Constantin Mierla

Hello,

On 9/30/11 12:51 AM, Krishna Kurapati wrote:


Hi,

The iPhone client, when it goes into background, can only respond
to incoming messages.
That makes the Registration expire when there is no communication
from the server before
the expire time. I could make the Registration not expire at all.
Not sure it's the only option.

Is there a way to send a Ping message from server periodically to
the iPhone SIP client. This
will wakeup the SIP client and resend REGISTER message.

you can set the nat_bflag (see usrloc module) to mark the registration 
as being natted. Then use nathelper module mark it to send OPTIONS ping 
(sipping_bflag parameter).


http://kamailio.org/docs/modules/stable/modules_k/usrloc.html
http://kamailio.org/docs/modules/stable/modules_k/nathelper.html

Cheers,
Daniel

--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as dispatcher fails due to from domain on extension.

2011-09-30 Thread Daniel-Constantin Mierla

Hello,

On 9/29/11 10:28 PM, Henrik Aagaard Sørensen wrote:

I'm using Kamailio as dispatcher to a FreeSwitch setup.

Currently it "almost" work. I have 2 extensions connected to my 
FreeSwitch via Kamailio. However, I can only send calls one way 
because Kamailio seems to change the domain on the extension.
Kamailio is not changing anything by default, if something is changed, 
you executed a function for that. Which domain you think is changed by 
kamailio? Request URI, From or To addresses?


Can you provide ngrep traces of registration and a call for this case? 
Tell what you expected in the content of the sip messages and you think 
kamailio changed.


Cheers,
Daniel



One extension is registered with i...@sip.my-domain.com 
. This I can send calls to.
The other extension is registered with ID@local-ip. This I cannot send 
calls to.


Isn't it possible to have Kamailio register the extension on my 
FreeSwitch with @sip.my-domain.com ?


If I register both extension directly to my FreeSwitch everything works.


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cleaning up presence info when user is deleted

2011-09-30 Thread Daniel-Constantin Mierla

Hello,

just to add that besides having the records in xcap table, if the user 
is removed, it should have no access to it because it will be 
authenticated for that. But since there is no record in subscriber table 
anymore, the authentication will fail always. So besides taking 
harddrive space, it is no impact in SIP side. IIRC, siremis has a web 
interface for xcap, but also the delete operation has to be done manually.


Cheers,
Daniel

On 9/28/11 4:10 PM, Peter Dunkley wrote:

Hello,

You don't need to worry about the contents of the presentity, watcher, 
and active watcher tables.  Entries in these tables will be deleted if 
the user un-subscribes or logs out properly, and failing that 
automatically cleaned up when the records themselves expire.


When you remove a user you probably should remove any documents 
belonging to them in xcap.  At the moment this is a manual process and 
not tied into the kamctl command.


Regards,

Peter

On Tue, 2011-09-27 at 13:49 -0500, Krishna Kurapati wrote:
Hi, 



When a user is removed using "kamctl rm", is there way way to clean 
up presence information 
in the database (xcap, presentity, watcher and active watcher tables) 
and in the cache? Is there a 
event that gets fired when the user  is removed from subscriber table 
which I could handle in config 
file and and cleanup? 





Thanks 
Krish Kura 
___

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org  
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Peter Dunkley
Technical Director
Crocodile RCS Ltd



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SNMPStats and multiple proxies

2011-09-30 Thread Antanas Masevicius
Hello,

it looks like this functionality can be implemented using SNMPv3
contexts. This way snmp agentx subagents would be able to register the
same OID tree with different from default context. The only change we
need is to patch snmpstats module with register context call as
described here:

http://www.net-snmp.org/wiki/index.php/FAQ:Coding_21

We would probably also need some kamailio exported parameter to specify
subagent context. This parameter would only be needed to set if SNMPv3
is about to be used, otherwise default context would be set.

If someone is willing to do it, drop me a note. If not, i would try to
implement this change myself a bit later.
Is there a chance that such change would be accepted into main tree?

best regards,

Antanas Masevicius

On 2011.09.26 08:45, Antanas Masevicius wrote:
> Hello Edson,
>
> as i understand this, Kamailio module SNMPstats does not provide SNMP
> protocol itself it just binds with snmpd via agentx. Thus if you want to
> query with snmp client you have to do it via snmp deamon which only
> relays client requests to kamailio (please correct me if i am wrong
> here). Problem here is that i don't know how to bind more than one
> kamailio instance to single snmpd instance.
>
> best regards,
> Antanas Masevicius
>
>
> On 2011.09.23 18:55, Edson - Lists wrote:
>> There is a SNMP module in Kamailio
>> (http://kamailio.org/docs/modules/stable/modules_k/snmpstats.html)
>>
>> Why didn't you query Kamailio directly? Each one in his own IP/port?
>> Isn't that doable???
>>
>> Edson.
>>
>> Em 23/09/2011 11:47, Antanas Masevicius escreveu:
>>> Hello,
>>>
>>> been trying to run two sip-router proxies in parallel and to feed data
>>> from them to snmpd via agentx. But it looks like snmpd deamon directly
>>> routes snmp request just to one (probably first connected) proxy. What
>>> ways this can be solved? Currenly i am thinking like running two
>>> concurrent snmpd daemons binded to specific IP addresses. Is there a
>>> better way to do it?
>>>
>>> best regards,
>>> -- 
>>> Antanas Masevicius
>>>
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>

-- 
Antanas Masevičius
Technikos direktorius
UAB "Nacionalinis telekomunikaciju tinklas"
Tel.  +370 5 2056000
Tel.  +370 700 00031 (tiesioginis)
Fax.  +370 700 00034
el.p: antanas.masevic...@ntt.lt
www.ntt.lt
www.spykas.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as dispatcher fails due to from domain on extension.

2011-09-30 Thread Henrik Aagaard Sørensen
Hi Daniel.

I can see in FreeSwitch, from the log, this error:
2011-09-30 06:49:58.275812 [ERR] sofia_reg.c:2136 Cannot locate any
authentication credentials to complete an authentication request for realm
'"10.0.1.7"'

That I do not get when connecting directly to FreeSwitch, without Kamailio.
So I guess Kamailio does something?

But I also guess the problem lies with FreeSwitch and not Kamailio, as it is
FreeSwitch not accepting.

2011/9/30 Daniel-Constantin Mierla 

>  Hello,
>
>
> On 9/29/11 10:28 PM, Henrik Aagaard Sørensen wrote:
>
> I'm using Kamailio as dispatcher to a FreeSwitch setup.
>
> Currently it "almost" work. I have 2 extensions connected to my FreeSwitch
> via Kamailio. However, I can only send calls one way because Kamailio seems
> to change the domain on the extension.
>
> Kamailio is not changing anything by default, if something is changed, you
> executed a function for that. Which domain you think is changed by kamailio?
> Request URI, From or To addresses?
>
> Can you provide ngrep traces of registration and a call for this case? Tell
> what you expected in the content of the sip messages and you think kamailio
> changed.
>
> Cheers,
> Daniel
>
>
> One extension is registered with i...@sip.my-domain.com. This I can send
> calls to.
> The other extension is registered with ID@local-ip. This I cannot send
> calls to.
>
> Isn't it possible to have Kamailio register the extension on my FreeSwitch
> with @sip.my-domain.com?
>
> If I register both extension directly to my FreeSwitch everything works.
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Dec 5-8, Berlin: 
> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
> http://twitter.com/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as dispatcher fails due to from domain on extension.

2011-09-30 Thread HM Kias
Hi,

I tried it too, had no luck.

Looking for some advise.


Regards,

Kias



2011/9/30 Henrik Aagaard Sørensen 

> I'm using Kamailio as dispatcher to a FreeSwitch setup.
>
> Currently it "almost" work. I have 2 extensions connected to my FreeSwitch
> via Kamailio. However, I can only send calls one way because Kamailio seems
> to change the domain on the extension.
>
> One extension is registered with i...@sip.my-domain.com. This I can send
> calls to.
> The other extension is registered with ID@local-ip. This I cannot send
> calls to.
>
> Isn't it possible to have Kamailio register the extension on my FreeSwitch
> with @sip.my-domain.com?
>
> If I register both extension directly to my FreeSwitch everything works.
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
HM Kias
91-9443467600
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Core db_text module

2011-09-30 Thread Bruno Bresciani
Hello ALL,

Someone knows why at line 149 in
.../kamailio-3.1.2/modules_k/db_text/dbt_tb.c the shm_malloc function
sometimes allocates memory to dtp->prev but sometimes doesn't?
I'm asking this question because when the subscriber table is being loading
to shared memory in db_text module, dtp->prev is allocated but on version,
dispatcher, location table it doesn't... Analysing the source code I can't
see any reason to this behavior.

The allocation of dtp->prev to subscriber table is generating a core at
db_text module.

Best Regards

2011/9/27 Bruno Bresciani 

> Hello Daniel,
>
> I'm still analyzing the source code of db_text module and I can't get find
> the reason of core when variable _tbc->prev is accessed. Did you obtain some
> conclusion about this core?
>
> PS: In kamailio 1.5.0 I can't get replicate this core
>
> Best Regards
>
>
> 2011/9/26 Bruno Bresciani 
>
>> Hello,
>>
>> Follows the output of *p *_tbc->prev*:
>>
>> (gdb) p *_tbc->prev
>> Cannot access memory at address 0x4c58586e
>>
>>
>> Best Regards
>>
>>
>>
>>
>> 2011/9/24 Daniel-Constantin Mierla 
>>
>>>  Hello,
>>>
>>> thanks, the only possibility then is that the previous item in the list
>>> of tables has something wrong in it, send also the output for:
>>>
>>> p *_tbc->prev
>>>
>>> Actually, from now I see the _tmb->prev is 0x4c58586e and _tbc is
>>> 0xb6175d20, so the pointers are in different memory zones, it could be pkg
>>> one and shm the other. But lets see first the output of p *_tbc->prev
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 9/23/11 2:11 PM, Bruno Bresciani wrote:
>>>
>>> Follows the output:
>>>
>>> *p _tbc*
>>> $1 = (dbt_table_p) 0xb6175d20
>>>
>>> *(gdb) p *_tbc*
>>> $312 = {dbname = {s = 0xb616d780 "/axs/cfg/db_text", len = 16}, name = {s
>>> = 0xb616e288 "subscriber", len = 10}, hash = 6, mark = 1316722939, flag = 0,
>>>   auto_col = -1, auto_val = 0, nrcols = 10, cols = 0xb616f310, colv =
>>> 0xb6175e70, nrrows = 58, rows = 0xb616e940, mt = 1316722962, next = 0x0,
>>>   prev = 0x4c58586e}
>>>
>>>
>>>
>>>
>>> 2011/9/23 Daniel-Constantin Mierla 
>>>


 On 9/23/11 1:57 PM, Bruno Bresciani wrote:

 Sorry... but I didn't understand how I get the output of:

 p _tbc
 p *_tbc

  run these commands inside gdb.

 Daniel




 Best Regards


 2011/9/23 Daniel-Constantin Mierla 

>  Hello,
>
> interesting ... give also the output of:
>
> p _tbc
> p *_tbc
>
> Cheers,
>  Daniel
>
>
> On 9/23/11 1:27 PM, Bruno Bresciani wrote:
>
> Hello,
>
> Doesn't exist a exact often that the table subscriber is changed, it
> can be changed at any time and almost always the core is generated. I was
> thinking the same thing that you, the deletion of the table is done 
> without
> a lock, but the function dbt_db_get_table that call dbt_db_del_table does
> this lock previously...
>
> Follows the output of 'bt full' from gdb:
>
> Program terminated with signal 11, Segmentation fault.
> #0  0x008b3603 in dbt_db_del_table (_dc=0xb60fde60, _s=0xbfc94380,
> sync=0) at dbt_lib.c:238
> 238 dbt_lib.c: Arquivo ou diretório não encontrado.
> in dbt_lib.c
> (gdb) bt full
> #0  0x008b3603 in dbt_db_del_table (_dc=0xb60fde60, _s=0xbfc94380,
> sync=0) at dbt_lib.c:238
> _tbc = (dbt_table_p) 0xb6175d20
> hash = 6
> #1  0x008b3f38 in dbt_db_get_table (_dc=0xb60fde60, _s=0xbfc94380) at
> dbt_lib.c:300
> _tbc = (dbt_table_p) 0xb6175d20
> hash = 6
> #2  0x008ae12b in dbt_query (_h=0x82e3c90, _k=0xbfc94378, _op=0x0,
> _v=0xbfc94348, _c=0x82e3e50, _n=1, _nc=2, _o=0x0, _r=0xbfc94390) at
> dbt_base.c:200
> _tbc = 
> _drp = 
> _dres = 
> lkey = 
> lres = (int *) 0x0
> _o_k = (db_key_t *) 0x0
> _o_op = 0x0
> _o_n = 
> _o_l = 
> _o_nc = 
> #3  0x001ae088 in digest_authenticate (msg=0x82df8f8, realm= optimized out>, tname=, hftype=HDR_AUTHORIZATION_T) 
> at
> authorize.c:98
> cred = 
> keys = {0x1b14c8, 0x1b14d0}
> vals = {{type = DB1_STR, nul = 0, free = 165777064, val =
> {int_val = 136948130, ll_val = 17316817314, double_val =
> 8.5556445301562903e-314,
>   time_val = 136948130,
>   string_val = 0x829a9a2 "3022\", realm=\"192.168.166.199\",
> nonce=\"TnuaJ057mPskvCOYDgyAURuuottiYy7cIAQKLUA=\",
> cnonce=\"4VwQFl/7Ei+IWecbrZ9rug\", algorithm=MD5, uri=\
> "sip:192.168.166.199\",
> response=\"45b23bc0e48592fb57b1ebc87f0e3dbc\""..., str_val = {
> s = 0x829a9a2 "3022\", realm=\"192.168.166.199\",
> nonce=\"TnuaJ057mPskvCOYDgyAURuuottiYy7cIAQKLUA=\",
> cnonce=\"4VwQFl/7Ei+IWecbrZ9rug\", algorithm=MD5, uri=\
> "sip:192.168.166.199\",
> response=\"45b23bc0e4

Re: [SR-Users] SNMPStats and multiple proxies

2011-09-30 Thread Henning Westerholt
On Friday 30 September 2011, Antanas Masevicius wrote:
> it looks like this functionality can be implemented using SNMPv3
> contexts. This way snmp agentx subagents would be able to register the
> same OID tree with different from default context. The only change we
> need is to patch snmpstats module with register context call as
> described here:
> 
> http://www.net-snmp.org/wiki/index.php/FAQ:Coding_21
> 
> We would probably also need some kamailio exported parameter to specify
> subagent context. This parameter would only be needed to set if SNMPv3
> is about to be used, otherwise default context would be set.
> 
> If someone is willing to do it, drop me a note. If not, i would try to
> implement this change myself a bit later.
> Is there a chance that such change would be accepted into main tree?

Hi Antanas,

if you don't break existing functionality and add the necessary module 
documentation then it should be no problem to accept in the master tree. Just 
add the patch for the module if you're ready to our tracker.

Best regards,

Henning

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Cleaning up presence info when user is deleted

2011-09-30 Thread Krishna Kurapati
Thanks for the help. I was wondering if I needed remove from the cache also.
I am now
removing from subscriber and xcap table just to make sure that the database
does not
contain stale data.

Krish Kura

On Fri, Sep 30, 2011 at 3:01 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> just to add that besides having the records in xcap table, if the user is
> removed, it should have no access to it because it will be authenticated for
> that. But since there is no record in subscriber table anymore, the
> authentication will fail always. So besides taking harddrive space, it is no
> impact in SIP side. IIRC, siremis has a web interface for xcap, but also the
> delete operation has to be done manually.
>
> Cheers,
> Daniel
>
> On 9/28/11 4:10 PM, Peter Dunkley wrote:
>
> Hello,
>
> You don't need to worry about the contents of the presentity, watcher, and
> active watcher tables.  Entries in these tables will be deleted if the user
> un-subscribes or logs out properly, and failing that automatically cleaned
> up when the records themselves expire.
>
> When you remove a user you probably should remove any documents belonging
> to them in xcap.  At the moment this is a manual process and not tied into
> the kamctl command.
>
> Regards,
>
> Peter
>
>
> On Tue, 2011-09-27 at 13:49 -0500, Krishna Kurapati wrote:
>
> Hi,
>
>
>
>  When a user is removed using "kamctl rm", is there way way to clean up
> presence information
>
>  in the database (xcap, presentity, watcher and active watcher tables) and
> in the cache? Is there a
>
>  event that gets fired when the user  is removed from subscriber table
> which I could handle in config
>
>  file and and cleanup?
>
>
>
>
>
>  Thanks
>
>  Krish Kura
>
>  ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>   --
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: 
> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
> http://twitter.com/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Making iPhone SIP client work with Kamailio

2011-09-30 Thread Krishna Kurapati
Thanks for the suggestion. I added following lines to the config

#!define FLB_NATB 6
#!define FLB_NATSIPPING 7
# - nathelper params -
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)
modparam("nathelper", "sipping_method", "INFO")
modparam("nathelper", "sipping_from", "sip:pinger@10.1.0.6")

# params needed for NAT traversal in other modules
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
modparam("usrloc", "nat_bflag", FLB_NATB)

However, I do not see INFO messages from server to client in ngrep
Am I missing something else to configure here?

Thanks
Krish Kura

On Fri, Sep 30, 2011 at 2:52 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
>
> On 9/30/11 12:51 AM, Krishna Kurapati wrote:
>
>  Hi,
>>
>>  The iPhone client, when it goes into background, can only respond to
>> incoming messages.
>> That makes the Registration expire when there is no communication from the
>> server before
>> the expire time. I could make the Registration not expire at all. Not sure
>> it's the only option.
>>
>>  Is there a way to send a Ping message from server periodically to the
>> iPhone SIP client. This
>> will wakeup the SIP client and resend REGISTER message.
>>
>>   you can set the nat_bflag (see usrloc module) to mark the registration
> as being natted. Then use nathelper module mark it to send OPTIONS ping
> (sipping_bflag parameter).
>
> http://kamailio.org/docs/modules/stable/modules_k/usrloc.html
> http://kamailio.org/docs/modules/stable/modules_k/nathelper.html
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Oct 10-13, Berlin: 
> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
> http://twitter.com/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio as dispatcher fails due to from domain on extension.

2011-09-30 Thread Henrik Aagaard Sørensen
Hi Daniel.

I've tried a lot with FreeSwitch, but somehow I still thinks Kamailio does
something to the SIP messages etc. as everything works without Kamailio.
This is my kamailio.cfg: http://pastebin.com/PcVPnh6Q

2011/9/30 Henrik Aagaard Sørensen 

> Hi Daniel.
>
> I can see in FreeSwitch, from the log, this error:
> 2011-09-30 06:49:58.275812 [ERR] sofia_reg.c:2136 Cannot locate any
> authentication credentials to complete an authentication request for realm
> '"10.0.1.7"'
>
> That I do not get when connecting directly to FreeSwitch, without Kamailio.
> So I guess Kamailio does something?
>
> But I also guess the problem lies with FreeSwitch and not Kamailio, as it
> is FreeSwitch not accepting.
>
>
> 2011/9/30 Daniel-Constantin Mierla 
>
>>  Hello,
>>
>>
>> On 9/29/11 10:28 PM, Henrik Aagaard Sørensen wrote:
>>
>> I'm using Kamailio as dispatcher to a FreeSwitch setup.
>>
>> Currently it "almost" work. I have 2 extensions connected to my FreeSwitch
>> via Kamailio. However, I can only send calls one way because Kamailio seems
>> to change the domain on the extension.
>>
>> Kamailio is not changing anything by default, if something is changed, you
>> executed a function for that. Which domain you think is changed by kamailio?
>> Request URI, From or To addresses?
>>
>> Can you provide ngrep traces of registration and a call for this case?
>> Tell what you expected in the content of the sip messages and you think
>> kamailio changed.
>>
>> Cheers,
>> Daniel
>>
>>
>> One extension is registered with i...@sip.my-domain.com. This I can send
>> calls to.
>> The other extension is registered with ID@local-ip. This I cannot send
>> calls to.
>>
>> Isn't it possible to have Kamailio register the extension on my FreeSwitch
>> with @sip.my-domain.com?
>>
>> If I register both extension directly to my FreeSwitch everything works.
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> Kamailio Advanced Training, Dec 5-8, Berlin: 
>> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
>> http://twitter.com/miconda
>>
>>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SNMPStats and multiple proxies

2011-09-30 Thread Jeffrey Magder
Its been a very long time since I've looked at this, but isn't there a a
parameter that you can launch the application with to specify which port to
use for AgentX?

On Fri, Sep 30, 2011 at 11:01 AM, Henning Westerholt wrote:

> On Friday 30 September 2011, Antanas Masevicius wrote:
> > it looks like this functionality can be implemented using SNMPv3
> > contexts. This way snmp agentx subagents would be able to register the
> > same OID tree with different from default context. The only change we
> > need is to patch snmpstats module with register context call as
> > described here:
> >
> > http://www.net-snmp.org/wiki/index.php/FAQ:Coding_21
> >
> > We would probably also need some kamailio exported parameter to specify
> > subagent context. This parameter would only be needed to set if SNMPv3
> > is about to be used, otherwise default context would be set.
> >
> > If someone is willing to do it, drop me a note. If not, i would try to
> > implement this change myself a bit later.
> > Is there a chance that such change would be accepted into main tree?
>
> Hi Antanas,
>
> if you don't break existing functionality and add the necessary module
> documentation then it should be no problem to accept in the master tree.
> Just
> add the patch for the module if you're ready to our tracker.
>
> Best regards,
>
> Henning
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SNMPStats and multiple proxies

2011-09-30 Thread Jeffrey Magder
Please take a look at the documentation:

http://kamailio.org/docs/modules/1.3.x/snmpstats.html#AEN172

Specifically, items 1.6.2 and 1.6.3.

You should be able to run two different instances.

It has been years since I've worked on this but it should be straight
forward to add SNMP v3 context to the SNMPStats module.  If I recall
correctly (again its been years), its just the matter of specifying an extra
parameter when connecting to the master snmpd process.  However, this may
break SNNPv2 compatibility.

On Fri, Sep 30, 2011 at 5:09 PM, Jeffrey Magder wrote:

> Its been a very long time since I've looked at this, but isn't there a a
> parameter that you can launch the application with to specify which port to
> use for AgentX?
>
>
> On Fri, Sep 30, 2011 at 11:01 AM, Henning Westerholt wrote:
>
>> On Friday 30 September 2011, Antanas Masevicius wrote:
>> > it looks like this functionality can be implemented using SNMPv3
>> > contexts. This way snmp agentx subagents would be able to register the
>> > same OID tree with different from default context. The only change we
>> > need is to patch snmpstats module with register context call as
>> > described here:
>> >
>> > http://www.net-snmp.org/wiki/index.php/FAQ:Coding_21
>> >
>> > We would probably also need some kamailio exported parameter to specify
>> > subagent context. This parameter would only be needed to set if SNMPv3
>> > is about to be used, otherwise default context would be set.
>> >
>> > If someone is willing to do it, drop me a note. If not, i would try to
>> > implement this change myself a bit later.
>> > Is there a chance that such change would be accepted into main tree?
>>
>> Hi Antanas,
>>
>> if you don't break existing functionality and add the necessary module
>> documentation then it should be no problem to accept in the master tree.
>> Just
>> add the patch for the module if you're ready to our tracker.
>>
>> Best regards,
>>
>> Henning
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] New to Kamailio - make problem

2011-09-30 Thread Peter Schrock
I can't seem to get kamailio to "*make*". I am following the directions on
the wiki on how to install. I have downloaded, compiled, and installed mysql
server and every time I run to "*make all*" with kamailio, I get this error
message.
At first, I was thinking that *km_db_mysql.c* couldn't find the file. The
header seems to be looking for *mysql.h* (at *#include *). I
found the file from installing mysql server and I thought I'd help *
km_db_mysql.c* to find the file, but it still gives me this error.
I am using a power pc running OS X.5.1.

CC (gcc) [M db_mysql.so] km_db_mysql.o
km_db_mysql.c:49:19: error: mysql/mysql.h: No such file or directory
km_db_mysql.c: In function ‘kam_mysql_mod_init’:
km_db_mysql.c:92: warning: implicit declaration of function
‘mysql_get_client_info’
km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 7
has type ‘int’
km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 6
has type ‘int’
make[1]: *** [km_db_mysql.o] Error 1
make: *** [modules] Error 1


Peter Schrock
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] New to Kamailio - make problem

2011-09-30 Thread Nick Khamis
You neet the mysql header library. What distro are you using?

Nick.

On Fri, Sep 30, 2011 at 7:44 PM, Peter Schrock  wrote:
> I can't seem to get kamailio to "make". I am following the directions on the
> wiki on how to install. I have downloaded, compiled, and installed mysql
> server and every time I run to "make all" with kamailio, I get this error
> message.
> At first, I was thinking that km_db_mysql.c couldn't find the file. The
> header seems to be looking for mysql.h (at #include ). I
> found the file from installing mysql server and I thought I'd help
> km_db_mysql.c to find the file, but it still gives me this error.
> I am using a power pc running OS X.5.1.
> CC (gcc) [M db_mysql.so] km_db_mysql.o
> km_db_mysql.c:49:19: error: mysql/mysql.h: No such file or directory
> km_db_mysql.c: In function ‘kam_mysql_mod_init’:
> km_db_mysql.c:92: warning: implicit declaration of function
> ‘mysql_get_client_info’
> km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 7
> has type ‘int’
> km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 6
> has type ‘int’
> make[1]: *** [km_db_mysql.o] Error 1
> make: *** [modules] Error 1
>
> Peter Schrock
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Handling quota/call limits - kamailio 1.5

2011-09-30 Thread Graham Wooden
Hi there,

Finally getting around to introducing some call limits and starting with the
inbound calls.  However, I ran into an issue about how to get the "in use"
count to be updated in my quota table.

What is the best way to get s:in_use to update so it can be calculated?
Here is my snippet of code:

if (is_method("INVITE")) {
avp_db_query("select quota, in_use from quota where
username='$rU'","$avp(s:quota);$avp(s:in_use)");
   
if ($avp(s:in_use) >= $avp(s:quota)){
xlog ("DEBUG: Trunk $rU is over quota");
sl_send_reply("503","User over quota");
}
.
.
} 


This opens up two more questions: How to decrease the call count when a BYE
is received - maybe do a subtraction and the do a avp_db_query to update the
table? 

And of course there is the BYE that won't be present (ie. When a call just
rings and hangs up before it gets answered). Maybe ACC's missed_calls can
somewhat be used to help determine?

Thanks for any pointers and guidance.  I am running Kamailio 1.5.

Thanks,

-graham



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Handling quota/call limits - kamailio 1.5

2011-09-30 Thread Alex Balashov
You really, really, really want to use the "dialog" module to simplify and 
automate this.

--
This message was painstakingly thumbed out on my mobile, so apologies for 
brevity, errors, and general sloppiness.

Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

On Sep 30, 2011, at 9:08 PM, Graham Wooden  wrote:

> Hi there,
> 
> Finally getting around to introducing some call limits and starting with the
> inbound calls.  However, I ran into an issue about how to get the "in use"
> count to be updated in my quota table.
> 
> What is the best way to get s:in_use to update so it can be calculated?
> Here is my snippet of code:
> 
> if (is_method("INVITE")) {
>avp_db_query("select quota, in_use from quota where
> username='$rU'","$avp(s:quota);$avp(s:in_use)");
> 
>if ($avp(s:in_use) >= $avp(s:quota)){
>xlog ("DEBUG: Trunk $rU is over quota");
>sl_send_reply("503","User over quota");
>}
> .
> .
> } 
> 
> 
> This opens up two more questions: How to decrease the call count when a BYE
> is received - maybe do a subtraction and the do a avp_db_query to update the
> table? 
> 
> And of course there is the BYE that won't be present (ie. When a call just
> rings and hangs up before it gets answered). Maybe ACC's missed_calls can
> somewhat be used to help determine?
> 
> Thanks for any pointers and guidance.  I am running Kamailio 1.5.
> 
> Thanks,
> 
> -graham
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Handling quota/call limits - kamailio 1.5

2011-09-30 Thread Graham Wooden
I agree - I actually tried to use the dialog module, taken from an mailist
post back from Aug 2009,

 http://www.mail-archive.com/users@lists.kamailio.org/msg04127.html

But ran into issues implementing it.  With that, I will focus back on that.

Thanks Alex,

-graham


On 9/30/11 8:26 PM, "Alex Balashov"  wrote:

> You really, really, really want to use the "dialog" module to simplify and
> automate this.
> 
> --
> This message was painstakingly thumbed out on my mobile, so apologies for
> brevity, errors, and general sloppiness.
> 
> Alex Balashov - Principal
> Evariste Systems LLC
> 260 Peachtree Street NW
> Suite 2200
> Atlanta, GA 30303
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
> 
> On Sep 30, 2011, at 9:08 PM, Graham Wooden  wrote:
> 
>> Hi there,
>> 
>> Finally getting around to introducing some call limits and starting with the
>> inbound calls.  However, I ran into an issue about how to get the "in use"
>> count to be updated in my quota table.
>> 
>> What is the best way to get s:in_use to update so it can be calculated?
>> Here is my snippet of code:
>> 
>> if (is_method("INVITE")) {
>>avp_db_query("select quota, in_use from quota where
>> username='$rU'","$avp(s:quota);$avp(s:in_use)");
>> 
>>if ($avp(s:in_use) >= $avp(s:quota)){
>>xlog ("DEBUG: Trunk $rU is over quota");
>>sl_send_reply("503","User over quota");
>>}
>> .
>> .
>> } 
>> 
>> 
>> This opens up two more questions: How to decrease the call count when a BYE
>> is received - maybe do a subtraction and the do a avp_db_query to update the
>> table? 
>> 
>> And of course there is the BYE that won't be present (ie. When a call just
>> rings and hangs up before it gets answered). Maybe ACC's missed_calls can
>> somewhat be used to help determine?
>> 
>> Thanks for any pointers and guidance.  I am running Kamailio 1.5.
>> 
>> Thanks,
>> 
>> -graham
>> 
>> 
>> 
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] New to Kamailio - make problem

2011-09-30 Thread Peter Schrock
I am assuming you are talking about mysql. I downloaded a dmg from the mysql
site (which has been all that helpful as far as finding what I need). I am
using Server version: 6.0.11-alpha MySQL Community Server (GPL).
Peter

On Fri, Sep 30, 2011 at 4:58 PM, Nick Khamis  wrote:

> You neet the mysql header library. What distro are you using?
>
> Nick.
>
> On Fri, Sep 30, 2011 at 7:44 PM, Peter Schrock 
> wrote:
> > I can't seem to get kamailio to "make". I am following the directions on
> the
> > wiki on how to install. I have downloaded, compiled, and installed mysql
> > server and every time I run to "make all" with kamailio, I get this error
> > message.
> > At first, I was thinking that km_db_mysql.c couldn't find the file. The
> > header seems to be looking for mysql.h (at #include ). I
> > found the file from installing mysql server and I thought I'd help
> > km_db_mysql.c to find the file, but it still gives me this error.
> > I am using a power pc running OS X.5.1.
> > CC (gcc) [M db_mysql.so] km_db_mysql.o
> > km_db_mysql.c:49:19: error: mysql/mysql.h: No such file or directory
> > km_db_mysql.c: In function ‘kam_mysql_mod_init’:
> > km_db_mysql.c:92: warning: implicit declaration of function
> > ‘mysql_get_client_info’
> > km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but
> argument 7
> > has type ‘int’
> > km_db_mysql.c:92: warning: format ‘%s’ expects type ‘char *’, but
> argument 6
> > has type ‘int’
> > make[1]: *** [km_db_mysql.o] Error 1
> > make: *** [modules] Error 1
> >
> > Peter Schrock
> > ___
> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> > sr-users@lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> >
> >
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Handling quota/call limits - kamailio 1.5

2011-09-30 Thread Graham Wooden
Ok, I expanded on that example and got this working; for the most part.

What is the best way to get that MAX_NUMBER_OF_CALLS to be a value that is
set per subscriber?  Or keep my quota table and just pull the value from
there?

modparam("dialog", "profiles_with_value", "callquota")
.
.
.
  if (is_method("INVITE")) {
$var(SIZE) = 0;
get_profile_size("callquota", "$rU", "$var(SIZE)");
if( $var(SIZE) >= MAX_NUMBER_OF_CALLS ){
sl_send_reply("503", "Simultaneous calls limit
reached");
exit;
}
set_dlg_profile("callquota","$rU");

if (get_profile_size("callquota","$var(SIZE)")) {
xlog("DEBUG: there are $var(SIZE) total calls for
$rU\n");
}





On 9/30/11 8:36 PM, "Graham Wooden"  wrote:

> I agree - I actually tried to use the dialog module, taken from an mailist
> post back from Aug 2009,
> 
>  http://www.mail-archive.com/users@lists.kamailio.org/msg04127.html
> 
> But ran into issues implementing it.  With that, I will focus back on that.
> 
> Thanks Alex,
> 
> -graham
> 
> 
> On 9/30/11 8:26 PM, "Alex Balashov"  wrote:
> 
>> You really, really, really want to use the "dialog" module to simplify and
>> automate this.
>> 
>> --
>> This message was painstakingly thumbed out on my mobile, so apologies for
>> brevity, errors, and general sloppiness.
>> 
>> Alex Balashov - Principal
>> Evariste Systems LLC
>> 260 Peachtree Street NW
>> Suite 2200
>> Atlanta, GA 30303
>> Tel: +1-678-954-0670
>> Fax: +1-404-961-1892
>> Web: http://www.evaristesys.com/
>> 
>> On Sep 30, 2011, at 9:08 PM, Graham Wooden  wrote:
>> 
>>> Hi there,
>>> 
>>> Finally getting around to introducing some call limits and starting with the
>>> inbound calls.  However, I ran into an issue about how to get the "in use"
>>> count to be updated in my quota table.
>>> 
>>> What is the best way to get s:in_use to update so it can be calculated?
>>> Here is my snippet of code:
>>> 
>>> if (is_method("INVITE")) {
>>>avp_db_query("select quota, in_use from quota where
>>> username='$rU'","$avp(s:quota);$avp(s:in_use)");
>>> 
>>>if ($avp(s:in_use) >= $avp(s:quota)){
>>>xlog ("DEBUG: Trunk $rU is over quota");
>>>sl_send_reply("503","User over quota");
>>>}
>>> .
>>> .
>>> } 
>>> 
>>> 
>>> This opens up two more questions: How to decrease the call count when a BYE
>>> is received - maybe do a subtraction and the do a avp_db_query to update the
>>> table? 
>>> 
>>> And of course there is the BYE that won't be present (ie. When a call just
>>> rings and hangs up before it gets answered). Maybe ACC's missed_calls can
>>> somewhat be used to help determine?
>>> 
>>> Thanks for any pointers and guidance.  I am running Kamailio 1.5.
>>> 
>>> Thanks,
>>> 
>>> -graham
>>> 
>>> 
>>> 
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> 
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Handling quota/call limits - kamailio 1.5

2011-09-30 Thread Alex Balashov
You can either use load_credentials to pull it during subscriber 
authentication, or use your separate table.

--
This message was painstakingly thumbed out on my mobile, so apologies for 
brevity, errors, and general sloppiness.

Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

On Sep 30, 2011, at 10:50 PM, Graham Wooden  wrote:

> Ok, I expanded on that example and got this working; for the most part.
> 
> What is the best way to get that MAX_NUMBER_OF_CALLS to be a value that is
> set per subscriber?  Or keep my quota table and just pull the value from
> there?
> 
> modparam("dialog", "profiles_with_value", "callquota")
> .
> .
> .
>  if (is_method("INVITE")) {
>$var(SIZE) = 0;
>get_profile_size("callquota", "$rU", "$var(SIZE)");
>if( $var(SIZE) >= MAX_NUMBER_OF_CALLS ){
>sl_send_reply("503", "Simultaneous calls limit
> reached");
>exit;
>}
>set_dlg_profile("callquota","$rU");
> 
>if (get_profile_size("callquota","$var(SIZE)")) {
>xlog("DEBUG: there are $var(SIZE) total calls for
> $rU\n");
>}
> 
> 
> 
> 
> 
> On 9/30/11 8:36 PM, "Graham Wooden"  wrote:
> 
>> I agree - I actually tried to use the dialog module, taken from an mailist
>> post back from Aug 2009,
>> 
>> http://www.mail-archive.com/users@lists.kamailio.org/msg04127.html
>> 
>> But ran into issues implementing it.  With that, I will focus back on that.
>> 
>> Thanks Alex,
>> 
>> -graham
>> 
>> 
>> On 9/30/11 8:26 PM, "Alex Balashov"  wrote:
>> 
>>> You really, really, really want to use the "dialog" module to simplify and
>>> automate this.
>>> 
>>> --
>>> This message was painstakingly thumbed out on my mobile, so apologies for
>>> brevity, errors, and general sloppiness.
>>> 
>>> Alex Balashov - Principal
>>> Evariste Systems LLC
>>> 260 Peachtree Street NW
>>> Suite 2200
>>> Atlanta, GA 30303
>>> Tel: +1-678-954-0670
>>> Fax: +1-404-961-1892
>>> Web: http://www.evaristesys.com/
>>> 
>>> On Sep 30, 2011, at 9:08 PM, Graham Wooden  wrote:
>>> 
 Hi there,
 
 Finally getting around to introducing some call limits and starting with 
 the
 inbound calls.  However, I ran into an issue about how to get the "in use"
 count to be updated in my quota table.
 
 What is the best way to get s:in_use to update so it can be calculated?
 Here is my snippet of code:
 
 if (is_method("INVITE")) {
   avp_db_query("select quota, in_use from quota where
 username='$rU'","$avp(s:quota);$avp(s:in_use)");
 
   if ($avp(s:in_use) >= $avp(s:quota)){
   xlog ("DEBUG: Trunk $rU is over quota");
   sl_send_reply("503","User over quota");
   }
 .
 .
 } 
 
 
 This opens up two more questions: How to decrease the call count when a BYE
 is received - maybe do a subtraction and the do a avp_db_query to update 
 the
 table? 
 
 And of course there is the BYE that won't be present (ie. When a call just
 rings and hangs up before it gets answered). Maybe ACC's missed_calls can
 somewhat be used to help determine?
 
 Thanks for any pointers and guidance.  I am running Kamailio 1.5.
 
 Thanks,
 
 -graham
 
 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>> 
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> 
>> 
>> 
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Use of $rU

2011-09-30 Thread Graham Wooden
Hi there,

What is pv for the equivalent of $rU for outbound? My inbound use of $rU has
the correct username.  All my subscribers are multi-number trunks, so on the
outbound I need to associate the subscriber. This is kamailio 1.5.

Thanks,

-graham



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Use of $rU

2011-09-30 Thread Alex Balashov
$rU just exposes the request URI user part.  It applies in any direction.  
What's the question?

--
This message was painstakingly thumbed out on my mobile, so apologies for 
brevity, errors, and general sloppiness.

Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

On Sep 30, 2011, at 11:09 PM, Graham Wooden  wrote:

> Hi there,
> 
> What is pv for the equivalent of $rU for outbound? My inbound use of $rU has
> the correct username.  All my subscribers are multi-number trunks, so on the
> outbound I need to associate the subscriber. This is kamailio 1.5.
> 
> Thanks,
> 
> -graham
> 
> 
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Use of $rU

2011-09-30 Thread Alex Balashov
Wait, I think I understand.  Take a look at $fU, which is not mutable, but the 
uac module's uac_replace_from() makes it so.

--
This message was painstakingly thumbed out on my mobile, so apologies for 
brevity, errors, and general sloppiness.

Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/

On Sep 30, 2011, at 11:25 PM, Alex Balashov  wrote:

> $rU just exposes the request URI user part.  It applies in any direction.  
> What's the question?
> 
> --
> This message was painstakingly thumbed out on my mobile, so apologies for 
> brevity, errors, and general sloppiness.
> 
> Alex Balashov - Principal
> Evariste Systems LLC
> 260 Peachtree Street NW
> Suite 2200
> Atlanta, GA 30303
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
> 
> On Sep 30, 2011, at 11:09 PM, Graham Wooden  wrote:
> 
>> Hi there,
>> 
>> What is pv for the equivalent of $rU for outbound? My inbound use of $rU has
>> the correct username.  All my subscribers are multi-number trunks, so on the
>> outbound I need to associate the subscriber. This is kamailio 1.5.
>> 
>> Thanks,
>> 
>> -graham
>> 
>> 
>> 
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Use of $rU

2011-09-30 Thread Graham Wooden
$fU isn't the subscriber; it's the caller.

So, using the uac_replace_from() will make $fU be the subscriber's username?


On 9/30/11 10:50 PM, "Alex Balashov"  wrote:

> Wait, I think I understand.  Take a look at $fU, which is not mutable, but the
> uac module's uac_replace_from() makes it so.
> 
> --
> This message was painstakingly thumbed out on my mobile, so apologies for
> brevity, errors, and general sloppiness.
> 
> Alex Balashov - Principal
> Evariste Systems LLC
> 260 Peachtree Street NW
> Suite 2200
> Atlanta, GA 30303
> Tel: +1-678-954-0670
> Fax: +1-404-961-1892
> Web: http://www.evaristesys.com/
> 
> On Sep 30, 2011, at 11:25 PM, Alex Balashov  wrote:
> 
>> $rU just exposes the request URI user part.  It applies in any direction.
>> What's the question?
>> 
>> --
>> This message was painstakingly thumbed out on my mobile, so apologies for
>> brevity, errors, and general sloppiness.
>> 
>> Alex Balashov - Principal
>> Evariste Systems LLC
>> 260 Peachtree Street NW
>> Suite 2200
>> Atlanta, GA 30303
>> Tel: +1-678-954-0670
>> Fax: +1-404-961-1892
>> Web: http://www.evaristesys.com/
>> 
>> On Sep 30, 2011, at 11:09 PM, Graham Wooden  wrote:
>> 
>>> Hi there,
>>> 
>>> What is pv for the equivalent of $rU for outbound? My inbound use of $rU has
>>> the correct username.  All my subscribers are multi-number trunks, so on the
>>> outbound I need to associate the subscriber. This is kamailio 1.5.
>>> 
>>> Thanks,
>>> 
>>> -graham
>>> 
>>> 
>>> 
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> 
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users