开发者

Asterisk: callfiles and Realtime

Since I'm using Realtime it seems that callfiles don't work properly. As a callfile is executed the phone rings as expected. But asterisk (v 1.6) hang up immediately as the call is answered.

My callfile:

Channel: SIP/1
Callerid: <123>
Context: test
Extension: 100

My Realtime-Extensions:

cont|ext|pr|App
----+---+-+---------
test|100|1|Answer
----+---+-+---------
test|100|2|SayNumber(123)

Error message on the cli:

Channel 'SIP/1-0000001' sent into invalid extension 's' in context 'default', but no invalid handler

It's wired that as I change the extension in the table above from "100" to "s" everything works fine.

Does anybody have a hint?

Update:

Unfortunately also the mv command does not solve the problem. (I also added a further line to my callfile Priority: 1.)

Here are the files:

extconfig.conf

sipusers => mysql,general,sip_users
sippeers => mysql,general,sip_users
extensions => mysql,general,extensions 
开发者_JAVA技巧

sip.conf

[general]
language=en
bindport=5060
context=default
canreinvite=no
tos=throughput
nat=yes


Well, I'm not familiar with Realtime, but a posting of the generated sip.conf and extensions.conf would be helpful (at least the relevant sections).

My first instinct though is that you're using cp to copy the call files for asterisk, which is not an atomic operation (files are copied line by line), which can lead to asterisk executing a not-quite-complete call file.

Use the mv command, which is an atomic operation, and will ensure that asterisk is operating on a 100% complete call file.

The reason I suspect this is the issue is that your call file is correct, but if it starts executing with only 2 lines, by default any incoming call will go to the 's' extension of the default context, and if it reads to the third line, it will go to the 's' extension of your test context.

Weird error to be sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜