0

これは私のsip.confです

; inbound configuration

[nexmo-sip]
fromdomain=sip.nexmo.com
type=friend
context=nexmo
insecure=port,invite
nat=no
;Add your codec list here.
; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
allow=ulaw
allow=alaw
allow=G729
dtmfmode=rfc2833

[nexmo-sip-01](nexmo-sip)
host=173.193.199.24

[nexmo-sip-02](nexmo-sip)
host=174.37.245.34

[nexmo-sip-03](nexmo-sip)
host=5.10.112.121

[nexmo-sip-04](nexmo-sip)
host=5.10.112.122

[nexmo-sip-05](nexmo-sip)
host=119.81.44.6

[nexmo-sip-06](nexmo-sip)
host=119.81.44.7

;outbound configuration

[general]
register => <api-key>:<api-secret>@sip.nexmo.com
registerattempts=0
srvlookup=yes  
context=nexmo-sip1

[nexmo]
username=<api-key>
host=sip.nexmo.com
defaultuser=<api-key>
fromuser=<myNumber123>  
fromdomain=sip.nexmo.com
secret=<api-secret>
type=friend
context=nexmo-sip1
insecure=very
qualify=yes
nat=no
;Add your codec list here.
; Note: Use "ulaw" for US only, "alaw" for the rest of the world.
allow=ulaw
allow=alaw
allow=G729
dtmfmode=rfc2833

[<myNumber123>]   ; this number is at soft phone client
type=friend
context=nexmo-sip1
host=dynamic
secret=<myNumber123>
qualify=yes

[<mynumber123456>]  ; this is my mobile number
type=friend
context=nexmo-sip1
host=dynamic
secret=<secretkey>
qualify=yes

これは extensions.conf です

[general]
live_dangerously=yes
[globals]

[nexmo-sip1]

exten => _X.,1,Dial(SIP/${EXTEN}@nexmo)

[default]
exten => s,1,gosub(nexmo-sip1,${EXTEN},1)

設定 1:上記が extensions.conf の設定である場合、ソフト クライアントから発信呼び出しを行うことはできますが、そのソフト クライアントへの着信呼び出しを取得することはできません。

設定 2: extensions.conf の設定を次のように変更すると、softclient での着信は可能ですが、発信はできません。

[general]
live_dangerously=yes
[globals]

[nexmo-sip1]

exten => _X.,1,Dial(SIP/${EXTEN},30)

[default]
exten => s,1,gosub(nexmo-sip1,${EXTEN},1)

質問 1) 発信と着信の両方を受信するには、何を変更すればよいですか?

質問 2: extensions.conf を設定 1 のように設定すると、相手側の会話は聞こえませんが、設定 2 のように extensions.conf を設定すると、両方の会話が聞こえます。そして、これは私が聞いていないときに私が見るログです

[7 月 1 日 22:50:38] 警告 [11299]: chan_sip.c:4175 retrans_pkt: 送信 tvK9cRGNN で再送信タイムアウトに達しました - seqno 21 (クリティカル レスポンス) について - https://wiki.asterisk.org/wiki/を参照してくださいdisplay/AST/SIP+Retransmissions Packet timed out after 8383ms with no response [Jul 1 22:50:38] WARNING[11299]: chan_sip.c:4204 retrans_pkt: Hanging up call tvK9cRGNN- - 重要なパケットへの応答なし ( https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions )。

insecure=very などの間違った設定がたくさんあることは理解していますが、今はこのプロトタイプをうまく動作させたいと思っています。

4

1 に答える 1

0

インバウンドとアウトバウンドの通話を機能させるには、インバウンドとアウトバウンドの 2 つの別個のコンテキストが必要です。

extensions.conf のように設定を変更してみてください:

[general]

[globals]

[nexmo-sip2]
exten => _X.,1,Dial(SIP/${EXTEN}@nexmo)

[nexmo-sip1]
exten => _X.,1,Dial(SIP/${EXTEN},30)

sip.conf には、持っているものをすべて残してください。ここに貼り付けた行を更新するだけです。

[<myNumber123>]   ; this number is at soft phone client
type=friend
context=nexmo-sip2
host=dynamic
secret=<myNumber123>
qualify=yes

[<mynumber123456>]  ; this is my mobile number
type=friend
context=nexmo-sip2
host=dynamic
secret=<secretkey>
qualify=yes

ご覧のとおり、SIP 内線番号からの呼び出し (nexmo-sip2) と sip プロバイダーからの呼び出し (nexmo-sip1) には、2 つの別個のコンテキストが必要です。

于 2016-07-04T06:34:02.543 に答える