[Asterisk-video] [Posible SPAM (Header Check)] - Re: Problems with a loopback scenario, initial negotiation fails. - Email found in subject

Hernan Rajchert hrajchert at ats-connection.com
Thu Jan 8 10:07:17 CST 2009


Sry for the fast answer but I have to go for a while:

>>>Note: you should never have an audio problem because 
>>>of different codecs as Asterisk should do the transcoding.

For some reason it did, I found one of your post that said that outgoing
pri calls was hardcoded to alaw.

This is a log from the time it went wrong...

The problem was in 403 calling 201402




========================================================================
=======================================
=====================================From 402 calling to
201403============================================
========================================================================
=======================================
---
--- core show channels
---

Channel              Location             State   Application(Data)
SIP/403-09c633d0     (None)               Up      AppDial((Outgoing
Line))
DAHDI/32-1           403 at from-pstn-cpe:1  Up      Dial(SIP/403)
DAHDI/1-1            (None)               Up      AppDial((Outgoing
Line))
SIP/402-09c75308     201403 at from-internal Up      Dial(DAHDI/1/403)
4 active channels
2 active calls

---
--- core show channel SIP/403-09c633d0
---

-- General --
           Name: SIP/403-09c633d0
           Type: SIP
       UniqueID: 1231354355.54
      Caller ID: 403
 Caller ID Name: (N/A)
    DNID Digits: (N/A)
          State: Up (6)
          Rings: 0
  NativeFormats: 0x80004 (ulaw|h263)
    WriteFormat: 0x4 (ulaw)
     ReadFormat: 0x8 (alaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 92
      Frames in: 6903
     Frames out: 7017
 Time to Hangup: 0
   Elapsed Time: 0h2m21s
  Direct Bridge: DAHDI/32-1
Indirect Bridge: DAHDI/32-1
 --   PBX   --
        Context: from-internal-custom
      Extension:
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: AppDial
           Data: (Outgoing Line)
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=DAHDI/32-1
DIALEDPEERNUMBER=403
SIPCALLID=40f92e08748e5a35142064c27d3dfd1b at 172.16.101.36

  CDR Variables:
level 1: dst=s
level 1: dcontext=from-internal-custom
level 1: channel=SIP/403-09c633d0
level 1: start=2009-01-07 12:52:35
level 1: answer=2009-01-07 12:52:39
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354355.54

---
--- core show channel DAHDI/32-1
---
 -- General --
           Name: DAHDI/32-1
           Type: DAHDI
       UniqueID: 1231354355.53
      Caller ID: 402
 Caller ID Name: zultys 402
    DNID Digits: 403
          State: Up (6)
          Rings: 1
  NativeFormats: 0x48 (alaw|slin)
    WriteFormat: 0x8 (alaw)
     ReadFormat: 0x4 (ulaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 41
      Frames in: 14753
     Frames out: 14590
 Time to Hangup: 0
   Elapsed Time: 0h4m55s
  Direct Bridge: SIP/403-09c633d0
Indirect Bridge: SIP/403-09c633d0
 --   PBX   --
        Context: from-pstn-cpe
      Extension: 403
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: Dial
           Data: SIP/403
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=SIP/403-09c633d0
DIALEDPEERNUMBER=403
DIALEDPEERNAME=SIP/403-09c633d0
CALLEDTON=33
ANI2=0
TRANSFERCAPABILITY=SPEECH

  CDR Variables:
level 1: clid="zultys 402" <402>
level 1: src=402
level 1: dst=403
level 1: dcontext=from-pstn-cpe
level 1: channel=DAHDI/32-1
level 1: dstchannel=SIP/403-09c633d0
level 1: lastapp=Dial
level 1: lastdata=SIP/403
level 1: start=2009-01-07 12:52:35
level 1: answer=2009-01-07 12:52:39
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354355.53

---
--- core show channel DAHDI/1-1
---
 -- General --
           Name: DAHDI/1-1
           Type: DAHDI
       UniqueID: 1231354355.52
      Caller ID: 201403
 Caller ID Name: (N/A)
    DNID Digits: (N/A)
          State: Up (6)
          Rings: 0
  NativeFormats: 0x48 (alaw|slin)
    WriteFormat: 0x8 (alaw)
     ReadFormat: 0x4 (ulaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 11
      Frames in: 15652
     Frames out: 15490
 Time to Hangup: 0
   Elapsed Time: 0h5m13s
  Direct Bridge: SIP/402-09c75308
Indirect Bridge: SIP/402-09c75308
 --   PBX   --
        Context: from-pstn-net
      Extension:
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: AppDial
           Data: (Outgoing Line)
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=SIP/402-09c75308
DIALEDPEERNUMBER=1/403
TRANSFERCAPABILITY=SPEECH

  CDR Variables:
level 1: dst=s
level 1: dcontext=from-pstn-net
level 1: channel=DAHDI/1-1
level 1: start=2009-01-07 12:52:35
level 1: answer=2009-01-07 12:52:39
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354355.52

---
--- core show channel SIP/402-09c75308
---
 -- General --
           Name: SIP/402-09c75308
           Type: SIP
       UniqueID: 1231354355.51
      Caller ID: 402
 Caller ID Name: zultys 402
    DNID Digits: 201403
          State: Up (6)
          Rings: 0
  NativeFormats: 0x4 (ulaw)
    WriteFormat: 0x4 (ulaw)
     ReadFormat: 0x8 (alaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 87
      Frames in: 16928
     Frames out: 17063
 Time to Hangup: 0
   Elapsed Time: 0h5m42s
  Direct Bridge: DAHDI/1-1
Indirect Bridge: DAHDI/1-1
 --   PBX   --
        Context: from-internal-custom
      Extension: 201403
       Priority: 2
     Call Group: 0
   Pickup Group: 0
    Application: Dial
           Data: DAHDI/1/403
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=DAHDI/1-1
DIALEDPEERNUMBER=1/403
DIALEDPEERNAME=DAHDI/1-1
SIPCALLID=465185821-36
SIPUSERAGENT=Zultys ZIP4x4 1.4.2
SIPDOMAIN=172.16.101.36
SIPURI=sip:402 at 172.16.101.2:5060

  CDR Variables:
level 1: clid="zultys 402" <402>
level 1: src=402
level 1: dst=201403
level 1: dcontext=from-internal-custom
level 1: channel=SIP/402-09c75308
level 1: dstchannel=DAHDI/1-1
level 1: lastapp=Dial
level 1: lastdata=DAHDI/1/403
level 1: start=2009-01-07 12:52:35
level 1: answer=2009-01-07 12:52:39
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354355.51




========================================================================
=======================================
=====================================From 403 calling to
201402============================================
========================================================================
=======================================
---
--- core show channels
---
Channel              Location             State   Application(Data)
SIP/402-09c633d0     (None)               Up      AppDial((Outgoing
Line))
DAHDI/32-1           402 at from-pstn-cpe:1  Up      Dial(SIP/402)
DAHDI/1-1            (None)               Up      AppDial((Outgoing
Line))
SIP/403-09c75308     201402 at from-internal Up      Dial(DAHDI/1/402)

---
--- core show channel SIP/402-09c633d0
---
 -- General --
           Name: SIP/402-09c633d0
           Type: SIP
       UniqueID: 1231354728.58
      Caller ID: 402
 Caller ID Name: (N/A)
    DNID Digits: (N/A)
          State: Up (6)
          Rings: 0
  NativeFormats: 0x8 (alaw)
    WriteFormat: 0x4 (ulaw)
     ReadFormat: 0x8 (alaw)
 WriteTranscode: Yes
  ReadTranscode: No
1st File Descriptor: 92
      Frames in: 2
     Frames out: 4708
 Time to Hangup: 0
   Elapsed Time: 0h1m34s
  Direct Bridge: DAHDI/32-1
Indirect Bridge: DAHDI/32-1
 --   PBX   --
        Context: from-internal-custom
      Extension:
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: AppDial
           Data: (Outgoing Line)
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=DAHDI/32-1
DIALEDPEERNUMBER=402
SIPCALLID=4a7375a32439b466389fb47915b893f8 at 172.16.101.36

  CDR Variables:
level 1: dst=s
level 1: dcontext=from-internal-custom
level 1: channel=SIP/402-09c633d0
level 1: start=2009-01-07 12:58:48
level 1: answer=2009-01-07 12:58:50
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354728.58

---
--- core show channel DAHDI/32-1
---
 -- General --
           Name: DAHDI/32-1
           Type: DAHDI
       UniqueID: 1231354728.57
      Caller ID: 403
 Caller ID Name: SOFT PHONE 403
    DNID Digits: 402
          State: Up (6)
          Rings: 1
  NativeFormats: 0x48 (alaw|slin)
    WriteFormat: 0x8 (alaw)
     ReadFormat: 0x4 (ulaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 41
      Frames in: 5431
     Frames out: 0
 Time to Hangup: 0
   Elapsed Time: 0h1m49s
  Direct Bridge: SIP/402-09c633d0
Indirect Bridge: SIP/402-09c633d0
 --   PBX   --
        Context: from-pstn-cpe
      Extension: 402
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: Dial
           Data: SIP/402
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=SIP/402-09c633d0
DIALEDPEERNUMBER=402
DIALEDPEERNAME=SIP/402-09c633d0
CALLEDTON=33
ANI2=0
TRANSFERCAPABILITY=SPEECH

  CDR Variables:
level 1: clid="SOFT PHONE 403" <403>
level 1: src=403
level 1: dst=402
level 1: dcontext=from-pstn-cpe
level 1: channel=DAHDI/32-1
level 1: dstchannel=SIP/402-09c633d0
level 1: lastapp=Dial
level 1: lastdata=SIP/402
level 1: start=2009-01-07 12:58:48
level 1: answer=2009-01-07 12:58:50
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354728.57

---
--- core show channel DAHDI/1-1
---
 -- General --
           Name: DAHDI/1-1
           Type: DAHDI
       UniqueID: 1231354728.56
      Caller ID: 201402
 Caller ID Name: (N/A)
    DNID Digits: (N/A)
          State: Up (6)
          Rings: 0
  NativeFormats: 0x48 (alaw|slin)
    WriteFormat: 0x8 (alaw)
     ReadFormat: 0x4 (ulaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 11
      Frames in: 6406
     Frames out: 6401
 Time to Hangup: 0
   Elapsed Time: 0h2m8s
  Direct Bridge: SIP/403-09c75308
Indirect Bridge: SIP/403-09c75308
 --   PBX   --
        Context: from-pstn-net
      Extension:
       Priority: 1
     Call Group: 0
   Pickup Group: 0
    Application: AppDial
           Data: (Outgoing Line)
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=SIP/403-09c75308
DIALEDPEERNUMBER=1/402
TRANSFERCAPABILITY=SPEECH

  CDR Variables:
level 1: dst=s
level 1: dcontext=from-pstn-net
level 1: channel=DAHDI/1-1
level 1: start=2009-01-07 12:58:48
level 1: answer=2009-01-07 12:58:50
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354728.56

---
--- core show channel SIP/403-09c75308
---
 -- General --
           Name: SIP/403-09c75308
           Type: SIP
       UniqueID: 1231354728.55
      Caller ID: 403
 Caller ID Name: SOFT PHONE 403
    DNID Digits: 201402
          State: Up (6)
          Rings: 0
  NativeFormats: 0x4 (ulaw)
    WriteFormat: 0x4 (ulaw)
     ReadFormat: 0x8 (alaw)
 WriteTranscode: No
  ReadTranscode: Yes
1st File Descriptor: 87
      Frames in: 7277
     Frames out: 7237
 Time to Hangup: 0
   Elapsed Time: 0h2m25s
  Direct Bridge: DAHDI/1-1
Indirect Bridge: DAHDI/1-1
 --   PBX   --
        Context: from-internal-custom
      Extension: 201402
       Priority: 2
     Call Group: 0
   Pickup Group: 0
    Application: Dial
           Data: DAHDI/1/402
    Blocking in: ast_waitfor_nandfds
      Variables:
BRIDGEPEER=DAHDI/1-1
DIALEDPEERNUMBER=1/402
DIALEDPEERNAME=DAHDI/1-1
SIPCALLID=YmE1MjkyZmQ0MTU5NTk0MWVjNDFkN2NjM2Q2YzZmMDM.
SIPUSERAGENT=X-Lite 4.0 release 4.0 RC4 stamp 51016
SIPDOMAIN=172.16.101.36
SIPURI=sip:403 at 172.16.97.199:25484

  CDR Variables:
level 1: clid="SOFT PHONE 403" <403>
level 1: src=403
level 1: dst=201402
level 1: dcontext=from-internal-custom
level 1: channel=SIP/403-09c75308
level 1: dstchannel=DAHDI/1-1
level 1: lastapp=Dial
level 1: lastdata=DAHDI/1/402
level 1: start=2009-01-07 12:58:48
level 1: answer=2009-01-07 12:58:50
level 1: duration=0
level 1: billsec=0
level 1: disposition=ANSWERED
level 1: amaflags=DOCUMENTATION
level 1: uniqueid=1231354728.55
-----Original Message-----
From: asterisk-video-bounces at lists.digium.com
[mailto:asterisk-video-bounces at lists.digium.com] On Behalf Of Klaus
Darilion
Sent: Jueves, 08 de Enero de 2009 01:53 p.m.
To: Development discussion of video media support in Asterisk
Subject: [Posible SPAM (Header Check)] - Re: [Asterisk-video] Problems
with a loopback scenario, initial negotiation fails. - Email found in
subject


So, if I understand it right, the PRI (E1) connection is fine as audio 
calls are working. Note: you should never have an audio problem because 
of different codecs as Asterisk should do the transcoding.

use "pri debug span 1"
and span 2
to enable q931 debuging.

You should have at least the Progress and Alerting messages.

In your loopback scenario the libpri patch is not needed as you can 
differ video from audio calls based on the extension. But if you want to

make real outgoing videocalls, you have to patch libpri to signal H324M 
to the switch of your telephony provider.

regards
klaus

Hernan Rajchert schrieb:
> Hi, I'm having problems establishing an h324m call. We don't have 
> access
> yet to an external PRI connection so we bought a Digium TE205P with 2 
> PRI and connected them with a crossed cable to make a loopback (one
acts 
> like a net and the other as a cpe).
> 
>  
> 
> My idea is to make a SIP call to asterisk, forward it with h324m_call
> through the span 1, receive it with h324m_gw from the span 2 and then 
> make a new SIP call to another phone (or use the h324m_loopback). The 
> problem is that the negotiation stays in the state SETUP and thus the 
> initial SIP phone stays in "calling". I've think the problem might be 
> either in the configuration of the PRI loopback, in my selection of 
> install steps or in the weird dialplan, so i include some of the
things 
> I've tried to see if I'm missing something.
> 
>  
> 
> Selection of install steps:
> 
> *I've decided to use Dahdi instead of Zap (haven't seen any post on 
> this
> but I don't think it should be a problem). I use the version 2.1.0.3
> 

>  
> 
> *At first I've tried with Asterisk 1.6.0.1, but there were 3 problems:
> 
>     1. I had to manually relink app_h324m.so because of Makefile
> differences with version 1.4.X
> 
>     2. Had to comment line 1560 of app_h324m.c
> "ast_cli_register(&cli_debug);" because it causes a segfault at
loading.
> 
>     3. Had to modify AMR code in several places to compile.
> 
>  
> 
> * Then I've changed to Asterisk 1.4.22 and those problems went away.
> 
>  
> 
> * I'm using latest version from svn, revision 241. Don't know how 
> stable
> this is.
> 
>  
> 
> * I'm using libpri-1.4.8 without patching with
> http://bugs.digium.com/view.php?id=10217 (I think this could be a 
> problem, but I haven't seen a tutorial that says the patch its
required)
> 
>  
> 
>  
> 
> Configuration of the PRI loopback.
> 
> I include at the bottom of the mail the configuration im currently
> using. In general all examples follow the same logic. With the prefix 
> 201 i can make a voice call through the span 1, with the prefix 301 I 
> create an h324 pseudo channel and then go through the span 1. All 
> incoming calls from the span 2 are answered with different dialplans
in 
> the context [from-pstn-cpe], some of them expect normal voice, and
other 
> expects h324m. I have two SIP phones connected to asterisk, 402 is a 
> physical and 403 is a soft phone.
> 
>  
> 
> * If from 402 I call 2011234, the loopback works and I can hear 1, 2, 
> 3, 4.
> 
>  
> 
> * If from 403 I call 201402 or if from 402 I call 201403 it works two,
> but at some point I had audio problems between in the first scenario 
> because of alaw and ulaw.
> 
>  
> 
> * From any SIP phone I call 3016XX it does not work, the SIP phone 
> stays
> on the state "calling" and from what I've seen debugging the app, both

> h324m_call and h324m_gw stays in state 1 (SETUP).
> 
>  
> 
> * Strange things I've noticed in the loopback looking at core show
> channel/s are:
> 
>     * Different law handling, I couldn't hardcore chan_dahdi.c to make
> it always ulaw.
> 
>     * TRANSFERCAPABILITY=SPEECH, I don't know exactly what this is, 
> but
> couldn't make both DIGITAL, just the receiving end.
> 
>     * Using dahdi_monitor I could dump the pri channel, but couldn't
> find any sequence i would recognize from the mailing list.
> 
>  
> 
>  
> 
> ---------------------- Configuration files---------------------
> 
> /etc/asterisk/extensions.conf
> 
>  
> 
> [from-sip]
> exten => 402,1,Dial(SIP/402)
> exten => 403,1,Dial(SIP/403)
> 
>  
> 
> ;;;;exten => _201.,1,Set(CHANNEL(transfercapability)=DIGITAL)
> ;;;;exten => _201.,n,Dial(DAHDI/1/${EXTEN:3})
> 
>  
> 
> exten => _201.,1,Dial(DAHDI/1/${EXTEN:3})
> 
>  
> 
> exten => _301.,1,h324m_call(201${EXTEN:3}@from-internal-custom)
> 
>  
> 
> [from-pstn-cpe]
> exten => 1234,1,Answer()
> exten => 1234,n,SayDigits(${EXTEN})
> 
>  
> 
> exten => 402,1,Dial(SIP/402)
> exten => 403,1,Dial(SIP/403)
> 
> exten => 666,1,Answer()
> exten => 666,n,h324m_loopback(v)
> 
> exten => 667,1,h324m_gw_answer()
> exten => 667,n,h324m_loopback()
> 
> exten => 668,1,h324m_gw_answer()
> exten => 668,n,Playback(tt-monkeys)
> 
> exten => 669,1,Set(CHANNEL(transfercapability)=DIGITAL)
> exten => 669,n,h324m_gw(migw at from-pstn-cpe 
> <mailto:migw at from-pstn-cpe>)
> 
>  
> 
> exten => 670,1,Answer()
> exten => 670,n,h324m_gw(migw at from-pstn-cpe 
> <mailto:migw at from-pstn-cpe>)
> 
>  
> 
> 
> exten => 671,1,Answer()
> exten => 671,n,h324m_gw(migw2 at from-pstn-cpe 
> <mailto:migw2 at from-pstn-cpe>)
> 
>  
> 
> exten => migw,1,h324m_gw_answer()
> exten => migw,2,Echo()
> 
>  
> 

> exten => migw2,1,h324m_gw_answer()
> exten => migw2,2,Dial(SIP/402)
> 
>  
> 
> ----------------------------------------------------------
> 
> /etc/dahdi/system.conf
> 
>  
> 
> span=1,0,0,ccs,hdb3,crc4
> # termtype: te
> bchan=1-15,17-31
> dchan=16
> mulaw=1-15
> mulaw=17-31
> echocanceller=mg2,1-15,17-31
> 
>  
> 
> # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" span=2,1,0,ccs,hdb3,crc4
> # termtype: te
> bchan=32-46,48-62
> dchan=47
> mulaw=32-46
> mulaw=48-62
> echocanceller=mg2,32-46,48-62
> 
>  
> 
> # Global data
> 
>  
> 
> loadzone        = us
> defaultzone     = us
> 
> ----------------------------------------------------------------
> 
> /etc/asterisk/chan_dahdi.conf
> 
>  
> 
> [channels]
> 
> ; Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) group=11
> context=from-pstn-net
> switchtype = euroisdn
> signalling = pri_net
> transfer=yes
> ;threewaycalling=yes
> ;cancallforward=yes
> facilityenable = yes
> channel => 1-15,17-31
> 
>  
> 
> ; Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
> group=12
> context=from-pstn-cpe
> switchtype = euroisdn
> signalling = pri_cpe
> transfer=yes
> ;threewaycalling=yes
> ;cancallforward=yes
> facilityenable = yes
> channel => 32-46,48-62
> 
> ----------------------------------------------------------------
> 
> /etc/asterisk/sip.conf
> 
>  
> 
> [general]
> 
> context=default
> 
> allowoverlap=no
> 
> bindport=5060           
> 
> bindaddr=0.0.0.0        
> 
> srvlookup=yes          
> 
>  
> 
> videosupport=yes
> 
>  
> 
> disable=all
> allow=ulaw
> allow=h263
> allow=h263p
> 
> [402]
> type=friend
> qualify=no
> port=5060
> nat=never
> host=dynamic
> dtmfmode=rfc2833
> context=from-internal-custom
> canreinvite=yes
> callerid="zultys 402" <402>
> 
>  
> 
> [403]
> type=friend
> secret=403
> qualify=no
> port=5060
> nat=never
> host=dynamic
> dtmfmode=rfc2833
> context=from-internal-custom
> canreinvite=yes
> callerid="SOFT PHONE 403" <403>
> 
>  
> 
> 
> ----------------------------------------------------------------------
> --
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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



More information about the asterisk-video mailing list