* You are viewing the archive for May 19th, 2012

IAX2 passing back and forth variables

Hi all,

I have two asterisk servers A and B.

And I would like from A, dial to B passing some IAX variables.

Then B handles the calls, setup some other variables that become available
to A which can continue.

So far, I have used IAXVAR function.

It works when sending call from A to B

But variables setup on B are not available on A.

Any idea how I can do it ?

Here are my dialplans.

+++++++++++

SERVER A

+++++++++++

[contextA]

exten => s,1,Set(IAXVAR(TESTVAR1)=abcd)

exten => s,n,Dial(IAX2/serverb/s,30,g)

exten => s,n,Noop( The out variable is : ${IAXVAR(TESTVAR2)} ) ; < ----
Does not work

+++++++++++

SERVER B

+++++++++++

[contextB]

exten => s,1,Noop( ${IAXVAR(TESTVAR1)} ) < ----- Does work

exten => s,n,Set(IAXVAR(TESTVAR2))

exten => s,n,Hangup

SET SIP_CODEC and Video issues

Greetings List.
I Have a small test server and i’m facing a small issue.
i have setup two SIP PEERS and they are able to do Video calls.
now I’m testing SET SIP_CODEC in a dial plan and when ever i’m setting the codec .. the inbound (=first) leg stops receiving or sending video and SIP SHOW CHANNELS shows only the Codec i set in the dialplan.
is it possible to avoid this problem?

Asterisk version
1.8.11.0

SIP.CONF
=======

[TK1000]
type=friend
secret=0jCiOdT81P
videosupport=yes
qualify=yes
host=dynamic
dtmfmode=rfc2833
context=DER-TEST
canreinvite=yes
disallow=all
allow=ulaw,alaw,gsm,h263,h263p

[TK1000]
type=friend
secret=0jCiOdT81P
videosupport=yes
qualify=yes
host=dynamic
dtmfmode=rfc2833
context=DER-TEST
canreinvite=yes
disallow=all
allow=ulaw,alaw,gsm,h263,h263p

EXTENSIONS.CONF
[DER-TEST]
;exten => _.,1,NoCDR()
exten => _.,1,Set(SIP_CODEC=alaw)
exten => _.,2,Set(SIP_CODEC_OUTBOUND=gsm)
;exten => _.,2,Set(SIP_CODEC_INBOUND=gsm)
exten => _.,n,DIAL(SIP/TK${EXTEN})
exten => h,1,Hangup()

Tarek Sawah

Information Technology Adviser

Integrated Digital Systems

CCNP, MCSE, RHCE, TELECOM

USA: +1 386 492 9993

Realtime peers and trunks coming from the same IP

I use an SBC to protect my pool of asterisk servers and as trunking
endpoint with SIP Telcos. Now I’m trying to implement SIP phone
registration to be delegated through the SBC, as a proxy.

It doesn’t work. It just works when I don’t use realtime peers at the
asterisk servers. Using realtime SIP peers, since there is one SIP phone
that gets his registration delegated through the SBC, any inbound call that
tries to reach any asterisk server, coming from any SIP Telco trunk ended
at my SBC, gets refused in asterisk. As asterisk records the IP of the SBC
as the IP of the phone that has been registered, it “thinks” that those
calls coming from the SBC are calls coming from that phone, and it refuses
them with “401 Unauthorized” replies. I’m using asterisk 1.8.11.

How can I surpass this problem? Is there any configuration that I’m lacking
on, or is this a limitation of asterisk?

Thanks,
Ricardo.

make and receive call from dial-up modem

is it possible to use data voice dial-up modem to make and receive call for ivr system..

Slow AMI Originate

Hello,

We use AMI to originate calls. Sometimes, lately every morning, the AMI Originate process operates extremely slowly. I cannot see the calls in “core show channels verbose”, I don’t know where they are, what state they are in, after 2-3 minutes the calls go through one after the other. As mentioned, it usually happens in the morning as soon as people start their workday, where there are a lot of logins and calls being made, but no where close to a peak in terms of simultaneous channels, etc. In some cases restarting asterisk, in others just taking the storm and waiting it out solves the problem. Having a hard time coming up with something to troubleshoot this. Any ideas would be appreciated.

Extensions routing

Greetings!

I’ve been playing around with “clustering” some
Asterisk servers for sake of fail-over and load balancing with DNS
round-robin, and came to one problem.

If I have, say, 2 servers, and
clients register either on 1 or 2, how can I route extensions between
them? I mean, if today user with extension 101 is registered on server1,
and tomorrow he will register with server2 – how would any of servers
know where to route it?

As some examples, if I have only 2 servers,
things are not so bad. I can use Dial(SIP/101&SIP/server2/101) on
server1 and vice versa. OR, I can check the hungup code, and if it’s 34
(or whatever I get when I try to dial unavailable peer) – try it on
another server.

But I guess things get tricky when you have 3 or more
servers, and besides maybe this solution is not the best one. Could you
share some knowledge on this, please?