[asterisk-users] IAX trunk mixing

Tóth Csaba tsabi at tsabi.hu
Sat Dec 6 14:14:00 CST 2008


Hi List,

Help me pls, or you think this can be an asterisk bug and should i make
a bug report?

thanks,
Csaba



Tóth Csaba írta:
> hi,
> 
> i have a problem, and i am completely stuck with it, i hope someone can
> point out where is my config wrong.
> 
> I have three server, connect together with IAX trunking. The server are
> at romania (10.0.4.23, V1.4.22), hungary (10.0.1.23, V1.4.20) and serbia
> (10.0.3.4, V1.4.22). I have a hardphone (6251) connected to the romanian
> server, i dial a hungarian telephone number, the call goes to the
> hungarian server well, but that server recognise the call come from
> serbia.. and everything is mixed inside..
> 
> the phone starts at context do-phoning on the romanian server.
> i called 003620XXXXXXX from the phone, and as you see, the romanian
> server starts the call in good IAX trunk, but the hungarian server
> identifies it badly..
> 
> Here is the message on the HUNGARIAN asterisk console about it:
> 
>     -- Accepting AUTHENTICATED call from 10.0.4.23:
>        > requested format = speex,
>        > requested prefs = (gsm),
>        > actual format = gsm,
>        > host prefs = (),
>        > priority = caller
>     -- Executing [0620XXXXXXX at incoming-srb:1]
> MixMonitor("IAX2/telsrv-husrb-1541", "om_1228466966.19588_6251.wav") in
> new stack
>   == Begin MixMonitor Recording IAX2/telsrv-husrb-1541
>     -- Executing [0620XXXXXXX at incoming-srb:2]
> Macro("IAX2/telsrv-husrb-1541", "kitelco|0620XXXXXXX") in new stack
>     -- Executing [s at macro-kitelco:1] Set("IAX2/telsrv-husrb-1541",
> "telszam=0620XXXXXXX") in new stack
>     -- Executing [s at macro-kitelco:2] Dial("IAX2/telsrv-husrb-1541",
> "ZAP/g2/0620XXXXXXX") in new stack
>     -- Requested transfer capability: 0x00 - SPEECH
>     -- Called g2/0620XXXXXXX
>     -- Zap/37-1 is proceeding passing it to IAX2/telsrv-husrb-1541
> 
> 
> 
> 
> here is ROMANIAN console:
> 
> [Dec  5 08:51:34]     -- Executing [s at macro-kitelsrvhu:1]
> Set("SIP/6251-00c888c0", "telszam=0620XXXXXXX") in new stack
> [Dec  5 08:51:34]     -- Executing [s at macro-kitelsrvhu:2]
> Set("SIP/6251-00c888c0", "~~EXTEN~~=s") in new stack
> [Dec  5 08:51:34]     -- Executing [s at macro-kitelsrvhu:3]
> Dial("SIP/6251-00c888c0", "IAX2/telsrv-huro/0620XXXXXXX") in new stack
> [Dec  5 08:51:34]     -- Called telsrv-huro/0620XXXXXXX
> [Dec  5 08:51:34]     -- Call accepted by 10.0.1.23 (format gsm)
> [Dec  5 08:51:34]     -- Format for call is gsm
> [Dec  5 08:51:35]     -- IAX2/telsrv-huro-16384 is proceeding passing it
> to SIP/6251-00c888c0
> [Dec  5 08:51:35]     -- Hungup 'IAX2/telsrv-huro-16384'
> [Dec  5 08:51:35]   == Spawn extension (macro-kitelsrvhu, s, 3) exited
> non-zero on 'SIP/6251-00c888c0' in macro 'kitelsrvhu'
> [Dec  5 08:51:35]   == Spawn extension (macro-kitelsrvhu, s, 3) exited
> non-zero on 'SIP/6251-00c888c0'
> 
> 
> 
> here are the snippets of the config files:
> 
> 
> ROMANIAN server
> 
> iax.conf:
> 
> ====================================================
> [telsrv-huro]
> type=friend
> host = 10.0.1.23
> user = telsrv-huro
> secret = xxx
> bandwidth=low
> qualify=yes
> trunk=yes
> timezone=Europe/Budapest
> context=incoming-hu
> 
> [telsrv-rosrb]
> type=friend
> host = 10.0.3.4
> user = telsrv-rosrb
> secret = xxx
> bandwidth=low
> qualify=yes
> trunk=yes
> timezone=Europe/Bucharest
> context=incoming-srb
> ====================================================
> 
> extensions.ael:
> 
> ====================================================
> context do-phoning {
>  includes {
>      do-nationalcall;
>  }
> }
> 
> abstract context do-nationalcall {
>  _0036. => &kitelsrvhu(06${EXTEN:4});
>  _6[2-8]XX => &kitelsrvhu(${EXTEN});
>  _7[2-8]XX => &kitelsrvhu(${EXTEN});
> 
>  _00381. => &kitelsrvsrb(${EXTEN:4});
>  _51[567]X => &kitelsrvsrb(${EXTEN});
> }
> 
> context incoming-hu {
>  includes {
>         template-companynumbers;
>         template-spec;
>         template-helyi;
>         template-mobil;
>         template-orszagos;
>  }
> }
> 
> context incoming-srb {
>  includes {
>         template-companynumbers;
>         template-spec;
>         template-helyi;
>         template-mobil;
>         template-orszagos;
>  }
> }
> 
> macro kitelsrvhu(telszam) {
>         Dial(IAX2/telsrv-huro/${telszam});
> 
>         switch(${DIALSTATUS}) {
>         case CHANUNAVAIL:
>             Playback(/var/lib/asterisk/sounds/beeperr);
>         case CONGESTION:
>             Playback(/var/lib/asterisk/sounds/beeperr);
>         case BUSY:
>             Busy();
>             Wait(5);
>         };
>         Hangup();
> 
> }
> 
> macro kitelsrvsrb(telszam) {
>         Dial(IAX2/telsrv-srbro/${telszam});
> 
>         switch(${DIALSTATUS}) {
>         case CHANUNAVAIL:
>             Playback(/var/lib/asterisk/sounds/beeperr);
>         case CONGESTION:
>             Playback(/var/lib/asterisk/sounds/beeperr);
>         case BUSY:
>             Busy();
>             Wait(5);
>         };
>         Hangup();
> 
> }
> ====================================================
> 
> 
> 
> 
> HUNGARIAN server
> 
> iax.conf:
> 
> ====================================================
> [telsrv-huro]
> type=friend
> host = 10.0.4.23
> user = telsrv-huro
> secret = xxx
> bandwidth=low
> qualify=yes
> trunk=yes
> timezone=Europe/Bucharest
> context=incoming-ro
> 
> [telsrv-husrb]
> type=friend
> host = 10.0.3.4
> user = telsrv-husrb
> secret = xxx
> bandwidth=low
> qualify=yes
> trunk=yes
> timezone=Europe/Beograd
> context=incoming-srb
> ====================================================
> 
> extensions.ael:
> 
> ====================================================
> abstract context template-mobil {
>  _0620XXXXXXX => {
>         MixMonitor(om_${UNIQUEID}_${CALLERID(num)}.wav);
>         &kitelco(${EXTEN});
>  }
> }
> 
> macro kitelco(telszam) {
>         Dial(ZAP/g2/${telszam});
> }
> 
> context incoming-ro {
>  _X. => {
>         Play(/mnt/data/asterisk/ivr/national-welcome);
>         goto incoming-ro-route|${EXTEN}|1;
>         Busy();
>         Hangup();
>  }
>  i => {
>         Play(/mnt/data/asterisk/ivr/national-wrongnumber);
>         Busy();
>         Hangup();
>  }
> }
> 
> context incoming-ro-route {
>  includes {
>         template-companynumbers;
>         template-spec;
>         template-helyi;
>         template-mobil;
>         template-orszagos;
>  }
>  i => {
>         Play(/mnt/data/asterisk/ivr/national-wrongnumber);
>         Busy();
>         Hangup();
>  }
>  fax => goto faxfogadas|s|1;
> }
> 
> context incoming-srb {
>  includes {
>         template-companynumbers;
>         template-spec;
>         template-helyi;
>         template-mobil;
>         template-orszagos;
>  }
> }
> ====================================================
> 
> 
> 
> thanks for any help!
> Csaba Toth
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list