[OpenSIPS-Users] Why domain = local IP causes problems with SIP BYE?

2016-03-02 Thread Rodrigo Pimenta Carvalho
Hi.


I have 3 machines: M1, M2 and M3. All machines are in the same local network.


M1 has softphone for user 6000.

M2 has softphone for user 6001. This machine has OpenSIPS 2.1 too.

M3 also has softphone for user 6001.


All  users are online (registered) with the OpenSIPS in M2.

The Domain table is empty (no records there). In this case, every thing is OK 
and user 6000 talks to any 6001 without problems (to establish calls, and to 
finalize calls, in both directions).


However, when I insert the M2's IP into the Domain table, the OpenSIPS refuse 
SIP BYEs from 6000 to 6001 (from M1 to M2). OpenSIPS responds with "Not Here" 
to 6000.

The same problem doesn't happen for SIP BYEs in the opposite direction (from M2 
to M1). Even when 6000 sends SIP BYE to 6001 in M3 the problem doesn't happen.


So, what is the issue here?? Is it not possible to use local IPs as domain, 
when OpenSIPS and clients are in the same IP? If not, why?


P.S.: For registering the users M2's IP was used as domain in the client 
softphones.


Any hint will be very helpful!


Best regards.





RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] mhome asymmetric port issue

2016-03-02 Thread Satish Patel
mhome=1
listen=udp:10.0.0.1:6060 udp:10.0.0.1:5060 udp:192.168.100.1:6060
udp:192.168.100.1:5060

>From client when i send REGISTER to 5060 then server sending reply
back using port 6060, it should send reply back client using 5060
right???

If i use mhome=0 everything works!

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] send error message to specific server.

2016-03-02 Thread Alain Bieuzent
Hi Guillaume,

in which case ? what is the trigger for sending this 404?

Regards

Le 02/03/2016 09:29, guillaume Montassier a écrit :
> Hi,
>
> Is it possible to send a SIP error (eg. 404 Not found) to a specific
> server?
> Like "sl_send_reply("404", "Not found")" but not as a reply, as a new
> message send to a specific server.
>
> Thanks,
> Guillaume
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Fwd: Push notifications

2016-03-02 Thread José Expósito
Hi Babil,

I use the rest_post() method to send a query to my server:

> rest_post("$var(pns_push_url)", "{ \"user\": { \"uri\":\"$var(uri)\",
\"type\":\"INCOMING_CALL\" } }", "application/json", "$var(ct)",
"$var(rcode)");

You can use async with rest_post if it takes too long.
The server is just a Ruby on Rails server that uses the houston gem to send
the notifications: https://github.com/nomad/houston

About having Alice retying... How do you do so? Do you send multiple
INVITEs to the SIP server until Bob becomes online?

Jose

2016-03-02 14:48 GMT+01:00 Babil (Golam Sarwar) :

> Hi José,
> thank you. I have a somewhat similar implementation but on top of OpenSIPS
> 1.11.
>
> I run a daemon that waits for signals from OpenSIPS for triggering push
> notifications. Then the rest of the REST-API call (implementing the APN
> functionality) is handled within that separate daemon's thread. OpenSIPS is
> blocked for minimum amount of time during the REST call. How do you make
> your
> REST calls from the OpenSIPS script? Can you add an example?
>
> Also, in order to wake up Bob and receive calls, in my system I have
> basically
> made Alice to retry a given number of times. Since in my scenario, I
> control
> my SIP clients, it is feasible. But this may not apply to your case.
>
>
> On 3/2/16 5:13 AM, José Expósito wrote:
> > Hi Babil,
> >
> > Thank you very much for your answer.
> >
> > I have another server that offers a RESTful API to send the push
> notifications,
> > store the tokens, etc.
> >
> > I'm using OpenSIPS *2.1.2*
> >
> > Jose
> >
> > 2016-03-02 14:00 GMT+01:00 Babil (Golam Sarwar)  > >:
> >
> > Hi José,
> > what is your mechanism to initiate sending the push? For example,
> what
> > function/script are you calling? Please also add the OpenSIPS
> version you are
> > using.
> >
> > On 3/2/16 4:47 AM, José Expósito wrote:
> > > Hi all,
> > >
> > > I'm trying to implement Apple Push Notifications with OpenSIPS.
> > >
> > > At the moment, when Alice calls Bob and Bob is offline, I send the
> push
> > > notification to Bob and call async sleep until Bob becomes online
> and I
> > proceed
> > > whit the call as usual:
> > >
> > > > if (!lookup("location","m")) {
> > > > if (is_method("INVITE")) {
> > > > # Sends the notification here
> > > > t_reply("100", "Trying");
> > > > t_reply("180", "Ringing");
> > > > async(sleep("5"), wait_bob);
> > > > }
> > > >
> > > > [...]
> > > >
> > > > route[wait_bob] {
> > > > if (!lookup("location","m")) {
> > > > async(sleep("2"), wait_bob);
> > > > }
> > > > if (!t_relay()) { # This establishes the call as usual
> when Bob
> > > becomes online
> > > > send_reply("500","Internal Error");
> > > > }
> > > >exit;
> > > > }
> > >
> > >
> > > This mechanism works without problems, but, when integrating and
> RTP proxy
> > > OpenSIPS is randomly crashing after a while.
> > >
> > > That's why I'm trying to avoid the use of async sleep and switch
> to another
> > > mechanism.
> > >
> > > As usual, how do you solve this problem?
> > > Is there any  way to send a new (re)INVITE when Bob becomes online?
> > >
> > > I'm trying to use create_dialog() when Bob registers, but it
> doesn't look to
> > > work -I'm probably using it wrong.
> > >
> > > Thank you very much in advance
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Fwd: Push notifications

2016-03-02 Thread Babil (Golam Sarwar)
Hi José,
thank you. I have a somewhat similar implementation but on top of OpenSIPS
1.11.

I run a daemon that waits for signals from OpenSIPS for triggering push
notifications. Then the rest of the REST-API call (implementing the APN
functionality) is handled within that separate daemon's thread. OpenSIPS is
blocked for minimum amount of time during the REST call. How do you make your
REST calls from the OpenSIPS script? Can you add an example?

Also, in order to wake up Bob and receive calls, in my system I have basically
made Alice to retry a given number of times. Since in my scenario, I control
my SIP clients, it is feasible. But this may not apply to your case.


On 3/2/16 5:13 AM, José Expósito wrote:
> Hi Babil,
>
> Thank you very much for your answer.
>
> I have another server that offers a RESTful API to send the push 
> notifications,
> store the tokens, etc.
>
> I'm using OpenSIPS *2.1.2*
>
> Jose
>
> 2016-03-02 14:00 GMT+01:00 Babil (Golam Sarwar)  >:
>
> Hi José,
> what is your mechanism to initiate sending the push? For example, what
> function/script are you calling? Please also add the OpenSIPS version you 
> are
> using.
>
> On 3/2/16 4:47 AM, José Expósito wrote:
> > Hi all,
> >
> > I'm trying to implement Apple Push Notifications with OpenSIPS.
> >
> > At the moment, when Alice calls Bob and Bob is offline, I send the push
> > notification to Bob and call async sleep until Bob becomes online and I
> proceed
> > whit the call as usual:
> >
> > > if (!lookup("location","m")) {
> > > if (is_method("INVITE")) {
> > > # Sends the notification here
> > > t_reply("100", "Trying");
> > > t_reply("180", "Ringing");
> > > async(sleep("5"), wait_bob);
> > > }
> > >
> > > [...]
> > >
> > > route[wait_bob] {
> > > if (!lookup("location","m")) {
> > > async(sleep("2"), wait_bob);
> > > }
> > > if (!t_relay()) { # This establishes the call as usual when 
> Bob
> > becomes online
> > > send_reply("500","Internal Error");
> > > }
> > >exit;
> > > }
> >
> >
> > This mechanism works without problems, but, when integrating and RTP 
> proxy
> > OpenSIPS is randomly crashing after a while.
> >
> > That's why I'm trying to avoid the use of async sleep and switch to 
> another
> > mechanism.
> >
> > As usual, how do you solve this problem?
> > Is there any  way to send a new (re)INVITE when Bob becomes online?
> >
> > I'm trying to use create_dialog() when Bob registers, but it doesn't 
> look to
> > work -I'm probably using it wrong.
> >
> > Thank you very much in advance
>

--
Regards,
Babil Golam Sarwar
Voice: gsbabil (Skype), +1-470-222-4511 (Google Voice)

PGP Key Fingerprint : D3A1 EED0 5BA0 72D3 A011 75CB 8EA6 7D99 F433 E92D
PGP Key Download URL: http://bit.ly/gsbabil-pgp-key

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Fwd: Push notifications

2016-03-02 Thread José Expósito
Hi Babil,

Thank you very much for your answer.

I have another server that offers a RESTful API to send the push
notifications, store the tokens, etc.

I'm using OpenSIPS *2.1.2*

Jose

2016-03-02 14:00 GMT+01:00 Babil (Golam Sarwar) :

> Hi José,
> what is your mechanism to initiate sending the push? For example, what
> function/script are you calling? Please also add the OpenSIPS version you
> are
> using.
>
> On 3/2/16 4:47 AM, José Expósito wrote:
> > Hi all,
> >
> > I'm trying to implement Apple Push Notifications with OpenSIPS.
> >
> > At the moment, when Alice calls Bob and Bob is offline, I send the push
> > notification to Bob and call async sleep until Bob becomes online and I
> proceed
> > whit the call as usual:
> >
> > > if (!lookup("location","m")) {
> > > if (is_method("INVITE")) {
> > > # Sends the notification here
> > > t_reply("100", "Trying");
> > > t_reply("180", "Ringing");
> > > async(sleep("5"), wait_bob);
> > > }
> > >
> > > [...]
> > >
> > > route[wait_bob] {
> > > if (!lookup("location","m")) {
> > > async(sleep("2"), wait_bob);
> > > }
> > > if (!t_relay()) { # This establishes the call as usual when Bob
> > becomes online
> > > send_reply("500","Internal Error");
> > > }
> > >exit;
> > > }
> >
> >
> > This mechanism works without problems, but, when integrating and RTP
> proxy
> > OpenSIPS is randomly crashing after a while.
> >
> > That's why I'm trying to avoid the use of async sleep and switch to
> another
> > mechanism.
> >
> > As usual, how do you solve this problem?
> > Is there any  way to send a new (re)INVITE when Bob becomes online?
> >
> > I'm trying to use create_dialog() when Bob registers, but it doesn't
> look to
> > work -I'm probably using it wrong.
> >
> > Thank you very much in advance
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Dispatcher algorithm question

2016-03-02 Thread Rik Broers
I’ve been using the hash over call-id for a long time, and distribution has 
been pretty even over all destinations.

Met vriendelijke groet,

Rik Broers
Voice Engineer
Van: users-boun...@lists.opensips.org [mailto:users-boun...@lists.opensips.org] 
Namens Gunjan Korlekar
Verzonden: woensdag 2 maart 2016 5:26
Aan: OpenSIPS users mailling list 
Onderwerp: Re: [OpenSIPS-Users] Dispatcher algorithm question

Hi Olle,

Thanks for your reply. I will review my script for the re transmission of 
invites issue.

But in the meanwhile can someone answer my question regarding the 'hash over 
call-id' algorithm?

Thanks,
Gunjan

> On 29 Feb 2016, at 18:58, Gunjan Korlekar 
> > wrote:
>
> Hello,
>
> I have a dispatcher table with about 10 destinations and was using the 
> round-robin algorithm to route to destinations since we wanted to have an 
> even spread of traffic across the destinations. However I recently observed 
> that with the round-robin, re-INVITEs with the same call id get routed to 
> different destinations which we thought the dispatcher would handle. So we 
> figured that if we want to circumvent this problem we need to use the hash 
> over call-id algorithm.
>
> Does the 'hash over call-id' give a fair way of distributing the calls over 
> different destinations in the dispatcher like the round robin so that the 
> traffic is spread evenly over the destinations?
> Is there a way we can combine the two algorithms for one set of destinations?

Re-invites are in-dialog and should not be handled with dispatcher normally. 
Dispatcher is used to dialog-forming requests only. I would like to suggest you 
review your script.

/O

--
Thanks,
Gunjan
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Fwd: Push notifications

2016-03-02 Thread Babil (Golam Sarwar)
Hi José,
what is your mechanism to initiate sending the push? For example, what
function/script are you calling? Please also add the OpenSIPS version you are
using.

On 3/2/16 4:47 AM, José Expósito wrote:
> Hi all,
>
> I'm trying to implement Apple Push Notifications with OpenSIPS.
>
> At the moment, when Alice calls Bob and Bob is offline, I send the push
> notification to Bob and call async sleep until Bob becomes online and I 
> proceed
> whit the call as usual:
>
> > if (!lookup("location","m")) {
> > if (is_method("INVITE")) {
> > # Sends the notification here
> > t_reply("100", "Trying");
> > t_reply("180", "Ringing");
> > async(sleep("5"), wait_bob);
> > }
> >
> > [...]
> >
> > route[wait_bob] {
> > if (!lookup("location","m")) {
> > async(sleep("2"), wait_bob);
> > }
> > if (!t_relay()) { # This establishes the call as usual when Bob
> becomes online
> > send_reply("500","Internal Error");
> > }
> >exit;
> > }
>
>
> This mechanism works without problems, but, when integrating and RTP proxy
> OpenSIPS is randomly crashing after a while.
>
> That's why I'm trying to avoid the use of async sleep and switch to another
> mechanism.
>
> As usual, how do you solve this problem?
> Is there any  way to send a new (re)INVITE when Bob becomes online?
>
> I'm trying to use create_dialog() when Bob registers, but it doesn't look to
> work -I'm probably using it wrong.
>
> Thank you very much in advance
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Regards,
Babil Golam Sarwar
Voice: gsbabil (Skype), +1-470-222-4511 (Google Voice)

PGP Key Fingerprint : D3A1 EED0 5BA0 72D3 A011 75CB 8EA6 7D99 F433 E92D
PGP Key Download URL: http://bit.ly/gsbabil-pgp-key

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Fwd: Push notifications

2016-03-02 Thread José Expósito
Hi all,

I'm trying to implement Apple Push Notifications with OpenSIPS.

At the moment, when Alice calls Bob and Bob is offline, I send the push
notification to Bob and call async sleep until Bob becomes online and I
proceed whit the call as usual:

> if (!lookup("location","m")) {
> if (is_method("INVITE")) {
> # Sends the notification here
> t_reply("100", "Trying");
> t_reply("180", "Ringing");
> async(sleep("5"), wait_bob);
> }
>
> [...]
>
> route[wait_bob] {
> if (!lookup("location","m")) {
> async(sleep("2"), wait_bob);
> }
> if (!t_relay()) { # This establishes the call as usual when Bob
becomes online
> send_reply("500","Internal Error");
> }
>exit;
> }


This mechanism works without problems, but, when integrating and RTP proxy
OpenSIPS is randomly crashing after a while.

That's why I'm trying to avoid the use of async sleep and switch to another
mechanism.

As usual, how do you solve this problem?
Is there any  way to send a new (re)INVITE when Bob becomes online?

I'm trying to use create_dialog() when Bob registers, but it doesn't look
to work -I'm probably using it wrong.

Thank you very much in advance
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Solaris Sparc Compile Error

2016-03-02 Thread Răzvan Crainea

Hi, Nathaniel!

Unfortunately there is no way to specify the GNU utilities. Please open 
a pull request for this, I will try to take care of it asap.


Best regards,
Răzvan

On 03/01/2016 08:33 AM, Nathaniel L. Keeling III wrote:

Razvan,

When compiling version 1.8, it was not detecting the 64 bit properly 
which is why I added the variables. I will try building without any 
options set. As far as "sed" is concern, I have gsed version 4.2.2 
installed which is what I thought was being used. It sounds like the 
compile is pulling in the original "sed" that came with the OS. Here 
is the version for that Solaris sed: VERSION: 11.10.0,REV=2005.01.21.15.53


Is there a way to specify/utilize the GNU utilities?

Thanks

Nathaniel


On 2/29/16 8:54 AM, Răzvan Crainea wrote:

Hi, Nathaniel!

In the fist pastebin, are you sure you need the -m64 options? The 
makefile system should detect the architecture and build the packets 
accordingly. Anyway, this is just a question, the real problem seems 
to be the version of the sed package. Can you tell me what sed 
version are you using? Perhaps pasting a help command, since I don't 
have access to a Solaris macine.


All the other pastebin logs do not use the latest version, that's why 
they do not compile.


Best regards,
Răzvan


On 02/29/2016 02:13 PM, Nathaniel L. Keeling III wrote:

Razvan,

Yes, setting LD_EXTRA_OPTS made it compile. I did a git pull and 
tried a few things and here are the results:


I removed the env variables CFLAGS and CXXFLAGS and then set env 
variables CC_EXTRA_OPTS=-m64 and LD_EXTRA_OPTS=-m64. I then executed 
the compile from "make menuconfig" and here is the results.


http://pastebin.com/VwtLcDqw


I then reran the compile with env CFLAGS=-m64 and CXXFLAGS=-m64 
using this:


CC_EXTRA_OPTS=-m64 LD_EXTRA_OPTS=-m64 NICER=0 make all

Here is the pastebin link for that output:

http://pastebin.com/2mpXuehv


Here is the results of the compile with the env CFLAGS and CXXFLAG 
not set using:

CC_EXTRA_OPTS=-m64 LD_EXTRA_OPTS=-m64 NICER=0 make all

This is the pastebin link:

http://pastebin.com/0TW4ZU4S


I then tried again with the env variables CFLAGS and CXXFLAG set as 
before with this:

LD_EXTRA_OPTS=-m64 NICER=0 make all

Here is the pastebin link:

http://pastebin.com/emUFTGu1



Thanks

Nathaniel

On 2/29/16 4:52 AM, Răzvan Crainea wrote:

LD_EXTRA_OPTS=-m64 NICER=0 make all




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] send error message to specific server.

2016-03-02 Thread guillaume Montassier

Hi,

Is it possible to send a SIP error (eg. 404 Not found) to a specific server?
Like "sl_send_reply("404", "Not found")" but not as a reply, as a new 
message send to a specific server.


Thanks,
Guillaume

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users