[Asterisk-video] Problems with a loopback scenario, initial negotiation fails.

Klaus Darilion klaus.mailinglists at pernau.at
Thu Jan 8 09:52:35 CST 2009


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



More information about the asterisk-video mailing list