[Asterisk] Auto fallthrough, “channel sip/xxxxxxxxx” status is ‘UNKNOWN’

Asterisk 연동 테스트를 진행 중, 다음의 에러가 발생했다.

[2014-06-11 09:59:30.319]     -- Executing [s@SetCalledIDNum:15] Set("SIP/200-ipvstk-softphone-1-000000f7", "ChannelB=") in new stack
[2014-06-11 09:59:30.319]     -- Executing [s@SetCalledIDNum:16] Return("SIP/200-ipvstk-softphone-1-000000f7", "") in new stack
[2014-06-11 09:59:30.320]     -- Executing [s@app_dial_gosub_virtual_context:1] NoOp("SIP/200-ipvstk-softphone-1-000000f7", "") in new stack
[2014-06-11 09:59:30.320]     -- Auto fallthrough, channel 'SIP/200-ipvstk-softphone-1-000000f7' status is 'UNKNOWN'
[2014-06-11 09:59:30.322]     -- Local/200-ipvstk-softphone-1@DialLine-5336;1 answered Local/200@DialAccount-d00c;2
[2014-06-11 09:59:30.328] WARNING[11975]: res_rtp_asterisk.c:2142 ast_rtp_read: RTP Read too short
[2014-06-11 09:59:30.328]     -- Local/200@DialAccount-d00c;1 answered Local/200@DuetNumber-ee9e;2
[2014-06-11 09:59:30.330]     -- Local/200@DuetNumber-ee9e;1 answered SIP/voicemail01-000000f6
[2014-06-11 09:59:40.670]   == Spawn extension (VoiceMailMain, s, 14) exited non-zero on 'SIP/201-ipvstk-softphone-2-000000f4'

Asterisk 서버로 Make Call 을 시도하여 이미 연결되어 있는 기존의 콜과 새로 생성한 콜을 서로 Bridge 시키는 간단한 연동작업이었는데… Make call 시도시, 위의 에러가 발생한 것이다.
문제의 라인은

[2014-06-11 09:59:30.320]     -- Auto fallthrough, channel 'SIP/200-ipvstk-softphone-1-000000f7' status is 'UNKNOWN'

부분으로, Status 를 확인할 수 없다는 내용이다.
이후, 새로 생성한 콜과  기존의 콜은 Bridge 가 정상적으로 되는 것 처럼 보이나, 10 초 뒤, 갑자기 콜이 Hangup 되는 현상이 발생한다.

구글 검색 후, Auto fallthrough 는 더이상 해당 Extension 에 대한 Dailplan 이 없을 때, 자동으로 실행되는 Context 라는 것을 확인했다.

 

참조: http://forums.whirlpool.net.au/archive/885099

[Freeswitch] python-originate

Freeswitch 에서 python 으로 dialplan 작성시,.. originate 를 해야 하는 경우.

from freeswitch import *

new_session = Session(sofia/profile_name/call_to@host_ip)

만약 콜 생성을 하면서 (INVITE) 시, 특정 옵션 값들을 입력하고 싶다면..

{sip_h_TestOpt=test}sofia/internal/200@pchero21.com

과 같이 sofia 앞부분에 “{}” 를 넣어서 입력하고자 하는 값들을 입력하면 된다.

 

출처 : http://lists.freeswitch.org/pipermail/freeswitch-users/2011-March/070126.html

[Freeswitch] Originate

새로운 콜을 생성할 때 사용하는 모듈이다.

기본 메뉴얼. https://wiki.freeswitch.org/wiki/Mod_commands#originate

freeswitch@internal> originate
-USAGE: <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]

Parameters:

<call_url> : 전화를 걸고자 하는 URL 을 입력한다. PBX 서버의 IP 주소 혹은 Freeswitch 내부에 설정된 설정값의 항목을 입력한다.

목적지 주소(즉 전화를 걸고자하는 번호)는 다음 중 하나가 되어야 한다 :

<exten> Dailplan 에 입력된 Extension 번호.

&<application_name>(<app_args>) :

“&” 은 다음에 뒤따라 오는 값이 Application 속성인지/Exten 속성인지를 결정한다. 즉, “&” 가 없으면 Extension, 있으면 Application 으로 인식한다.

(<app_args>) 은 옵션이며 Application 에서 요구하는 항목에 따라 달라진다. 예를 들어 Park() Application 의 경우, 별도의 인자값을 요구하지 않는다.

사용가능한 Application 리스트: park, bridge, javascript/lua/perl, playback (remove mod_native_file), and many others.

Note: Use single quotes to pass arguments with spaces, e.g. ‘&lua(test.lua arg1 arg2)’

Note: There is no space between & and the application name

<dialplan> : 사용하고하는 Dailplan. 비어있을 경우, 기본값으로 ‘XML’를 사용한다.

<context> : 사용하고자 하는 Context. 비어있을 경우, 기본값으로 ‘default’를 사용한다.

<cid_name> : CallerID name

<cid_num> : CallerID number

<timeout_sec> : Timeout in seconds

 

Options:

이 Option 설정들은 ‘{ }’로 싸여져서 사용된다.
ex. “originate {ignore_early_media=true}sofia/example/user 8334”

또한, Option 설정들은 반드시 ‘,’ 로 구분되어야 한다.
ex. “originate {ignore_early_meida=true,originate_timeout=2}sofia/example/user 8334”

group_confirm_key

group_confirm_file

forked_dial

fail_on_single_reject

ignore_early_media

return_ring_ready

originate_retries

originate_retry_sleep_ms

originate_caller_id_name

originate_caller_id_number

originate_timeout

sip_auto_answer

[Asterisk] Section ‘test-01’ lacks type

Asterisk sip reload 중… 다음과 같은 오류가 나타났다.

[Jun  2 04:45:56] WARNING[19371]: chan_sip.c:28964 reload_config: Section ‘test-01’ lacks type
[Jun  2 04:45:56] WARNING[19371]: chan_sip.c:28964 reload_config: Section ‘test-02’ lacks type

Asterisk SIP 설정 중, type 설정이 빠져있어서 발생하는 오류였다.

type=friend

추가 후, 해결!

HA Configuration…

Heartbeat 를 이용한 HA 구성을 테스트하는 중이다.

예제는 간단하게 Apache.

 

어찌저찌… Active-Standby 설정으로 구성을 하긴했는데 내가 원하는 모습이 나오질 않는다.

 

서비스의 개념으로 한쪽의 Apache 가 내려가면 다른 한쪽의 Apache 가 올라오길 원했는데 안된다.

정상적으로 작동할 때는 Heartbeat 가 내려가거나, 서버가 내려갔을 경우에 작동했다.

 

흠… 계속 고민중인데 진척이 없다.