Re: [asterisk-users] RTP not being switched between both SIP endpoints

2013-09-18 Thread Kenny Watson
Hi,

Since opensips is not handling media (i presume) is the audio not already going 
direct from asterisk to the other endpoint?

Thanks

Kenny

From: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] on behalf of Gareth Blades 
[mailinglist+aster...@dns99.co.uk]
Sent: 17 September 2013 11:17
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] RTP not being switched between both SIP endpoints

We have a system where calls are coming in from telcos via an opensips
server and then being redirected out to a regular sip destination.
There is no NAT, DTMF features, call recording, or codec translation
being performed so I would expect asterisk to issue a reinvite after the
call is answered and switch the audio however it is not happening.

Here is the sip peer information for the call coming from opensips.
Directmedia is not specifically defined so its using the asterisk
default value.

   * Name   : vmpubopensips3
   Description  :
   Secret   : Not set
   MD5Secret: Not set
   Remote Secret: Not set
   Context  : from-pubopensips
   Record On feature : automon
   Record Off feature : automon
   Subscr.Cont. : Not set
   Language :
   Tonezone : Not set
   AMA flags: Unknown
   Transfer mode: open
   CallingPres  : Presentation Allowed, Not Screened
   Callgroup:
   Pickupgroup  :
   Named Callgr :
   Nam. Pickupgr:
   MOH Suggest  :
   Mailbox  :
   VM Extension : asterisk
   LastMsgsSent : 0/0
   Call limit   : 0
   Max forwards : 0
   Dynamic  : No
   Callerid :  
   MaxCallBR: 384 kbps
   Expire   : -1
   Insecure : no
   Force rport  : Auto (No)
   Symmetric RTP: No
   ACL  : No
   DirectMedACL : No
   T.38 support : No
   T.38 EC mode : Unknown
   T.38 MaxDtgrm: -1
   DirectMedia  : Yes
   PromiscRedir : No
   User=Phone   : No
   Video Support: No
   Text Support : No
   Ign SDP ver  : No
   Trust RPID   : Yes
   Send RPID: No
   Subscriptions: Yes
   Overlap dial : No
   DTMFmode : rfc2833
   Timer T1 : 500
   Timer B  : 32000
   ToHost   : 88.x.x.x
   Addr-IP : 88.x.x.x:5060
   Defaddr-IP  : (null)
   Prim.Transp. : UDP
   Allowed.Trsp : UDP
   Def. Username:
   SIP Options  : (none)
   Codecs   : (gsm|ulaw|alaw)
   Codec Order  : (alaw:20,ulaw:20,gsm:20)
   Auto-Framing :  No
   Status   : Unmonitored
   Useragent:
   Reg. Contact :
   Qualify Freq : 6 ms
   Keepalive: 0 ms
   Sess-Timers  : Accept
   Sess-Refresh : uas
   Sess-Expires : 1800 secs
   Min-Sess : 90 secs
   RTP Engine   : asterisk
   Parkinglot   :
   Use Reason   : No
   Encryption   : No

When the call comes in the SDP contains :-

v=0.
o=root 973184584 973184584 IN IP4 81.x.x.x
s=session.
c=IN IP4 81.x.x.x
t=0 0.
m=audio 11370 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.

and we reply back with :-

v=0.
o=root 822402971 822402971 IN IP4 88.x.x.x
s=Asterisk PBX 11.2-cert2.
c=IN IP4 88.x.x.x
t=0 0.
m=audio 10428 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.


When we send the outbound SIP information we advertise the following SDP :-

v=0.
o=root 431105643 431105643 IN IP4 88.x.x.x
s=Asterisk PBX 11.2-cert2.
c=IN IP4 88.x.x.x
t=0 0.
m=audio 10144 RTP/AVP 8 3 0 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.

and the other end replies with :-

v=0.
o=hksbc1a 609621538 609621538 IN IP4 203.x.x.x
s=sip call.
c=IN IP4 203.x.x.x
t=0 0.
m=audio 34146 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=ptime:20.
a=fmtp:101 0-15.

In the Dial() command the only option we are using is M() which is used
to run a macro when the call is answered. This is used to update cdr
records and perform other features if they are enabled. In this case we
are just updating the cdr records so I would expect the audio to be
switched as soon as the macro finishes.

Any ideas what could be wrong?
We are running Asterisk PBX 11.2-cert2

Thanks
Gareth

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update

Re: [asterisk-users] RTP not being switched between both SIP endpoints

2013-09-18 Thread Gareth Blades

On 18/09/13 12:40, Kenny Watson wrote:

Hi,

Since opensips is not handling media (i presume) is the audio not already going 
direct from asterisk to the other endpoint?

Thanks

Kenny


Opensips wasnt handling the media so the audio was between the original 
caller and asterisk (with the signalling being relayed by opensips). It 
was just when we dialled onto the final destination via SIP asterisk 
stayed in the loop and didnt issue a reinvite.


Its all fixed now. Although we weren't using any features the AGI 
application was setting DYNAMIC_FEATURES to an empty string which was 
enough to keep asterisk in a loop. We stopped the AGI from setting the 
variable if there were no features and it started working.


Thanks
Gareth

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] RTP not being switched between both SIP endpoints

2013-09-17 Thread Gareth Blades
We have a system where calls are coming in from telcos via an opensips 
server and then being redirected out to a regular sip destination.
There is no NAT, DTMF features, call recording, or codec translation 
being performed so I would expect asterisk to issue a reinvite after the 
call is answered and switch the audio however it is not happening.


Here is the sip peer information for the call coming from opensips. 
Directmedia is not specifically defined so its using the asterisk 
default value.


  * Name   : vmpubopensips3
  Description  :
  Secret   : Not set
  MD5Secret: Not set
  Remote Secret: Not set
  Context  : from-pubopensips
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : Not set
  Language :
  Tonezone : Not set
  AMA flags: Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup:
  Pickupgroup  :
  Named Callgr :
  Nam. Pickupgr:
  MOH Suggest  :
  Mailbox  :
  VM Extension : asterisk
  LastMsgsSent : 0/0
  Call limit   : 0
  Max forwards : 0
  Dynamic  : No
  Callerid :  
  MaxCallBR: 384 kbps
  Expire   : -1
  Insecure : no
  Force rport  : Auto (No)
  Symmetric RTP: No
  ACL  : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: -1
  DirectMedia  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : Yes
  Send RPID: No
  Subscriptions: Yes
  Overlap dial : No
  DTMFmode : rfc2833
  Timer T1 : 500
  Timer B  : 32000
  ToHost   : 88.x.x.x
  Addr-IP : 88.x.x.x:5060
  Defaddr-IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username:
  SIP Options  : (none)
  Codecs   : (gsm|ulaw|alaw)
  Codec Order  : (alaw:20,ulaw:20,gsm:20)
  Auto-Framing :  No
  Status   : Unmonitored
  Useragent:
  Reg. Contact :
  Qualify Freq : 6 ms
  Keepalive: 0 ms
  Sess-Timers  : Accept
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess : 90 secs
  RTP Engine   : asterisk
  Parkinglot   :
  Use Reason   : No
  Encryption   : No

When the call comes in the SDP contains :-

v=0.
o=root 973184584 973184584 IN IP4 81.x.x.x
s=session.
c=IN IP4 81.x.x.x
t=0 0.
m=audio 11370 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.

and we reply back with :-

v=0.
o=root 822402971 822402971 IN IP4 88.x.x.x
s=Asterisk PBX 11.2-cert2.
c=IN IP4 88.x.x.x
t=0 0.
m=audio 10428 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.


When we send the outbound SIP information we advertise the following SDP :-

v=0.
o=root 431105643 431105643 IN IP4 88.x.x.x
s=Asterisk PBX 11.2-cert2.
c=IN IP4 88.x.x.x
t=0 0.
m=audio 10144 RTP/AVP 8 3 0 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.

and the other end replies with :-

v=0.
o=hksbc1a 609621538 609621538 IN IP4 203.x.x.x
s=sip call.
c=IN IP4 203.x.x.x
t=0 0.
m=audio 34146 RTP/AVP 8 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:101 telephone-event/8000.
a=ptime:20.
a=fmtp:101 0-15.

In the Dial() command the only option we are using is M() which is used 
to run a macro when the call is answered. This is used to update cdr 
records and perform other features if they are enabled. In this case we 
are just updating the cdr records so I would expect the audio to be 
switched as soon as the macro finishes.


Any ideas what could be wrong?
We are running Asterisk PBX 11.2-cert2

Thanks
Gareth

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users