[asterisk-users] 1.4 chan_sip use internal IP for dialog-info+xml SUBSCRIBE, why?

Kristijan Vrban vrban.lkml at googlemail.com
Tue Mar 2 04:48:12 CST 2010


Asterisk 1.4.29

BLF-SUBSCRIBE go to internal IP (ngrep output):

U 2010/03/02 11:34:06.013515 212.78.xxx.xxx:2048 -> 62.134.xxx.xxx:5060
  SUBSCRIBE sip:12 at 62.134.xxx.xxx SIP/2.0..Via: SIP/2.0/UDP
212.78.xxx.xxx:2048;branch=z9hG4bK-d28tfohos0vh;rport..From:
<sip:K922002626 at 62.134.xxx.xxx>;tag=vyx8c0trgx..To:
  <sip:12 at 62.134.xxx.xxx>;tag=as13e7cb7c..Call-ID:
3c2768d8487f-rbzdwjzdbgcs..CSeq: 1163 SUBSCRIBE..Contact:
<sip:K922002626 at 192.168.55.31:2048>;reg-id=1..max-forwards: 70.
  .event: dialog..user-agent: snom320/8.2.25..expires: 60..Accept:
application/dialog-info+xml..Content-Length: 0....

U 2010/03/02 11:34:06.053870 192.168.4.109:5060 -> 192.168.55.31:2048
  SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP
212.78.xxx.xxx:2048;branch=z9hG4bK-d28tfohos0vh;rport;received=212.78.xxx.xxx..From:
<sip:K922002626 at 62.134.xxx.xxx>;tag=vyx8c0
  trgx..To: <sip:12 at 62.134.xxx.xxx>;tag=as13e7cb7c..Call-ID:
3c2768d8487f-rbzdwjzdbgcs..CSeq: 1163 SUBSCRIBE..User-Agent: asterisk
1.4.29..Allow: INVITE, ACK, CANCEL, OPTIONS,
  BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported:
replaces..WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="5a8a1268"..Content-Length: 0....



But VM-SUBSCRIBE go to external IP (ngrep output):

U 2010/03/02 11:33:46.362857 212.78.xxx.xxx:2048 -> 62.134.xxx.xxx:5060
  SUBSCRIBE sip:asterisk at 62.134.xxx.xxx SIP/2.0..Via: SIP/2.0/UDP
212.78.xxx.xxx:2048;branch=z9hG4bK-lubj3r12xmcy;rport..From:
<sip:K922002626 at 62.134.xxx.xxx>;tag=bov99lxeez
  ..To: <sip:voicemail at 62.134.xxx.xxx>;tag=as586c72f7..Call-ID:
3c2670215123-ymlw0ru3an2r..CSeq: 851 SUBSCRIBE..Contact:
<sip:K922002626 at 192.168.55.31:2048>;reg-id=1..max-f
  orwards: 70..event: message-summary..user-agent:
snom320/8.2.25..expires: 60..Accept:
application/simple-message-summary..Content-Length: 0....

U 2010/03/02 11:33:46.363003 62.134.xxx.xxx:5060 -> 212.78.xxx.xxx:2048
  SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP
212.78.xxx.xxx:2048;branch=z9hG4bK-lubj3r12xmcy;rport;received=212.78.xxx.xxx..From:
<sip:K922002626 at 62.134.xxx.xxx>;tag=bov99l
  xeez..To: <sip:voicemail at 62.134.xxx.xxx>;tag=as586c72f7..Call-ID:
3c2670215123-ymlw0ru3an2r..CSeq: 851 SUBSCRIBE..User-Agent: asterisk
1.4.29..Allow: INVITE, ACK, CANCEL, OPT
  IONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO..Supported:
replaces..WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="66b3b8ff"..Content-Length: 0....


Why? Look's like a bug for me?


sip show peer K922002626:

  * Name       : K922002626
  Realtime peer: Yes, cached
  Secret       : <Set>
  MD5Secret    : <Not set>
  Context      : K9220
  Subscr.Cont. : <Not set>
  Language     : de
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    :
  Pickupgroup  :
  Mailbox      : 30 at K9220
  VM Extension : voicemail
  LastMsgsSent : 0/0
  Call limit   : 5
  Dynamic      : Yes
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : 232
  Insecure     : no
  Nat          : No
  ACL          : No
  T38 pt UDPTL : No
  CanReinvite  : Yes
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Trust RPID   : No
  Send RPID    : No
  Subscriptions: Yes
  Overlap dial : No
  DTMFmode     : rfc2833
  LastMsg      : 0
  ToHost       :
  Addr->IP     : 212.78.xxx.xxx Port 2048
  Defaddr->IP  : 0.0.0.0 Port 2048
  Def. Username: K922002626
  SIP Options  : (none)
  Codecs       : 0x80e (gsm|ulaw|alaw|g726)
  Codec Order  : (alaw:20,ulaw:20,g726:20,gsm:20)
  Auto-Framing:  No
  Status       : OK (47 ms)
  Useragent    : snom320/8.2.25
  Reg. Contact : sip:K922002626 at 212.78.xxx.xxx:2048



More information about the asterisk-users mailing list