[SR-Users] Kamailio World 2014 - Exhibitors

2014-03-05 Thread Daniel-Constantin Mierla
During Kamailio World 2014, the companies IT Center, Digium, Sipgate, NG 
Voice, Asipto and FhG Fokus will provide all day long demos and 
presentations of their products and services. You can contact them in 
advance to schedule an appointment if you want to reserve proper time to 
discuss about their offerings:


  - http://conference.kamailio.com/k02/exhibitors/

It is less than one month till the start of the event, the agenda is 
pretty much finalized:


  - http://conference.kamailio.com/k02/schedule/

It has over 30 sessions presented by world wide speakers, from technical 
tutorials to business use cases, with topics such WebRTC, IMS, 
anti-fraud & VoIP security, scalability with OpenStack, real time 
charging, various Kamailio use cases, Asterisk, FreeSwitch and SEMS.


Once again we are grateful to event sponsors -- Asipto, FhG Fokus, 
Sipwise, IT Center, Sipgate, Simwood, Digium, NG Voice -- without their 
contributions is impossible to bring such an excellent group of speakers 
and support event logistics:


  - http://conference.kamailio.com/k02/sponsors/

Hurry up if you don't want to miss this event, it is no alternative in 
Europe for meeting professionals in large real time communications 
deployments and open source telephony. Registration details are 
available at:


  - http://conference.kamailio.com/k02/registration/

See you in Berlin!

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/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] geoip crash

2014-03-05 Thread Daniel-Constantin Mierla


On 04/03/14 23:55, Juha Heinanen wrote:

Daniel-Constantin Mierla writes:


You don't have the two patches, on master, the code there is:

  default: /* cc */
  if(gpv->item->r.record==NULL)
  return pv_get_null(msg, param, res);
  return pv_geoip_get_strzval(msg, param, res,
  gpv->item->r.record->country_code);

Be sure you pick commits:

721ffe3576e8e7891c27f8578eb244a857ede759
56ed48bf48c3d78ff5d214833e09a5759f0b5928

i tries picking one of the commit, but it failed and i edited the file
manually.  if you give me a single patch against 4.1, i'm able to try it
out.
you can make the diff between master and 4.1 branches for geoip module - 
there were no other changes iirc. Or wait for the new release, I am 
going to backport anyhow.


Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/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] sqlops crash after out of memory

2014-03-05 Thread Daniel-Constantin Mierla
I pushed yesterday a fix for this case. It is in all maintained stable 
branches. The patch for master is:


- 
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f27df26ca01394250cbe12c5ccf694c6afd3707f


Cheers,
Daniel

On 04/03/14 08:50, Juha Heinanen wrote:

pkg memory run out here:

Mar  4 09:00:20 localhost /usr/sbin/sip-proxy[31923]: ERROR: sqlops 
[sql_api.c:318]: sql_do_query(): no more memory

then sip proxy crashed here:

(gdb) where
#0  0xb5fce89b in sql_reset_result (res=0xb6ce3438) at sql_api.c:233
#1  0xb5fd18db in sql_do_query (con=0xb6cd1e28, query=0xbfecd248, 
res=0xb6ce3438) at sql_api.c:410
#2  0xb5fd630d in sql_query (msg=0xb6ce8788, dbl=0xb6cd1e28 "\230\035Ͷ\t", query=0xb70436a8 
"\310Y\004\267P", res=0xb6ce3438 "\245\246=|\r3ζ\006") at sqlops.c:209
...

goto error was executed when if(res->vals[i]==NULL) was true and at
error sql_reset_result was called.  there the crash happened here:

if(res->vals)
{
for(i=0; inrows; i++)
{
for(j=0; jncols; j++)
{
if(res->vals[i][j].flags&PV_VAL_STR
&& 
res->vals[i][j].value.s.len>0)  /* here */

looks to me that it should be tested if res->vals[i] is not null before
executing the if statement.

-- juha

ps. it there any chance to find out from the core dump, why memory run
out, i.e., how was most of it used?  amount of pkg memory in this host
was defined to be 8 MB.

-- juha



___
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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/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] [sr-dev] dialog module with DB Backend

2014-03-05 Thread Daniel-Constantin Mierla

Hello,

can you make the patch for master branch? I just backported two patches 
that were in master branch but not yet in 4.1.


With this occasion, can you review if the other 'return 1' expose the 
same issue? I noticed another one in db_cassa_delete and in db_cassa_query.


Thanks,
Daniel

On 05/03/14 03:57, jay binks wrote:

Just noticed the same thing in db_cassa_delete..
patch updated to fix both

Jay


On 5 March 2014 12:52, jay binks > wrote:


Hi All,

so Ive done what Carlos suggested and swapped out my dialog db to
Mysql rather than cassandra.
All worked 100% as you would expect.

Right so the issue is db_cassandra .

I started testing and going through the code.

I found I had these lines, which was interesting & concerning.
update_dialog_dbinfo_unsafe(): could not add another dialog to db
I had been ignoring them, because the dialog was in the DB and I
figured I would come back and figure that out later.

but this seems to have been key to this whole thing.

ends up that in dlg_db_handler.c dialog_dbf.insert was getting a 1
back from kamailio on the insert and a 0 back from mysql... WTF.. ok.

so I trace into db_cassa_insert which calls db_cassa_modify ..
around line 1210 I can see this ..

CON_CASSA(_h)->con->batch_mutate(CFMap, oac::ConsistencyLevel::ONE);
return 1;

wrapped in a try / catch block..
seems db_cassandra wants to return 1 for success but kamailio ( or
dialog module at least ) expects 0 for success .

so I change that to be return 0, and re-test.
everything works as expected,"could not add another dialog to
db" stops coming up on my console,
and dialogs are removed when calls hangup.

seems this 1 thing is enough to screw dialogs in cassandra ( and
who knows what else ).
This is the reason for my email though,   if we simply change that
to 0, what else may break !??

however
http://www.asipto.com/pub/kamailio-devel-guide/#c09f_insert
clearly states that "0 if everything is OK"
so this is clearly a bug that needs fixing.

Can I get someone with more experience to test this for me and
possibly apply the attached patch !?

Jay











On 25 February 2014 05:58, Daniel-Constantin Mierla
mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> I pushed some patches to the master branch in order to remove
the dialog from its associated profiles when it gets in terminated
state. I encountered such issue (not that) recently, but I haven't
gotten the time to get to it before.
>
> Then, the second patch is to not add dialogs in profiles when
loading from database and the state is terminated (5).
>
> Here are the links to the patches:
>
> -

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb57ed5e8ee0ca9ec1f796e43ce993be48
> -

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b88eb7ee2d243882383a44f601baa21fd679cd5
>
> Should be straightforward to cherry pick to 4.1 (even 4.0 I
expect). If you test and all goes fine, I will backport -- here I
had no time for real testing.
>
> I plan also to not add the dialogs in memory for state
terminated, but destroy them at db load time. But this needs a bit
of a review, to be sure that all necessary callbacks are executed.
>
> On the other hand, if the dialogs are not removed from db, might
be an issue with the database driver (cassandra in this case,
which is rather new module). Do you get any syslog errors from
kamailio or database server? I expect that people would have
reported such issue for other database engines so far. Still it
might be an issue, just that was not noticed...
>
> Cheers,
> Daniel
>
> On 24/02/14 11:19, jay binks wrote:
>
> So poking round the code for the dialog module
> Im not sure what im missing here.
>
>
> get_profile_size dosnt care bout the state of a dialog... so you
get ALL dialogs that are in the hash table.
> ( which is interesting if you want to use dialog module to
enforce channel limits etc )
>
> So you go... OK...  kamailio only expects to have "ACTIVE"
dialogs in the hash table... kewl..
> lets assume that to be the case.
>
> but then in dlg_db_handler.c , load_dialog_info_from_db loads
all dialogs from the DB, regardless of state.
> so all dialogs in the DB ( ones that didnt get deleted yet...
but were in state 5 ) get re-created in kamailio
> upon startup.
>
> what this means is...
> ( assume starting with empty DB )
>
> I start kamailio, make some calls... they get synced to the DB.
> I end the calls,  kamailio removes from dialogs module internal
hash, but the sync to DB hasnt happened yet.
>
> I kill kamailio ( or crash .. whatever

Re: [SR-Users] [Kamailio-Business] [sr-dev] New official Debian and Ubuntu repository

2014-03-05 Thread Vik Killa
Can someone update the wiki page? I was confused for days on this:
http://www.kamailio.org/dokuwiki/doku.php/packages:debs


On Wed, Mar 5, 2014 at 8:21 AM, Vik Killa  wrote:

> Can someone update the wiki page? I was confused for days on this:
> http://www.kamailio.org/dokuwiki/doku.php/packages:debs
>
>
> On Tue, Mar 4, 2014 at 6:54 AM, Klaus Darilion <
> klaus.mailingli...@pernau.at> wrote:
>
>> Thanks to all involved
>>
>>
>> On 03.03.2014 14:16, Victor Seva wrote:
>>
>>> The new build system for Debian and Ubuntu packages is now in place.
>>> This service is kindly sponsored by SipWise [0] thanks to Andreas
>>> Granig [1]. Sipwise is providing the hosting and man power to create
>>> and manage this new system.
>>>
>>> deb.kamailio.org is based on jenkins-debian-glue[2] project running on
>>> AWS EC2 environment thanks to Michael Prokop [3] and myself. All the
>>> needed files, scripts and info to reproduce this system is kept public
>>> at [4].
>>>
>>> In [5] is described all the repositories available.
>>>
>>> * nightly builds are been built if a change is detected in the branch,
>>> once by night.
>>> - kamailiodev-nightly
>>>  branch:
>>> - 'master'
>>>  distributions: jessie, wheezy, squeeze, precise
>>>
>>> - kamailio41-nightly
>>>   branch:
>>>- '4.1'
>>>  distributions: jessie, wheezy, squeeze, precise
>>>
>>> - kamailio40-nightly
>>>branch:
>>>- '4.0'
>>>  distributions: lenny, squeeze, wheezy, lucid, precise
>>>
>>> - kamailio33-nightly
>>>  branch:
>>>- '3.3'
>>>  distributions: lenny, squeeze, wheezy, lucid, precise
>>>
>>> * tags are been built if a new tag is detected once by night.
>>> - kamailio41
>>>  branch:
>>>- '*/tags/4.1*'
>>>  distributions: jessie, wheezy, squeeze, precise
>>>
>>> - kamailio40
>>>  branch:
>>>- '*/tags/4.0*'
>>>  distributions: lenny, squeeze, wheezy, lucid, precise
>>>
>>> - kamailio33
>>>  branch:
>>>- '*/tags/3.3*'
>>>  distributions: lenny, squeeze, wheezy, lucid, precise
>>>
>>> Now there is no 4.1.1 package built so the default kamailio repository
>>> is pointing to a empty repository. As soon as we release 4.1.2 this
>>> will be fixed.
>>>
>>> Regards,
>>> Victor Seva ( kamailio admin hat on )
>>>
>>> [0] http://www.sipwise.com/
>>> [1] http://www.kamailio.org/w/andreas-granig/
>>> [2] https://github.com/mika/jenkins-debian-glue
>>> [3] http://michael-prokop.at/
>>> [4] https://github.com/sipwise/kamailio-deb-jenkins
>>> [5] http://deb.kamailio.org/index.html
>>>
>>> ___
>>> sr-dev mailing list
>>> sr-...@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>>
>>>
>> ___
>> Kamailio (OpenSER) - Business mailing list
>> busin...@lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/business
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/business
>>
>
>
___
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] [sr-dev] dialog module with DB Backend

2014-03-05 Thread Carlos Ruiz Díaz
Hi Jay,

I tried the module as is for the location service, and it worked fine.
Considering this, why was this part working if usrloc uses the same DB API
that was binding a buggy implementation?. It makes me suspicious.

Did you make sure the records were actually inserted on the cluster?

Regards,
Carlos


On Wed, Mar 5, 2014 at 8:42 AM, Daniel-Constantin Mierla
wrote:

>  Hello,
>
> can you make the patch for master branch? I just backported two patches
> that were in master branch but not yet in 4.1.
>
> With this occasion, can you review if the other 'return 1' expose the same
> issue? I noticed another one in db_cassa_delete and in db_cassa_query.
>
> Thanks,
> Daniel
>
>
> On 05/03/14 03:57, jay binks wrote:
>
> Just noticed the same thing in db_cassa_delete..
> patch updated to fix both
>
>  Jay
>
>
> On 5 March 2014 12:52, jay binks  wrote:
>
>> Hi All,
>>
>> so Ive done what Carlos suggested and swapped out my dialog db to Mysql
>> rather than cassandra.
>> All worked 100% as you would expect.
>>
>> Right so the issue is db_cassandra .
>>
>> I started testing and going through the code.
>>
>> I found I had these lines, which was interesting & concerning.
>> update_dialog_dbinfo_unsafe(): could not add another dialog to db
>> I had been ignoring them, because the dialog was in the DB and I figured
>> I would come back and figure that out later.
>>
>> but this seems to have been key to this whole thing.
>>
>> ends up that in dlg_db_handler.c dialog_dbf.insert was getting a 1 back
>> from kamailio on the insert and a 0 back from mysql... WTF.. ok.
>>
>> so I trace into db_cassa_insert which calls db_cassa_modify ..
>> around line 1210 I can see this ..
>>
>> CON_CASSA(_h)->con->batch_mutate(CFMap, oac::ConsistencyLevel::ONE);
>> return 1;
>>
>> wrapped in a try / catch block..
>> seems db_cassandra wants to return 1 for success but kamailio ( or dialog
>> module at least ) expects 0 for success .
>>
>> so I change that to be return 0, and re-test.
>> everything works as expected,"could not add another dialog to db"
>> stops coming up on my console,
>> and dialogs are removed when calls hangup.
>>
>> seems this 1 thing is enough to screw dialogs in cassandra ( and who
>> knows what else ).
>> This is the reason for my email though,   if we simply change that to 0,
>> what else may break !??
>>
>> however http://www.asipto.com/pub/kamailio-devel-guide/#c09f_insertclearly 
>> states that "0 if everything is OK"
>> so this is clearly a bug that needs fixing.
>>
>> Can I get someone with more experience to test this for me and possibly
>> apply the attached patch !?
>>
>>  Jay
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 25 February 2014 05:58, Daniel-Constantin Mierla 
>> wrote:
>> >
>> > Hello,
>> >
>> > I pushed some patches to the master branch in order to remove the
>> dialog from its associated profiles when it gets in terminated state. I
>> encountered such issue (not that) recently, but I haven't gotten the time
>> to get to it before.
>> >
>> > Then, the second patch is to not add dialogs in profiles when loading
>> from database and the state is terminated (5).
>> >
>> > Here are the links to the patches:
>> >
>> > -
>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb57ed5e8ee0ca9ec1f796e43ce993be48
>> > -
>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b88eb7ee2d243882383a44f601baa21fd679cd5
>> >
>> > Should be straightforward to cherry pick to 4.1 (even 4.0 I expect). If
>> you test and all goes fine, I will backport -- here I had no time for real
>> testing.
>> >
>> > I plan also to not add the dialogs in memory for state terminated, but
>> destroy them at db load time. But this needs a bit of a review, to be sure
>> that all necessary callbacks are executed.
>> >
>> > On the other hand, if the dialogs are not removed from db, might be an
>> issue with the database driver (cassandra in this case, which is rather new
>> module). Do you get any syslog errors from kamailio or database server? I
>> expect that people would have reported such issue for other database
>> engines so far. Still it might be an issue, just that was not noticed...
>> >
>> > Cheers,
>> > Daniel
>> >
>> > On 24/02/14 11:19, jay binks wrote:
>> >
>> > So poking round the code for the dialog module
>> > Im not sure what im missing here.
>> >
>> >
>> > get_profile_size dosnt care bout the state of a dialog... so you get
>> ALL dialogs that are in the hash table.
>> > ( which is interesting if you want to use dialog module to enforce
>> channel limits etc )
>> >
>> > So you go... OK...  kamailio only expects to have "ACTIVE" dialogs in
>> the hash table... kewl..
>> > lets assume that to be the case.
>> >
>> > but then in dlg_db_handler.c , load_dialog_info_from_db loads all
>> dialogs from the DB, regardless of state.
>> > so all dialogs in the DB ( ones that didnt get deleted yet... but were
>> in state 5 ) get re-created in kamailio
>> > upon startup.
>> >
>> > what th

Re: [SR-Users] [Kamailio-Business] [sr-dev] New official Debian and Ubuntu repository

2014-03-05 Thread Victor Seva
Hi,

2014-03-05 14:34 GMT+01:00 Vik Killa :
> Can someone update the wiki page? I was confused for days on this:
> http://www.kamailio.org/dokuwiki/doku.php/packages:debs

I've updated the new wiki [0].

[0] https://www.kamailio.org/wiki/packages/debs

___
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] Incorrect Contact address

2014-03-05 Thread Marc Soda
I have Kamailio setup as a proxy in front of a backend server (Asterisk).
 When I make a call through the proxy, the Contact header in the 200 OK
that is returned to the client has the IP of the backend server in it.
 Thus, the client is sending it's ACK directly to the backend server.

Is there a special method to rewrite the Contact header to be Kamailio's IP?

Where is a good place in the config to do this?  (my config is loosely
based on this:
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb)

Thanks!
Marc
___
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] MSRP Relay

2014-03-05 Thread Nandini madhu
Dear All,

Can anybody please tel me, are there any MSRP relay (RFC 4976) compliant
SIP clients for Android Platform ?

Sorry for asking this question which is out of relevant here.

Waiting for somebody's comments on this

Regards,
Nandini
___
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] Incorrect Contact address

2014-03-05 Thread Olle E. Johansson

On 05 Mar 2014, at 18:30, Marc Soda  wrote:

> I have Kamailio setup as a proxy in front of a backend server (Asterisk).  
> When I make a call through the proxy, the Contact header in the 200 OK that 
> is returned to the client has the IP of the backend server in it.  Thus, the 
> client is sending it's ACK directly to the backend server.
> 
> Is there a special method to rewrite the Contact header to be Kamailio's IP?
Check record_route() in the default configuration script. You need to add a 
route set by using record_route() in the initial transaction.

Cheers,
/O
> 
> Where is a good place in the config to do this?  (my config is loosely based 
> on this:  
> http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb)
> 
> Thanks!
> Marc
> 
> ___
> 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] Reload memory leaks issues.

2014-03-05 Thread Uri Shacked
Hi,

Regarding this issue:

I installed 3.3.6.

Didn't changed the makefile.defs, set mem_join=0 and there are no memory
leaks. the reload is fast.

When mem_join = 1, the proccess take lots of time. And when reloading 5
million rows using MTREE, the MI FIFO child is stuck with 98% cpu for 4-6
minutes.

When mem_join=1 and the makefile.defs line "C_DEFS+= -DF_MALLOC" is
deleted, the reloads are faster but, there is a memory leak.

So, for now I stay with the original makefile.defs and mem_join=0.

Thanks
Uri


On Sun, Feb 23, 2014 at 4:16 PM, Uri Shacked  wrote:

> Hi,
>
> kamailio ver 3.3.6.
>
> I load approximately 100Mb of data into memory. And my shared memory size
> is 4Gb.
> It is CARRIERROUTE, DIALPLAN, MTREE and HTABLE combimations.
> My system has to be synced with DB that is being updated frequently.
> So, I reload the data every 1-2 minutes.
> I notice that the shared memory usage is increasing at 1% every 18-19
> reloads.
>
> I use mem_join = 1 and no mem_join at all.
> I compiled with C_DEFS+= -DMEM_JOIN_FREE and even with -DF_MALLOC.
>
> Tried different options, still, the issue keeps on going and it is very
> frustrating...
>
> Anyone has the same problem?
>
> BR,
> Uri
>
>
>
>
___
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] Incorrect Contact address

2014-03-05 Thread Marc Soda
Thanks Olle.  I am calling record_record() on the initial INVITE.  In fact,
the OK has a Record-Route header:

1.1.1.1 is the endpoint
2.2.2.2 is the kamailio proxy
3.3.3.3 is the backend server

SIP/2.0 200 OK
Via: SIP/2.0/UDP 1.1.1.1:60077
;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z-
Record-Route: 
From: ;tag=db634167
To: ;tag=as3f9cf263
Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM.
CSeq: 2 INVITE
User-Agent: CoreDialPBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Contact: 
Content-Type: application/sdp
Content-Length: 266

v=0
o=root 13486 13487 IN IP4 3.3.3.3
s=session
c=IN IP4 3.3.3.3
t=0 0
m=audio 29990 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

I don't think 3.3.3.3 should show up anywhere, it should be rewritten to
2.2.2.2.


On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson  wrote:

>
> On 05 Mar 2014, at 18:30, Marc Soda  wrote:
>
> I have Kamailio setup as a proxy in front of a backend server (Asterisk).
>  When I make a call through the proxy, the Contact header in the 200 OK
> that is returned to the client has the IP of the backend server in it.
>  Thus, the client is sending it's ACK directly to the backend server.
>
> Is there a special method to rewrite the Contact header to be Kamailio's
> IP?
>
> Check record_route() in the default configuration script. You need to add
> a route set by using record_route() in the initial transaction.
>
> Cheers,
> /O
>
>
> Where is a good place in the config to do this?  (my config is loosely
> based on this:
> http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
> )
>
> Thanks!
> Marc
>
>  ___
> 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] Incorrect Contact address

2014-03-05 Thread Carlos Ruiz Díaz
Why is erroneous to have the contact header with the backend IP?

With the record-route on the 200 Ok, the ACK should be directed to the
backend IP, but containing a route header pointing to the Kamailio IP.
Kamailio will loose_route() this request and send it to the backend server
as expected.

Regards,


On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda  wrote:

> Thanks Olle.  I am calling record_record() on the initial INVITE.  In
> fact, the OK has a Record-Route header:
>
> 1.1.1.1 is the endpoint
> 2.2.2.2 is the kamailio proxy
> 3.3.3.3 is the backend server
>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 1.1.1.1:60077
> ;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z-
> Record-Route: 
> From: ;tag=db634167
> To: ;tag=as3f9cf263
> Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM.
> CSeq: 2 INVITE
> User-Agent: CoreDialPBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces
> Contact: 
> Content-Type: application/sdp
> Content-Length: 266
>
> v=0
> o=root 13486 13487 IN IP4 3.3.3.3
> s=session
> c=IN IP4 3.3.3.3
> t=0 0
> m=audio 29990 RTP/AVP 0 8 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> I don't think 3.3.3.3 should show up anywhere, it should be rewritten to
> 2.2.2.2.
>
>
> On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson  wrote:
>
>>
>> On 05 Mar 2014, at 18:30, Marc Soda  wrote:
>>
>> I have Kamailio setup as a proxy in front of a backend server (Asterisk).
>>  When I make a call through the proxy, the Contact header in the 200 OK
>> that is returned to the client has the IP of the backend server in it.
>>  Thus, the client is sending it's ACK directly to the backend server.
>>
>> Is there a special method to rewrite the Contact header to be Kamailio's
>> IP?
>>
>> Check record_route() in the default configuration script. You need to add
>> a route set by using record_route() in the initial transaction.
>>
>> Cheers,
>> /O
>>
>>
>> Where is a good place in the config to do this?  (my config is loosely
>> based on this:
>> http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
>> )
>>
>> Thanks!
>> Marc
>>
>>  ___
>> 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
>
>


-- 
Carlos
http://caruizdiaz.com
http://ngvoice.com
+595981146623
___
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] Incorrect IP address in path header

2014-03-05 Thread Rob Moore
Hi All,

So an interesting one here. I'm doing pass through registrations using the 
dispatcher module in Kamailio and I'm using the Path Module to set the Path 
header In Register request so that Freeswitch knows to follow the route via 
Kamailio to find the sipPhone in future.

In summary:

[SIP 
Phone]--[NAT]--[(externalip)Kamailio(internalip)]---[FS-Registrar]

The problem I'm having is that the Path header is being added with the external 
ip address of the Kamailio instance not the internal ip  e.g. "Path: 
sip:(externalip);transport=tcp" which mean FS doesn't root new calls out to the 
SIPPhone correctly via kamailios internal ip.

I have noticed that if I remove the ;transport=tcp from the FS-Register address 
in my dispatcher group so that the last hop (from kamailio to FS-Register) is 
done over UDP then the problem corrects itself.  (although this does present 
new issues whilst calling out back along the path from FS, and we also have a 
prerequisite to use TCP so this doesn't help).

Has anyone had any experience of this issue?  I can't see what I've done wrong 
here.

Many Thanks

Rob
___
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-Business] [sr-dev] New official Debian and Ubuntu repository

2014-03-05 Thread Vik Killa
This does not work:

http://deb.kamailio.org/kamailio/

It is listed on new wiki: http://www.kamailio.org/wiki/packages/debs


On Wed, Mar 5, 2014 at 12:30 PM, Victor Seva <
linuxman...@torreviejawireless.org> wrote:

> Hi,
>
> 2014-03-05 14:34 GMT+01:00 Vik Killa :
> > Can someone update the wiki page? I was confused for days on this:
> > http://www.kamailio.org/dokuwiki/doku.php/packages:debs
>
> I've updated the new wiki [0].
>
> [0] https://www.kamailio.org/wiki/packages/debs
>
> ___
> 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] Incorrect Contact address

2014-03-05 Thread Marc Soda
Yeah, I think I'm dealing with a buggy client...

Thanks all.


On Wed, Mar 5, 2014 at 1:57 PM, Carlos Ruiz Díaz
wrote:

> Why is erroneous to have the contact header with the backend IP?
>
> With the record-route on the 200 Ok, the ACK should be directed to the
> backend IP, but containing a route header pointing to the Kamailio IP.
> Kamailio will loose_route() this request and send it to the backend server
> as expected.
>
> Regards,
>
>
> On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda  wrote:
>
>> Thanks Olle.  I am calling record_record() on the initial INVITE.  In
>> fact, the OK has a Record-Route header:
>>
>> 1.1.1.1 is the endpoint
>> 2.2.2.2 is the kamailio proxy
>> 3.3.3.3 is the backend server
>>
>> SIP/2.0 200 OK
>> Via: SIP/2.0/UDP 1.1.1.1:60077
>> ;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z-
>> Record-Route: 
>> From: ;tag=db634167
>> To: ;tag=as3f9cf263
>> Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM.
>> CSeq: 2 INVITE
>> User-Agent: CoreDialPBX
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
>> Supported: replaces
>> Contact: 
>> Content-Type: application/sdp
>> Content-Length: 266
>>
>> v=0
>> o=root 13486 13487 IN IP4 3.3.3.3
>> s=session
>> c=IN IP4 3.3.3.3
>> t=0 0
>> m=audio 29990 RTP/AVP 0 8 101
>> a=rtpmap:0 PCMU/8000
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-16
>> a=silenceSupp:off - - - -
>> a=ptime:20
>> a=sendrecv
>>
>> I don't think 3.3.3.3 should show up anywhere, it should be rewritten to
>> 2.2.2.2.
>>
>>
>> On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson  wrote:
>>
>>>
>>> On 05 Mar 2014, at 18:30, Marc Soda  wrote:
>>>
>>> I have Kamailio setup as a proxy in front of a backend server
>>> (Asterisk).  When I make a call through the proxy, the Contact header in
>>> the 200 OK that is returned to the client has the IP of the backend server
>>> in it.  Thus, the client is sending it's ACK directly to the backend server.
>>>
>>> Is there a special method to rewrite the Contact header to be Kamailio's
>>> IP?
>>>
>>> Check record_route() in the default configuration script. You need to
>>> add a route set by using record_route() in the initial transaction.
>>>
>>> Cheers,
>>> /O
>>>
>>>
>>> Where is a good place in the config to do this?  (my config is loosely
>>> based on this:
>>> http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
>>> )
>>>
>>> Thanks!
>>> Marc
>>>
>>>  ___
>>> 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
>>
>>
>
>
> --
> Carlos
> http://caruizdiaz.com
> http://ngvoice.com
> +595981146623
>
> ___
> 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
>
>


-- 

Marc Soda, Sr. Systems Engineer
*CoreDial, LLC* | www.coredial.com

1787 Sentry Parkway West, Building 16, Suite 100, Blue Bell, PA 19422
Office: (215) 297-4400 x203 | Fax: (215) 297-4401 | Email:
ms...@coredial.com

- - - - -

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission,  dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.
___
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-Business] [sr-dev] New official Debian and Ubuntu repository

2014-03-05 Thread Nathan Angelacos

On 03/05/2014 02:23 PM, Vik Killa wrote:


This does not work:

http://deb.kamailio.org/kamailio/

It is listed on new wiki: http://www.kamailio.org/wiki/packages/debs



Hi, I ran into the same thing.   I think its due to this:

> Now there is no 4.1.1 package built so the default kamailio repository
> is pointing to a empty repository. As soon as we release 4.1.2 this
> will be fixed.[1]

I think he meant to say there's no 4.1.x package built (including 
4.1.0); Once 4.1.2 is released, kamailio41 will work.  kamailio is a 
symlink to the 4.1.x tree, which is empty right now.


Using http://deb.kamailio.org/kamailio40 works


And I'd like to add my THANK YOU for setting this up!





[1] http://lists.sip-router.org/pipermail/sr-users/2014-March/081837.html





___
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] Incorrect Contact address

2014-03-05 Thread Ovidiu Sas
No, you are not dealing with a buggy client.
As Carlos pointed out, you are dealing with standard SIP loose routing
mechanism.
Time to read the RFC :)

Regards,
Ovidiu Sas

On Wed, Mar 5, 2014 at 2:24 PM, Marc Soda  wrote:
> Yeah, I think I'm dealing with a buggy client...
>
> Thanks all.
>
>
> On Wed, Mar 5, 2014 at 1:57 PM, Carlos Ruiz Díaz 
> wrote:
>>
>> Why is erroneous to have the contact header with the backend IP?
>>
>> With the record-route on the 200 Ok, the ACK should be directed to the
>> backend IP, but containing a route header pointing to the Kamailio IP.
>> Kamailio will loose_route() this request and send it to the backend server
>> as expected.
>>
>> Regards,
>>
>>
>> On Wed, Mar 5, 2014 at 3:53 PM, Marc Soda  wrote:
>>>
>>> Thanks Olle.  I am calling record_record() on the initial INVITE.  In
>>> fact, the OK has a Record-Route header:
>>>
>>> 1.1.1.1 is the endpoint
>>> 2.2.2.2 is the kamailio proxy
>>> 3.3.3.3 is the backend server
>>>
>>> SIP/2.0 200 OK
>>> Via: SIP/2.0/UDP
>>> 1.1.1.1:60077;rport=46110;branch=z9hG4bK-d8754z-eb9768c7e3a2d1e7-1---d8754z-
>>> Record-Route: 
>>> From: ;tag=db634167
>>> To: ;tag=as3f9cf263
>>> Call-ID: MzI5YTA3YmRkNzFiZjhhZTRkNTc2OGE1ZTc5ZjdjMmM.
>>> CSeq: 2 INVITE
>>> User-Agent: CoreDialPBX
>>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
>>> Supported: replaces
>>> Contact: 
>>> Content-Type: application/sdp
>>> Content-Length: 266
>>>
>>> v=0
>>> o=root 13486 13487 IN IP4 3.3.3.3
>>> s=session
>>> c=IN IP4 3.3.3.3
>>> t=0 0
>>> m=audio 29990 RTP/AVP 0 8 101
>>> a=rtpmap:0 PCMU/8000
>>> a=rtpmap:8 PCMA/8000
>>> a=rtpmap:101 telephone-event/8000
>>> a=fmtp:101 0-16
>>> a=silenceSupp:off - - - -
>>> a=ptime:20
>>> a=sendrecv
>>>
>>> I don't think 3.3.3.3 should show up anywhere, it should be rewritten to
>>> 2.2.2.2.
>>>
>>>
>>> On Wed, Mar 5, 2014 at 1:34 PM, Olle E. Johansson  wrote:


 On 05 Mar 2014, at 18:30, Marc Soda  wrote:

 I have Kamailio setup as a proxy in front of a backend server
 (Asterisk).  When I make a call through the proxy, the Contact header in 
 the
 200 OK that is returned to the client has the IP of the backend server in
 it.  Thus, the client is sending it's ACK directly to the backend server.

 Is there a special method to rewrite the Contact header to be Kamailio's
 IP?

 Check record_route() in the default configuration script. You need to
 add a route set by using record_route() in the initial transaction.

 Cheers,
 /O


 Where is a good place in the config to do this?  (my config is loosely
 based on this:
 http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb)

 Thanks!
 Marc

 ___
 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
>>>
>>
>>
>>
>> --
>> Carlos
>> http://caruizdiaz.com
>> http://ngvoice.com
>> +595981146623
>>
>> ___
>> 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
>>
>
>
>
> --
>
> Marc Soda, Sr. Systems Engineer
> CoreDial, LLC | www.coredial.com
>
> 1787 Sentry Parkway West, Building 16, Suite 100, Blue Bell, PA 19422
> Office: (215) 297-4400 x203 | Fax: (215) 297-4401 | Email:
> ms...@coredial.com
>
> - - - - -
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission,  dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer.
>
> ___
> 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
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.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/list

Re: [SR-Users] msilo config

2014-03-05 Thread Peter Villeneuve
Sorry to bug you, but I never got any feedback on this, and I can't get
msilo working.

Any hints/thoughts?

Cheers


On Tue, Feb 18, 2014 at 1:02 PM, Peter Villeneuve wrote:

> Hi Daniel,
>
> Any thoughts on why t_on_failure("1") gives me the syntax error?
>
> Thanks
>
>
> On Mon, Feb 17, 2014 at 4:31 PM, Peter Villeneuve wrote:
>
>> Hi Daniel,
>>
>> Thanks for replying.
>>
>> This is how I added msilo to the kamailio default config. It still
>> doesn't work for me (ie. offline messages are not delivered - but that's
>> likely me messing up the routing), but at least Kamailio starts ok.
>> Further below I have pasted the config with the t_on_failure("1")  which
>> gives me the error message.
>>
>> $avp(oexten) = $rU;
>> if (!lookup("location")) {
>> $var(rc) = $rc;
>> route(TOVOICEMAIL);
>> t_newtran();
>> switch ($var(rc)) {
>> case -1:
>> case -3:
>> send_reply("404", "Not found");
>> exit;
>> case -2:
>> send_reply("405", "Method Not Allowed");
>> exit;
>> }
>> }
>>
>> # when routing via usrloc, log the missed calls also
>> if (is_method("INVITE"))
>> {
>> setflag(FLT_ACCMISSED);
>> }
>>
>> route(RELAY);
>> exit;
>>
>> # we do not care about anything else but MESSAGEs
>> if (!method=="MESSAGE")
>> {
>> if (!t_reply("404", "Not found"))
>> {
>> sl_reply_error();
>> };
>> exit;
>> };
>> log("MESSAGE received -> storing using MSILO\n");
>> # MSILO - storing as offline message
>> if (m_store("$ru"))
>> {
>> log("MSILO: offline message stored\n");
>> if (!t_reply("202", "Accepted"))
>> {
>> sl_reply_error();
>> };
>> }else{
>> log("MSILO: offline message NOT stored\n");
>> if (!t_reply("503", "Service Unavailable"))
>> {
>> sl_reply_error();
>> };
>> };
>> exit;
>> };
>>
>>
>> By the way, I get the 404 Not found reply (result of case -3) when the
>> user isn't registered. Shouldn't an offline user return case -1 instead?
>>
>>
>> And here's the config that prevents kamailio from starting up.
>> I get the following error message:  (line 754, column 21 corresponds to
>> t_on_failure("1"))
>>
>> 0(4603) :  [cfg.y:3411]: yyerror_at(): parse error in config file
>> /etc/kamailio/kamailio.cfg, line 754, column 21: syntax error
>>  0(4603) :  [cfg.y:3411]: yyerror_at(): parse error in config file
>> /etc/kamailio/kamailio.cfg, line 754, column 21:
>> ERROR: bad config file (2 errors)
>>
>>
>> $avp(oexten) = $rU;
>> if (!lookup("location")) {
>> $var(rc) = $rc;
>> route(TOVOICEMAIL);
>> t_newtran();
>> switch ($var(rc)) {
>> case -1:
>> case -3:
>> send_reply("404", "Not found");
>> exit;
>> case -2:
>> send_reply("405", "Method Not Allowed");
>> exit;
>> }
>> }
>>
>> # when routing via usrloc, log the missed calls also
>> if (is_method("INVITE"))
>> {
>> setflag(FLT_ACCMISSED);
>> }
>>
>> route(RELAY);
>> exit;
>>
>> # we do not care about anything else but MESSAGEs
>> if (!method=="MESSAGE")
>> {
>> if (!t_reply("404", "Not found"))
>> {
>> sl_reply_error();
>> };
>> exit;
>> };
>> log("MESSAGE received -> storing using MSILO\n");
>> # MSILO - storing as offline message
>> if (m_store("$ru"))
>> {
>> log("MSILO: offline message stored\n");
>> if (!t_reply("202", "Accepted"))
>> {
>> sl_reply_error();
>> };
>> }else{
>> log("MSILO: offline message NOT stored\n");
>> if (!t_reply("503", "Service Unavailable"))
>> {
>> sl_reply_error();
>> };
>> };
>> exit;
>> };
>>
>>  # if the downstream UA does not support MESSAGE requests
>> # go to failure_route[1]
>> t_on_failure("1");
>> t_relay();
>> exit;
>> };
>>
>> # forward anything else
>> t_relay();
>> }
>>
>> failure_route[1] {
>> # forwarding failed -- check if the request was a MESSAGE
>> if (!method=="MESSAGE")
>> {
>> exit;
>> };
>>
>> log(1,"MSILO:the downstream UA doesn't support MESSAGEs\n");
>> # we have changed the R-URI with the contact address, ignore i

Re: [SR-Users] [sr-dev] dialog module with DB Backend

2014-03-05 Thread jay binks
Records were inserted, thats for sure..

I have not checked usrloc, but I suspect it didnt rely on the return code
of the insert to anywhere near the same amount.



On 5 March 2014 23:42, Carlos Ruiz Díaz  wrote:

> Hi Jay,
>
> I tried the module as is for the location service, and it worked fine.
> Considering this, why was this part working if usrloc uses the same DB API
> that was binding a buggy implementation?. It makes me suspicious.
>
> Did you make sure the records were actually inserted on the cluster?
>
> Regards,
> Carlos
>
>
> On Wed, Mar 5, 2014 at 8:42 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>  Hello,
>>
>> can you make the patch for master branch? I just backported two patches
>> that were in master branch but not yet in 4.1.
>>
>> With this occasion, can you review if the other 'return 1' expose the
>> same issue? I noticed another one in db_cassa_delete and in db_cassa_query.
>>
>> Thanks,
>> Daniel
>>
>>
>> On 05/03/14 03:57, jay binks wrote:
>>
>> Just noticed the same thing in db_cassa_delete..
>> patch updated to fix both
>>
>>  Jay
>>
>>
>> On 5 March 2014 12:52, jay binks  wrote:
>>
>>> Hi All,
>>>
>>> so Ive done what Carlos suggested and swapped out my dialog db to Mysql
>>> rather than cassandra.
>>> All worked 100% as you would expect.
>>>
>>> Right so the issue is db_cassandra .
>>>
>>> I started testing and going through the code.
>>>
>>> I found I had these lines, which was interesting & concerning.
>>> update_dialog_dbinfo_unsafe(): could not add another dialog to db
>>> I had been ignoring them, because the dialog was in the DB and I figured
>>> I would come back and figure that out later.
>>>
>>> but this seems to have been key to this whole thing.
>>>
>>> ends up that in dlg_db_handler.c dialog_dbf.insert was getting a 1 back
>>> from kamailio on the insert and a 0 back from mysql... WTF.. ok.
>>>
>>> so I trace into db_cassa_insert which calls db_cassa_modify ..
>>> around line 1210 I can see this ..
>>>
>>> CON_CASSA(_h)->con->batch_mutate(CFMap, oac::ConsistencyLevel::ONE);
>>> return 1;
>>>
>>> wrapped in a try / catch block..
>>> seems db_cassandra wants to return 1 for success but kamailio ( or
>>> dialog module at least ) expects 0 for success .
>>>
>>> so I change that to be return 0, and re-test.
>>> everything works as expected,"could not add another dialog to db"
>>> stops coming up on my console,
>>> and dialogs are removed when calls hangup.
>>>
>>> seems this 1 thing is enough to screw dialogs in cassandra ( and who
>>> knows what else ).
>>> This is the reason for my email though,   if we simply change that to 0,
>>> what else may break !??
>>>
>>> however http://www.asipto.com/pub/kamailio-devel-guide/#c09f_insertclearly 
>>> states that "0 if everything is OK"
>>> so this is clearly a bug that needs fixing.
>>>
>>> Can I get someone with more experience to test this for me and possibly
>>> apply the attached patch !?
>>>
>>>  Jay
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 25 February 2014 05:58, Daniel-Constantin Mierla 
>>> wrote:
>>> >
>>> > Hello,
>>> >
>>> > I pushed some patches to the master branch in order to remove the
>>> dialog from its associated profiles when it gets in terminated state. I
>>> encountered such issue (not that) recently, but I haven't gotten the time
>>> to get to it before.
>>> >
>>> > Then, the second patch is to not add dialogs in profiles when loading
>>> from database and the state is terminated (5).
>>> >
>>> > Here are the links to the patches:
>>> >
>>> > -
>>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb57ed5e8ee0ca9ec1f796e43ce993be48
>>> > -
>>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b88eb7ee2d243882383a44f601baa21fd679cd5
>>> >
>>> > Should be straightforward to cherry pick to 4.1 (even 4.0 I expect).
>>> If you test and all goes fine, I will backport -- here I had no time for
>>> real testing.
>>> >
>>> > I plan also to not add the dialogs in memory for state terminated, but
>>> destroy them at db load time. But this needs a bit of a review, to be sure
>>> that all necessary callbacks are executed.
>>> >
>>> > On the other hand, if the dialogs are not removed from db, might be an
>>> issue with the database driver (cassandra in this case, which is rather new
>>> module). Do you get any syslog errors from kamailio or database server? I
>>> expect that people would have reported such issue for other database
>>> engines so far. Still it might be an issue, just that was not noticed...
>>> >
>>> > Cheers,
>>> > Daniel
>>> >
>>> > On 24/02/14 11:19, jay binks wrote:
>>> >
>>> > So poking round the code for the dialog module
>>> > Im not sure what im missing here.
>>> >
>>> >
>>> > get_profile_size dosnt care bout the state of a dialog... so you get
>>> ALL dialogs that are in the hash table.
>>> > ( which is interesting if you want to use dialog module to enforce
>>> channel limits etc )
>>> >
>>> > So you go... OK...  ka

Re: [SR-Users] msilo config

2014-03-05 Thread Daniel-Constantin Mierla

t_on_failure("1") works fine, I just gave it a try.

Check the curly braces to be sure the route block doesn't end before th 
t_on_failure.


Cheers,
Daniel

On 05/03/14 20:49, Peter Villeneuve wrote:
Sorry to bug you, but I never got any feedback on this, and I can't 
get msilo working.


Any hints/thoughts?

Cheers


On Tue, Feb 18, 2014 at 1:02 PM, Peter Villeneuve > wrote:


Hi Daniel,

Any thoughts on why t_on_failure("1") gives me the syntax error?

Thanks


On Mon, Feb 17, 2014 at 4:31 PM, Peter Villeneuve
mailto:peterv...@gmail.com>> wrote:

Hi Daniel,

Thanks for replying.

This is how I added msilo to the kamailio default config. It
still doesn't work for me (ie. offline messages are not
delivered - but that's likely me messing up the routing), but
at least Kamailio starts ok.
Further below I have pasted the config with the
t_on_failure("1")  which gives me the error message.

$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}

# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}

route(RELAY);
exit;

# we do not care about anything else but MESSAGEs
if (!method=="MESSAGE")
{
if (!t_reply("404", "Not found"))
{
sl_reply_error();
};
exit;
};
log("MESSAGE received -> storing using MSILO\n");
# MSILO - storing as offline message
if (m_store("$ru"))
{
log("MSILO: offline message stored\n");
if (!t_reply("202", "Accepted"))
{
sl_reply_error();
};
}else{
log("MSILO: offline message NOT stored\n");
if (!t_reply("503", "Service Unavailable"))
{
sl_reply_error();
};
};
exit;
};


By the way, I get the 404 Not found reply (result of case -3)
when the user isn't registered. Shouldn't an offline user
return case -1 instead?


And here's the config that prevents kamailio from starting up.
I get the following error message:  (line 754, column 21
corresponds to t_on_failure("1"))

0(4603) :  [cfg.y:3411]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 754, column 21:
syntax error
 0(4603) :  [cfg.y:3411]: yyerror_at(): parse error in
config file /etc/kamailio/kamailio.cfg, line 754, column 21:
ERROR: bad config file (2 errors)


$avp(oexten) = $rU;
if (!lookup("location")) {
$var(rc) = $rc;
route(TOVOICEMAIL);
t_newtran();
switch ($var(rc)) {
case -1:
case -3:
send_reply("404", "Not found");
exit;
case -2:
send_reply("405", "Method Not Allowed");
exit;
}
}

# when routing via usrloc, log the missed calls also
if (is_method("INVITE"))
{
setflag(FLT_ACCMISSED);
}

route(RELAY);
exit;

# we do not care about anything else but MESSAGEs
if (!method=="MESSAGE")
{
if (!t_reply("404", "Not found"))
{
sl_reply_error();
};
exit;
};
log("MESSAGE received -> storing using MSILO\n");
# MSILO - storing as offline message
if (m_store("$ru"))
{
log("MSILO: offline message stored\n");
if (!t_reply("202", "Accepted"))
{
sl_reply_error();
};
}else

Re: [SR-Users] [sr-dev] dialog module with DB Backend

2014-03-05 Thread Daniel-Constantin Mierla
The dialog module checks for !=0 and the usrloc for <0. Returning 1 
makes no sense for the cassandra functions as it is not for a special 
case of successful result. It should be 0.


Cheers,
Daniel

On 05/03/14 22:46, jay binks wrote:

Records were inserted, thats for sure..

I have not checked usrloc, but I suspect it didnt rely on the return 
code of the insert to anywhere near the same amount.




On 5 March 2014 23:42, Carlos Ruiz Díaz > wrote:


Hi Jay,

I tried the module as is for the location service, and it worked
fine. Considering this, why was this part working if usrloc uses
the same DB API that was binding a buggy implementation?. It makes
me suspicious.

Did you make sure the records were actually inserted on the cluster?

Regards,
Carlos


On Wed, Mar 5, 2014 at 8:42 AM, Daniel-Constantin Mierla
mailto:mico...@gmail.com>> wrote:

Hello,

can you make the patch for master branch? I just backported
two patches that were in master branch but not yet in 4.1.

With this occasion, can you review if the other 'return 1'
expose the same issue? I noticed another one in
db_cassa_delete and in db_cassa_query.

Thanks,
Daniel


On 05/03/14 03:57, jay binks wrote:

Just noticed the same thing in db_cassa_delete..
patch updated to fix both

Jay


On 5 March 2014 12:52, jay binks mailto:jaybi...@gmail.com>> wrote:

Hi All,

so Ive done what Carlos suggested and swapped out my
dialog db to Mysql rather than cassandra.
All worked 100% as you would expect.

Right so the issue is db_cassandra .

I started testing and going through the code.

I found I had these lines, which was interesting &
concerning.
update_dialog_dbinfo_unsafe(): could not add another
dialog to db
I had been ignoring them, because the dialog was in the
DB and I figured I would come back and figure that out later.

but this seems to have been key to this whole thing.

ends up that in dlg_db_handler.c dialog_dbf.insert was
getting a 1 back from kamailio on the insert and a 0 back
from mysql... WTF.. ok.

so I trace into db_cassa_insert which calls
db_cassa_modify ..
around line 1210 I can see this ..

CON_CASSA(_h)->con->batch_mutate(CFMap,
oac::ConsistencyLevel::ONE);
return 1;

wrapped in a try / catch block..
seems db_cassandra wants to return 1 for success but
kamailio ( or dialog module at least ) expects 0 for
success .

so I change that to be return 0, and re-test.
everything works as expected,  "could not add another
dialog to db" stops coming up on my console,
and dialogs are removed when calls hangup.

seems this 1 thing is enough to screw dialogs in
cassandra ( and who knows what else ).
This is the reason for my email though,   if we simply
change that to 0, what else may break !??

however
http://www.asipto.com/pub/kamailio-devel-guide/#c09f_insert
clearly states that "0 if everything is OK"
so this is clearly a bug that needs fixing.

Can I get someone with more experience to test this for
me and possibly apply the attached patch !?

Jay











On 25 February 2014 05:58, Daniel-Constantin Mierla
mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> I pushed some patches to the master branch in order to
remove the dialog from its associated profiles when it
gets in terminated state. I encountered such issue (not
that) recently, but I haven't gotten the time to get to
it before.
>
> Then, the second patch is to not add dialogs in
profiles when loading from database and the state is
terminated (5).
>
> Here are the links to the patches:
>
> -

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb57ed5e8ee0ca9ec1f796e43ce993be48
> -

http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b88eb7ee2d243882383a44f601baa21fd679cd5
>
> Should be straightforward to cherry pick to 4.1 (even
4.0 I expect). If you test and all goes fine, I will
backport -- here I had no time for real testing.
>
> I plan also to not add the dialogs in memory for state
terminated, but destroy them at db load time. But this

Re: [SR-Users] How to add some text at end of body line with subst_body

2014-03-05 Thread Daniel-Constantin Mierla

Hello,

maybe you can try to skip \r in the match:

subst_body('/(a=crypto[^ \r]*)/\1 UNENCRYPTED_SRTCP/g');

Cheers,
Daniel

On 25/02/14 17:37, Barthel Marco (CI/AFU1) wrote:


Hi,

I’m trying to add some string at the end of some line in the body/sdp 
of a SIP INVITE for testing some interoperability.


The following line

a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU


should be converted to

a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU UNENCRYPTED_SRTCP


I tried with this:

subst_body('/(a=crypto.*)\r/\1 UNENCRYPTED_SRTCP\r/g');

but it does not match

just using

subst_body('/(a=crypto.*)/\1 UNENCRYPTED_SRTCP/g');

matches but results in this (carriage return between key and 
“UNENCRYPTED_SRTCP”):


a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:NwC8z5MsyCWbpJJo1n2BDS8DkGuUU2cIt9KRUqPU\rUNENCRYPTED_SRTCP


using Kamailio 3.3.6

Any ideas?

Mit freundlichen Grüßen / Best regards

*Marco Barthel
*
Robert Bosch GmbH
(CI/AFU1)
Postfach 30 02 20
70442 Stuttgart
GERMANY
www.bosch.com 



Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. 
Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, 
Dr. Dirk Hoheisel, Christoph Kübel,

Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller



___
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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/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] geoip crash

2014-03-05 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> you can make the diff between master and 4.1 branches for geoip module - 
> there were no other changes iirc. Or wait for the new release, I am 
> going to backport anyhow.

i saw that you had backported the patches to 4.1.  i tried with latest
4.1 and didn't get the crash anymore.

thanks,

-- juha

___
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] Fail Safe Environment for kamailio

2014-03-05 Thread Owais ul Haq


Hello,

Guys, I need some help. I am tasked to deploy "Fail
Safe Architecture" for already running Kamailio Server in our
organization. Presently one Kamailio Server is serving the cause with one
internet connection and database on MySQL running on Windows 2008 Server 
R2(which
is attached to kamailio server on other LAN card).


Now the requirement is  to deploy redundancy for internet connection
and kamailio server. Like they want two kamailio servers running parallel, so
if one fails, other will automatically take over and service will be available
to users without any obstruction. At any cost, my organization want to
absolutely minimize any possible blackout.


To further elaborate my point. Here is the network we want.
2 incoming internet connections to 2 kamailio servers. Both attached to a
single database placed at the backend. Now is it possible ?? If not what are
constraints ?? What workaround is possible ?? I seriously need help as it is
matter of job. Thanking in advance for help.
P.S : kamailio server is running of Fedora machine in our environment.



Cheers. 

  ___
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] Fail Safe Environment for kamailio

2014-03-05 Thread davy van de moere
There are many ways to get to Rome. Or in sip terms, there are many ways to 
build something redundant.

A method which might be worthwhile to investigate is deploying SIP SRV. This 
allows you to not have to focus on that one IP address which is always 
available whatever happens, if you need to do this, get comfortable with 
everything you find on the internet on LinuxHA.

Now, SIP SRV comes down to having your endpoints connect to your domain, your 
domain is then defined by SRV records as a bunch of machines which have a 
preferred load balance sharing, but the endpoint should have the logic to pick 
e.g. server B if server A is unavailable.

If your endpoints are a bit recent, there’s a good chance they will support 
this. Especially if you’re building something to have other servers connect to, 
this should be your way to go.

When making this fail safe, you just put a minimum of two kamailio (but more is 
better) server in two different locations, using different network connections. 
On a database front, what you could do is to have replication of your mysql db 
on the machines running kamailio. And have kamailio connect to it’s locally 
available DB. This implies that you implement e.g. a master-master replication 
on mysql, or have a master-slave replication, and add some additional logic in 
your kamailio routing, that when a user is unavailable on server A, it gets 
routed to server B, where the user perhaps is available. As a master-slave 
replication will make it tough to synchronize the location table of your users.

If you don’t like this approach, your alternatives will be to checkout a 
virtualization technique to skip the risk of failing hardware, get yourself a 
VMWare cluster, or cheaper (and I personally like it better thanks to it’s 
simplicity) OpenVZ. Or go for a full blown active-passive setup, using 
heartbeats, virtual IPs, etc…

Also check out this fosdem presentation: 
http://kamailio.org/events/2011-fosdem/p_usrloc.pdf

As a bottom line, I’ld advise you to give it a shot with SIP SRV, it’s an 
elegant solution, which most of the time just works by design. The biggest risk 
you need to take into account is, that building something which can failover is 
typically highly complex, and opens up the risk for many unwanted side-effects. 
We all have seen services go down, exactly because of attempts to have it fully 
redundant.

Best of luck & Enjoy your time with Kamailio!

Grtz,
Davy Van De Moere




Op 6-mrt.-2014, om 05:40 heeft Owais ul Haq  het 
volgende geschreven:

> Hello,
> Guys, I need some help. I am tasked to deploy "Fail Safe Architecture" for 
> already running Kamailio Server in our organization. Presently one Kamailio 
> Server is serving the cause with one internet connection and database on 
> MySQL running on Windows 2008 Server R2(which is attached to kamailio server 
> on other LAN card).
> 
> Now the requirement is  to deploy redundancy for internet connection and 
> kamailio server. Like they want two kamailio servers running parallel, so if 
> one fails, other will automatically take over and service will be available 
> to users without any obstruction. At any cost, my organization want to 
> absolutely minimize any possible blackout.
> 
> To further elaborate my point. Here is the network we want. 2 incoming 
> internet connections to 2 kamailio servers. Both attached to a single 
> database placed at the backend. Now is it possible ?? If not what are 
> constraints ?? What workaround is possible ?? I seriously need help as it is 
> matter of job. Thanking in advance for help.
> 
> P.S : kamailio server is running of Fedora machine in our environment.
> 
> Cheers.
> ___
> 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