[OpenSIPS-Users] B2B not relaying 180 in prepaid scenario

2017-07-04 Thread Andreas Bøckmann
Hello

I am playing around with B2B and running OpenSIPS proxy and B2B on the same
VM.
I am triggering prepaid scenario on initial INVITEs for authenticated
clients.

https://www.opensips.org/Documentation/Tutorials-B2BUA#toc13

Now; everything seems to work OK except for the fact that 180 is not
relayed and no ringing is ever heard on the A-side after listening to Media
and while connecting to B-side.

It seems to somehow be swallowed by B2B. It's passed to B2B which seems to
not handle 180 while in bridging scenario?

DBG:tm:local_reply: Passing provisional reply 180 to FIFO application

DBG:b2b_logic:b2b_logic_notify_reply: Received a reply [180] while in
BRIDGING scenario

Even though A-side is connected (after listening to media) it would make
sense to let the A-side play ringing while trying to reach the B-side.

Any ideas of how I can solve this?

The OpenSIPS log for handling 180 can be found here:
https://pastebin.com/fPVgLrCG

Thanks a lot for your kind support!

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


Re: [OpenSIPS-Users] B2B prepaid.xml with one MediaServer

2017-06-19 Thread Andreas Bøckmann
Hello Bogdan

Quickly cleaning up answered stuff? ;o)

The scenario file you asked for was included in the original post:
https://pastebin.com/KwpgJziL

I am using a modified marketing scenario already for something else; but I
was trying to init the scenario from script when I receive an INVITE; not
initiate it from the B2B as the marketing scenario does.

This was also included in the original post I believe.

//Andreas


> --
>
> Message: 1
> Date: Fri, 16 Jun 2017 17:56:25 +0300
> From: Bogdan-Andrei Iancu <bog...@opensips.org>
> To: OpenSIPS users mailling list <users@lists.opensips.org>, Andreas
> Bøckmann <monkei...@gmail.com>
> Subject: Re: [OpenSIPS-Users] B2B prepaid.xml with one MediaServer
> Message-ID: <5e8a6ed7-c4e3-b0c3-fede-df196cddf...@opensips.org>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi Andreas,
>
> You don;t have to change anything in the opensips script (for adding the
> pre-call media server), but only in the XML scenario.
>
> Take a look at the marketing scenario (in the B2B tutorial), where after
> a caller is connected to an announcement, upon announcement termination,
> the call is sent to callee side.
>
> Could you post your XML scenario ?
>
> Best regards,
>
> Bogdan-Andrei Iancu
>OpenSIPS Founder and Developer
>http://www.opensips-solutions.com
>
> OpenSIPS Bootcamp 2017, Houston, US
>http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
>
> On 06/13/2017 01:22 PM, Andreas Bøckmann wrote:
> > Hello
> >
> > I wanted to test the B2B script-scenario prepaid from the B2BUA
> tutorials.
> > The only change I wanted was to only invoke a MediaServer before
> > connecting the call to B-party.
> >
> > Note my OpenSIPS is running regular proxy/registrar functions besides
> B2B.
> >
> > The B2B is able to setup the call towards MediaServer and trigger on
> > receiving BYE.
> >
> > The next leg towards the actual B-party is not setup as OpenSIPS
> > doesn't see this as B2B? but does authorization for that INVITE
> > request, which fails.
> >
> > I believe it's due to the B2B doing somethingsomething to my URIs
> > and/or CSEQs.
> >
> > My issue seems very much like something I found in a previous post
> > (https://opensips.org/pipermail/users/2010-February/010931.html) but
> > there was no final solution.
> >
> > I trigger this for the initial INVITE as such:
> >
> > if ($rU =~ "^\+1234567890.*") {
> >
> > # t_newtran is necessary because b2b should not handle
> > retransmissions.
> > if (!t_newtran()) {
> >sl_reply_error();
> >exit;
> > }
> >
> > xlog("L_WARN","B2BUA cid=$ci, Call from $fU to $rU initialized
> > as B2B\n");
> > b2b_init_request("freecall", "sip:+@1.2.3.4:5080
> > <http://sip:+@1.2.3.4:5080>");
> > exit;
> > }
> >
> > My B2B scenario file: https://pastebin.com/KwpgJziL
> >
> > Any clues to what the solution from Anca was in the original post
> > referenced above or any other ideas as to what I am doing wrong here?
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] B2B prepaid.xml with one MediaServer

2017-06-13 Thread Andreas Bøckmann
Hello

I wanted to test the B2B script-scenario prepaid from the B2BUA tutorials.
The only change I wanted was to only invoke a MediaServer before connecting
the call to B-party.

Note my OpenSIPS is running regular proxy/registrar functions besides B2B.

The B2B is able to setup the call towards MediaServer and trigger on
receiving BYE.

The next leg towards the actual B-party is not setup as OpenSIPS doesn't
see this as B2B? but does authorization for that INVITE request, which
fails.

I believe it's due to the B2B doing somethingsomething to my URIs and/or
CSEQs.

My issue seems very much like something I found in a previous post (
https://opensips.org/pipermail/users/2010-February/010931.html) but there
was no final solution.

I trigger this for the initial INVITE as such:

if ($rU =~ "^\+1234567890.*") {

# t_newtran is necessary because b2b should not handle
retransmissions.
if (!t_newtran()) {
   sl_reply_error();
   exit;
}

xlog("L_WARN","B2BUA cid=$ci, Call from $fU to $rU initialized as
B2B\n");
b2b_init_request("freecall", "sip:+@1.2.3.4:5080");
exit;
}

My B2B scenario file: https://pastebin.com/KwpgJziL

Any clues to what the solution from Anca was in the original post
referenced above or any other ideas as to what I am doing wrong here?
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] fetch_event_params for E_UL_CONTACT_INSERT

2017-06-12 Thread Andreas Bøckmann
Hello!

The same snippet used below worked in older versions and I couldn't see any
change in docs.
How should I correctly fetch event parameters? Even $ci is gone inside
event_route.

_version: opensips 2.4.0-dev (x86_64/linux)
flags: STATS: On, SHM_EXTRA_STATS, DISABLE_NAGLE, USE_MCAST, SHM_MMAP,
PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 99ebafd
main.c compiled on 12:20:24 Jun  7 2017 with gcc 4.9.2_

event_route[E_UL_CONTACT_INSERT] {
fetch_event_params("$avp(aor_param);$avp(addr_param);$avp(callid_param);$avp(rec_param);$avp(cseq_param)");
xlog("L_NOTICE","E_UL_INSERT cid=$avp(callid_param), $avp(aor_param),
$avp(rec_param), $avp(cseq_param) - callid=$ci\n");
}

DBG:core:evi_raise_event_msg: found subscriber E_UL_CONTACT_INSERT
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:event_route:scriptroute_fetch: Fetching parameters for event
E_UL_CONTACT_INSERT
DBG:event_route:scriptroute_fetch: Successfully fetched 5 parameters
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
DBG:core:subst_run: running. r=1
DBG:core:subst_str: no match
DBG:avpops:ops_subst: subst to 0 avps
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header
E_UL_INSERT cid=sip:1.2.3.4:53875, +12345...@cooldomain.aq, , -1 -
callid=
DBG:core:parse_headers: flags=40
ERROR:core:pv_get_callid: cannot parse Call-Id header

The CallID header it complains about is
Call-ID: 142559_rel51ZjRhYWM2ZGZjNjdkZTgxYWU4ZDcxZWU1NjdiNTZmN2Q

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


[OpenSIPS-Users] Parsing response from rest_client

2017-05-11 Thread Andreas Bøckmann
Hello

I am running OpenSIPS 2.3 and using something along these lines:

  async(rest_get("$var(push_url)", "$var(push_response)"),
handle_push_response);
  ..
  xlog("L_NOTICE","L16.02, PUSHRESPONSE cid=$ci,
RESPONSE=$var(push_response)\n");
  ..
  if (pcre_match("$avp(push_response)","OK")) {
  ..
  }

The xlog entry shows /usr/local/sbin/opensips[415]: L16.02, PUSHRESPONSE
cid=9ad0Ads0duSAUdj0asd39, RESPONSE={"response":"OK"}

I observe the following errors in logs (see below).
Wouldn't make sense to cast it to int I guess and I see no s.string?

: ERROR:core:fixup_get_svalue: no valid PV value found (error in scripts)
: ERROR:regex:w_pcre_match: cannot print the format for string

The pcre_match does not seem to be able to match "OK".

Any suggestions as to what I am doing wrong here or how I should do it?

The same script seems to work with 2.1/2.2.

Thanks!


Kind regards,

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


Re: [OpenSIPS-Users] BYE not terminating cal

2017-04-12 Thread Andreas Bøckmann
Hello

Sure - I can take a trace from b2b and from the proxy.
Do you have any tips of how I can easily anonymize signaling traces to
avoid exposing IPs?

But .. :) as the BYEs which are not responded to (or accepted as the call
is not disconnected) by the gateway is sent from the OpenSIPS proxy between
B2B and gateway, wouldn't it make more sense to look at those? (see
original post).

"LegA":  B2B-->Proxy-->GW   - not disconnected and BYE not responded to
"LegB":  B2B-->MediaServer   - MediaServer sends BYE - LegA later bridged
with LegC.
"LegC":  B2B-->Proxy-->GW   - disconnected OK and BYE responded 200 OK

The INV/BYE+200 messages between proxy and gateway:
https://pastebin.com/k7060wD4


//Andreas


> Message: 1
> Date: Wed, 12 Apr 2017 16:28:37 +0300
> From: Bogdan-Andrei Iancu <bog...@opensips.org>
> To: OpenSIPS users mailling list <users@lists.opensips.org>, Andreas
> Bøckmann <monkei...@gmail.com>
> Subject: Re: [OpenSIPS-Users] BYE not terminating call
> Message-ID: <4f43dd18-040f-643d-127e-bc2997254...@opensips.org>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi Andreas,
>
> First of all you need to be sure about the attempted signaling from
> opensips side - do you have a SIP capture from the b2b machine, showing
> all the legs ? it is interesting to see the signaling.
>
> Best regards,
>
> Bogdan-Andrei Iancu
>OpenSIPS Founder and Developer
>http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>http://www.opensips.org/events/Summit-2017Amsterdam.html
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] BYE not terminating call

2017-04-07 Thread Andreas Bøckmann
Hello

I am sending a BYE to some carrier which does not reply back anything and I
am trying to understand what I might be doing wrong. They are running some
Cisco gateway so I expect them to deal with signaling better than what I
do..

Basically the scenario is identical to
https://www.opensips.org/Documentation/Tutorials-B2BUA#toc14 - with the
exception I have a proxy in between B2B and PSTN-GW for routing purposes.

LegA (to "caller")
LegB (to "mediaserver")
LegC (to "callee")

After completing playing the media; the call is re-invited to A and a new
call is setup towards C.

* If I reject the initial call (before media - session 1) on Cs terminal;
everything is OK and A is disconnected.

* If I hangup on A during "session 2", C is not disconnected

* If I hangup on C during "session 2", A is not disconnected

* If I let the call time out during "session 2" (I have a timer set for max
duration) C is disconnected and A is not.

What causes my head to spin is that I have 3 carriers; two of them accept
the signaling flow "as is" and terminates the calls correctly in all
scenarios.

The one carrier I want to use has the behavior seen above.

Does anybody have any suggestion on what I might do on my side to terminate
these calls properly or any suggestions as to what I am doing wrong?

Thank!

Kind regards,

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


[OpenSIPS-Users] MediaProxy Got traffic information for stream

2017-03-31 Thread Andreas Bøckmann
Hello,

I am hoping somebody can explain to me how MediaProxy receives "traffic
information" from OpenSIPS.

I am trying to use two different GWs to reach PSTN but I am experiencing
no-audio using one of them and the only thing I can see that is different
is in MediaProxy logs.
.
The call flow is similar (late offer).

--> INVITE
<- 183/180
<-  200 OK SDP
--> ACK SDP

Got traffic information for stream: (audio) Unknown (RTP: 1.2.3.4:10002,
RTCP: Unknown) <-> 2.3.4.5:16388 <-> 2.3.4.5:16390 <-> 4.5.6.7:11390 (RTP:
4.5.6.7:11390, RTCP: 4.5.6.7:11391)

Got traffic information for stream: (audio) Unknown (RTP: 1.2.3.4:1,
RTCP: Unknown) <-> 2.3.4.5:16384 <-> 2.3.4.5:16386 <-> 3.4.5.6:22458 (RTP:
Unknown, RTCP: Unknown)

As I see this MediaProxy has all 3 relevant IPs in both cases; but it's not
set in "RTP:" for the call which does not have audio so I am wondering how
this can be?

What's the missing piece here so that MediaProxy knows "3.4.5.6" is "RTP:" ?


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


[OpenSIPS-Users] Help with B2B marketing scenario - receiving 491 Request Pending from GW

2017-03-14 Thread Andreas Bøckmann
Hello

I am trying to use the B2B marketing scenario example as shown here
 with the
exception that I have another OpenSIPS instance running between B2B and
other parties except MediaServer.

opensipsctl fifo b2b_trigger_scenario marketing sip:+4712...@my.domain.com
sip:+4723456@1.2.3.4 sip:+4723...@my.domain.com

This executes as something like:

a)  B2B sends INVITE to Proxy (my.domain.com) towards 4712345.
b)  Proxy sends this call to PSTN-GW and it works
c)  B2B sends INVITE to MediaServer (1.2.3.4) and RTP flows correctly.
d)  B2B received BYE from MediaServer

e)  B2B sends INVITE to Proxy (my.domain.com) towards 4723456
f)   Proxy sends this call to PSTN-GW
g)  PSTN-GW responds 491 Request Pending for this call

My B2B is running the script found here  and
the Proxy is running the script found here 

RFC 3261, 14.1 UAC Behavior States:
UAC MUST NOT initiate a new INVITE transaction within a dialog while
another INVITE transaction is in progress in either direction. If there is
an ongoing INVITE client transaction, the TU MUST wait until the
transaction reaches the completed or terminated state before initiating the
new INVITE.

Can anybody help me spot where my error is?


Thank you!

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


[OpenSIPS-Users] Accounting B2BUA market scenario

2017-03-07 Thread Andreas Bøckmann
Hello,

I am trying to generate acc records for the marketing scenario example
(B2BUA) and execute it as such:

opensipsctl fifo b2b_trigger_scenario marketing sip:+12345@external.domain1
sip:+23456@external.domain2 sip:+23456@external.domain1

The only records I get in the database on the OpenSIPS-B2BUA is "BYE"
records; without an initial INVITE so there is no duration etc.

How do you properly handle accounting for the B2B-module; and in my
specific case how do I generate records on UAC generated INVITE in OpenSIPS?

route[b2b_request] {
   do_accounting("db");
   #do_accounting("db|log", "cdr|missed", "acc");
}

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


[OpenSIPS-Users] Handling various CANCEL scenarios

2017-02-07 Thread Andreas Bøckmann
Hello everybody

How can I separate different Reason headers to achieve a setup where
NO_ANSWER (480) ends the dialog (and sends CANCELs) while other reasons
like e.g. TM timeout leads to routing the requests to GW?

Could this be handled in the failure route as something like below or am I
way off here?

  if (t_check_status("480")) {
 t_relay();
 exit;
  }

  if (t_check_status("487")) {
 t_relay();
 exit;
  }

  if (t_check_status("404")) {
 route_to_gw("gwname");
 t_on_failure("gwfailure");
  }

Thanks!

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


[OpenSIPS-Users] Does OpenSIPS support adding a=rtcp: IN IP4 to SDP?

2016-03-01 Thread Andreas Bøckmann
Hello,

Has anybody tried adding a "a=rtcp" header to SDP as shown in Subject?
Would this be achievable by using e.g. sipmsgops (hf_append) or does
anybody have some example(s)?

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