Re: [SR-Users] Forward reply in onreply_route

2022-06-28 Thread Emmanuel BUU


Le 28/06/2022 à 15:54, Carsten Bock a écrit :

Hi,

Question:
Is there a way to forward a reply from the reply route and do other 
stuff afterward? We are currently doing operations on a 183 reply and 
it would be useful if we could forward the reply before continuing to 
process other stuff.


High-Level example:

/route {
  t_on_reply("REPLY");
  t_relay();
}

onreply_route[REPLY] {
  // Forward the reply to the Caller
  t_relay(); // Does not work, as t_relay is only allowed in request 
and failure-routes


  // Do other fancy stuff, e.g. a DB Update or anything else
}/

Any ideas?

I would use *http_async_query()* in the onreply route, delegate some of 
the DB update an other stuff to an HTTP server. And if there is a need 
to further interact with K, there is a way to specify an HTTP reply 
route that will be called asynchronously.


See : HTTP_ASYNC_CLIENT Module (kamailio.org) 




Thanks,
Carsten




--
Carsten Bock I CTO & Founder

ng-voice GmbH

Trostbrücke 1 I 20457 Hamburg I Germany
T +49 179 2021244 I www.ng-voice.com 

Registry Office at Local Court Hamburg, HRB 120189
Managing Directors: Dr. David Bachmann, Carsten Bock


__
Kamailio - Users Mailing List - Non Commercial Discussions
   *sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
   *https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Issue on kamailio 4.1.9 of database reconnection

2018-12-14 Thread Emmanuel BUU

Hi to the community,

We are starting to use database clusters and would like improve the 
availability of our kamailio server.


We are curretly running kamailio 4.1.9 and we noticed that if we reboot 
the database server, kamailio takes a llloong time to reconnect the 
mysql connection


and during this time, we fail to register.  We see a lot of TCP 
connections in status CLOSING.


After a while, we see things going back to normal (> 30 min) but this is 
too long. Can someone give us advice ?


Has this issue been fixed in newer versions

On kamalio side we're using mysql clients

mysql-libs.x86_64 5.1.73-8.el6_8

We have set the following parameters:

modparam("db_mysql", "timeout_interval", 5)
modparam("db_mysql", "ping_interval", 60)
modparam("db_mysql", "auto_reconnect", 1)

Emmanuel


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] To tags in 407 challenges

2018-03-27 Thread Emmanuel BUU


Le 2018-03-26 à 22:49, Alex Balashov a écrit :

On Mon, Mar 26, 2018 at 10:27:35PM +0200, Henning Westerholt wrote:


I would think this is normal UAC/UAS behavior for SIP request handling:

RFC 3261, sect. 8.2.6.2:
"However, if the To
header field in the request did not contain a tag, the URI in the To
header field in the response MUST equal the URI in the To header
field; additionally, the UAS MUST add a tag to the To header field in
the response (with the exception of the 100 (Trying) response, in
which a tag MAY be present). This serves to identify the UAS that is
responding, possibly resulting in a component of a dialog ID. "

Honestly, in ten years of doing SIP, this is the first time I am
confronting this question. I was accustomed to the notion that To tags
are only added to a reply when it is desirable to form an early dialog
(in the case of a non-100 1xx reply). But the passage you quote seems to
settle it.

An additional question!
Does  second authenticated INVITE sent by UAC should also mention this 
to tag and the called UA should also accept it as part of the dialog id ?


Or does the second authenticated INVITE open a new dialog ?

Emmanuel

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Inserting a message into a transaction?

2018-02-20 Thread Emmanuel BUU

Just a small detail ...

I noticed that by doing so, K create a "totag" parameter in the "To" 
header of 180 Ringing reply. That tag parameter is part of the dialog 
identification.


Then then 183 Session progress that will be forwarded will also have a 
"totag". It will be different because it is generated by the called 
party. Some picky SIP stacks in the calling end-points may enforce 
strict dialog identification and therefore would not recognise 183 
Session progress and the subsequent 200 OK as part of your current call.


In case this happends, you know where the issue comes from.

Emmanuel


Le 2018-02-20 à 18:24, Daniel Tryba a écrit :

On Tue, Feb 20, 2018 at 05:41:49PM +0100, Emmanuel BUU wrote:

sl_send_reply("180", "Make this retarded endpoint ring");

Well, this is embarrassing :)

This is so obvious that I didn't even try. I was under the impression
that a send_reply in on_reply would send to the source of the reply.

onreply_route[MANAGE_REPLY] {
 if(status=="183")
 {
 send_reply("180","Ringing.");
 }
...

Does the job.

Thank you very much Emmanuel.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Inserting a message into a transaction?

2018-02-20 Thread Emmanuel BUU

sl_send_reply("180", "Make this retarded endpoint ring");

Emmanuel

Le 2018-02-20 à 16:13, Daniel Tryba a écrit :

For a retarded endpoint (an old ISDN PBX behind a Smartnode) I need to
insert a 180 reply before sending a 183 (with SDP), otherwise the PBX
fails to playback the inband audio to the caller behind the PBX.

I can't find hints on how to do this. uac_req_send() can be used to
start a new transaction, but I only need to generate a 180 based on the
183 in the on_reply route.

Current Q hack is to send a 180 on the initial INVITE, works but not
ideal.


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Feature/help android fcm and ios related push notification module

2018-02-08 Thread Emmanuel BUU
I believe that supporting push notifications for iOS and Android is 
becoming quite a common issue ... getting kamailio user to adopt a 
common approach would be nice.


Emmanuel


Le 2018-02-03 à 09:50, Dipen Patel a écrit :

hello..

Now most sip soft client in required push wakeup phone.
So for that required android, ios push notifications module.

I have seen some one have developed 'Tsilo'  module based on GCM but 
it is old.


So if possible so please upgrade for Android FCM so it iwll supported 
for Android and ios both.


Thanks



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue with Socket selection on Forwarding ACK message

2018-02-06 Thread Emmanuel BUU



Le 2018-02-03 à 08:10, Timmo Verlaan a écrit :
Upon inspection I think you should set enable_double_rr to value '2'. 
It will always add two record route headers. It is a small line in 
documentation.

Interesting.


I don't see how loose_route can be fixed if you only have 1 route 
header. It won't be compatible with multi homed kamailio.
Yes, we have posted an issue and proposed a patch that should be 
compatible with mhomed=1.


https://github.com/kamailio/kamailio/issues/1428



Kind regards,
Timmo Verlaan



Emmanuel



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Routing based on A and B numbers

2018-02-02 Thread Emmanuel BUU

Really depends on what you want

 * carrierroute is great for prefix based routing but lacks multiple
   information output
 o if you want to use carrierroute on A and B, I would use it in
   cascade mode: first carrierroute call on A number, and use the
   result of the first carrierroute ($rd) as context for the second
   call B number. That is a kind of an elegant hack
 * I would use DIALPLAN for maximum flexibility with regex

Emmanuel

Le 2018-02-02 à 15:00, Grant Bagdasarian a écrit :


Hi,

Which module would be best suited for routing calls based on A and B 
numbers?


We’re currently using the LCR module, with some additional htables to 
add this functionality, but I was wondering if there is a module which 
does exactly this? Or perhaps a combination of modules?


Regards,

Grant Bagdasarian

Senior Developer

+31765727054 

cm.com 



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Issue with Socket selection on Forwarding ACK message

2018-02-02 Thread Emmanuel BUU

Hi Timmo,

We do have *enable_double_rr* set to 1 but the route set added by the 
proxy when record_route() on the INVITE consists in a single route. This 
is because Alice and Bob are BOTH registered with the alternate port 
5066 on the same interfacec and using the same protocol (UDP). To us, 
this seems logical.


Do you have a double route in your case even though both party are on 
the same port, same interface and both UDP? If so, could you send us an 
exemple of Route: header?


Emmanuel BUU
IVèS

Le 2018-02-02 à 14:18, Timmo Verlaan a écrit :

Hi Thomas,

We have a similar situation but we use double route headers so the 
correct egress socket is chosen. You can enable this by setting a 
modparam: enable_double_rr.

Would this be a solution for you?

Kind regards,
Timmo Verlaan

On 2 Feb 2018 13:57, "Thomas Carvello" <thomas.carve...@ives.fr 
<mailto:thomas.carve...@ives.fr>> wrote:


Thank you for you answer.

We have tried to change the local port for Bob, but it doesnt
change anything. And the contact value in 200 OK message has no
influence in this case.

In fact, we have made a further investigation regarding the socket
selection *and read the code. *The issue seems to be located in
the RR module and the loose_route() function.

In the  after_loose() function in loose.c, the  function
set_force_socket()  is called only if a DOUBLE route is mentioned
in the route set of the ACK message

But when both users are using 5066 as proxy port, we get only ONE
route for the proxy in the route set (and to us it is OK). In this
case, we get a trace:

"No next URI found"

and the code exits. Later in the message processing, when
t_relay() is called, the forward_request() selects the first
socket defined in our configuration instead.

At this point, we can't presume what socket we be select. We
believe that it is a software bug  and that after_loose() should
force the send_socket even though we have only one route in the
route set. We also checked the 5.1 code and there is no change in
this module that would alter this behavior.

Are we missing something?

Thank you for you time,

Thomas

Le 26/01/2018 à 15:43, Евгений Голей a écrit :

Hi

Could it be because of Bob happend to use 5060 as local port?
Yes, the port and the address in the ACK are indicated by what
the value in Contact was in reply 200 Ok. Look at the message 200 Ok


Четверг, 25 января 2018, 13:00 +03:00 от Thomas Carvello
<thomas.carve...@ives.fr> <mailto:thomas.carve...@ives.fr>:


Hello,

i have an issue with my Kamailio 4.1.9 configuration.

This configuration is multi-homed, we have*two network*
interfaces, one on a private network and on the public
Internet. Kamailio is configured to listen on port 5060 and
5066 on both interfaces. We register two users Alice and Bob
on the  public Internet using port 5066.  Both users are
behind a NAT and we capture the SIP exchange on the proxy server.

We have set the parameter mhomed=1

When Alice calls Bob, we have

Alice   Proxy   Bob

src=5063dst=5066
INVITE -->

 src=5066
 --  INVITE ---> dst=5060

 dst=5066
 <--- 200 OK -- src=5060


dst=5063
<--- 200 OK - src=5066

src=5063dst=5066
 ACK --->

 *src=5060 (blocked by NAT)*
 --  ACK-xdst=5060


The ACK packet gets relayed with the wrong source port. Then
the NAT rejects the packet and the call cannot be established.

For some reason, when Bob calls Alice, the call is correctly
established. Could it be because Bob happend to use 5060 as
local port?

Also, if we set nhomed=0 it works BUT we are not sure that
multi homed is handled correctly.

I was wondering if you have encounter this issue before?

I have investigated the code for selection socket and what is
the logic of this selection ?

/*How does kamailo knows that it should choose 5066 as src
port if the user is registered using port 5066 instead of 5066?*
/

Thank you for your time.

Thomas



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
<https://lists.kam

Re: [SR-Users] why do I need rtpproxy

2017-11-23 Thread Emmanuel BUU
You dont need rtpproxy if you use asterisk in conjunction with kamailio. 
Asterisk will do the job of relaying the media in an out.


Rtpproxy is needed only if you place call and connect them directly 
using  kamailio only.


Emmanuel


Le 2017-11-23 à 17:39, Wilkins, Steve a écrit :


The way I understand it, *rtpproxy* is needed to pass video/audio 
through Kamailio to Asterisk.  However, even without *rtpproxy* 
running, I get video through to Asterisk via Kamailio, and the video 
plays with no issues on a sip device (e.g. MicroSIP).  I am confused 
what I need *rtpproxy* for.


Thank you



___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] IOS 10 and SIP

2017-06-30 Thread Emmanuel BUU

Thanks so much for thes information.

I understand that Apple is looking to optimize the battery lifetime but 
this basically forces all softphone developpers for iOS to build a 
dependency to Apple infrastructure.


If I understand the implication correctly, this means that the softphone 
vendor will need to provide an infrastructure JUST for waking up the app.


Sorry for the rant but this is stupid ! They should have enable a couple 
of signalling protocols such as SIP to register a way to wake up a 
background app ...


But I guess this is the new "open" world dominated by a couple of giant 
companies that we live in. We have no choice. So much for open and 
standard protocols.


/Manu


Le 2017-06-30 à 10:28, Kjeld Flarup a écrit :


Thanks Frederico

Thanks for that. The Tsilo module simplifies this a lot.

One thing I still see as a challenge is in the multi client scenario, 
where we may have a plain SIP phone, an IOS and an Android. How to 
manage which push to enable, or do we always try to push.



Med venlig hilsen / Best regards
Kjeld Flarup (Christensen) M.Sc E.E, Teknisk chef
Viptel ApS, Hammershusvej 16C, DK-7400 Herning
Telefon: +45 46949949, Telefax: +45 46949950,http://viptel.dk
On 2017-06-30 14:31, Federico Cabiddu wrote:

Hi,
good news: you can easily handle this scenario with Kamailio!
If you want to have an overall view of VoIP you can 
have a look at this speech I gave at Kamailio World 2015: 
https://www.youtube.com/watch?v=4XIrR9bwUkM 
.
And the slides: 
https://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf 
.


Cheers,

Federico

On Fri, Jun 30, 2017 at 2:07 PM, Kjeld Flarup > wrote:


Rumours is that Apple no longer accepts apps which can do
persistent connections in the background.

To my best knowledge that means that IOS no longer supports SIP
incoming calls.
The app should now use Push Notifications, but SIP does not
support this.

Anybody faced this problem?

Is the solution to call an external program when processing an
Invite? This leaves some issues.

1. Should we wait some seconds before proceeding or wait until
the Push notification has been processed, to give the app time to
register.
We cannot start to send invites, before we have a correct
registration. An old registration may change ports when the app
wakes up and makes a new register via NAT.

2. How do we know, if a given user should have a push notification?

3. Which information do we need to be able to send the push
notification?

4. Does this give a penalty to Android users, because we have to
wait for IOS?



-- 
Med venlig hilsen / Best regards

Kjeld Flarup (Christensen) M.Sc E.E, Teknisk chef
Viptel ApS, Hammershusvej 16C, DK-7400 Herning
Telefon: +45 46949949 , Telefax: +45
46949950 , http://viptel.dk


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org 
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users





___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users