[asterisk-bugs] [JIRA] (ASTERISK-24221) SRV lookup is not performed when using a realtime peer

Leandro Dardini (JIRA) noreply at issues.asterisk.org
Wed Aug 13 10:21:31 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=221641#comment-221641 ] 

Leandro Dardini commented on ASTERISK-24221:
--------------------------------------------

Thank you for checking this issue. I take the time to upgrade to latest version and rerun all the tests:

I setup an extension, 103-DEVEL to dial 98100 and have that number to be routed to "voxout" Realtime SIP Peer. This is the result:

In the asterisk console I find:

    -- Executing [_X. at dialoutbound:167] Dial("SIP/103-DEVEL-0000014b", "SIP/98100 at voxout,30,TtX") in new stack
[2014-08-13 17:09:14] ERROR[11368][C-00000149]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("voxout.voxbone.com", "(null)", ...): Name or service not known
[2014-08-13 17:09:14] WARNING[11368][C-00000149]: acl.c:800 resolve_first: Unable to lookup 'voxout.voxbone.com'
[2014-08-13 17:09:14] WARNING[11368][C-00000149]: app_dial.c:2421 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
  == Everyone is busy/congested at this time (1:0/0/1)

Debug shows the following info:

[2014-08-13 17:09:14] DEBUG[11368][C-00000149] pbx.c: Launching 'Dial'
[2014-08-13 17:09:14] VERBOSE[11368][C-00000149] pbx.c:     -- Executing [_X. at dialoutbound:167] Dial("SIP/103-DEVEL-0000014b", "SIP/98100 at voxout,30,TtX") in new stack
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Asked to create a SIP channel with formats: (alaw)
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Allocating new SIP dialog for 24707bbf710f66b73367f9a274c9da99 at 213.133.102.85:5060 - INVITE (No RTP)
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM sipfriends WHERE name = ? AND host = ?
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Parameter 1 ('name') = 'voxout'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Parameter 2 ('host') = 'dynamic'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_odbc.c: odbc_release_obj2(0x2d7c308) called (obj->txf = (nil))
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM sipfriends WHERE name = ? AND host = ?
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Parameter 1 ('name') = 'voxout'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Parameter 2 ('host') = 'dynamic'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_odbc.c: odbc_release_obj2(0x2dabb38) called (obj->txf = (nil))
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM sipfriends WHERE name = ?
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_config_odbc.c: Parameter 1 ('name') = 'voxout'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] res_odbc.c: odbc_release_obj2(0x2d7c308) called (obj->txf = (nil))
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] netsock2.c: Splitting 'voxout.voxbone.com' into...
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] netsock2.c: ...host 'voxout.voxbone.com' and port ''.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] dnsmgr.c: doing dnsmgr_lookup for 'voxout.voxbone.com'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] netsock2.c: Splitting 'voxout.voxbone.com' into...
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] netsock2.c: ...host 'voxout.voxbone.com' and port ''.
[2014-08-13 17:09:14] ERROR[11368][C-00000149] netsock2.c: getaddrinfo("voxout.voxbone.com", "(null)", ...): Name or service not known
[2014-08-13 17:09:14] WARNING[11368][C-00000149] acl.c: Unable to lookup 'voxout.voxbone.com'
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Not an IPv4 nor IPv6 address, cannot set port.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Not an IPv4 nor IPv6 address, cannot get port.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Not an IPv4 nor IPv6 address, cannot set port.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Not an IPv4 nor IPv6 address, cannot get port.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Not an IPv4 nor IPv6 address, cannot set port.
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: -REALTIME- loading peer from database to memory. Name: voxout. Peer objects: 0
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Cant create SIP call - target device not registered
[2014-08-13 17:09:14] DEBUG[11368][C-00000149] chan_sip.c: Destroying SIP dialog 24707bbf710f66b73367f9a274c9da99 at 213.133.102.85:5060
[2014-08-13 17:09:14] WARNING[11368][C-00000149] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
[2014-08-13 17:09:14] VERBOSE[11368][C-00000149] app_dial.c:   == Everyone is busy/congested at this time (1:0/0/1)

Output for "sip show settings" is attached.

The sipfriend table has been populated with the following query (there are some extra fields)

INSERT INTO `sipfriends` (`id`, `te_id`, `name`, `ipaddr`, `port`, `regseconds`, `defaultuser`, `fullcontact`, `regserver`, `useragent`, `lastms`, `host`, `type`, `context`, `deny`, `permit`, `secret`, `md5secret`, `remotesecret`, `transport`, `dtmfmode`, `directmedia`, `nat`, `canreinvite`, `callgroup`, `pickupgroup`, `language`, `disallow`, `allow`, `insecure`, `trustrpid`, `progressinband`, `promiscredir`, `useclientcode`, `accountcode`, `setvar`, `callerid`, `amaflags`, `callcounter`, `busylevel`, `allowoverlap`, `allowsubscribe`, `videosupport`, `maxcallbitrate`, `rfc2833compensate`, `mailbox`, `session-timers`, `session-expires`, `session-minse`, `session-refresher`, `t38pt_usertpsource`, `regexten`, `fromdomain`, `fromuser`, `qualify`, `defaultip`, `rtptimeout`, `rtpholdtimeout`, `sendrpid`, `outboundproxy`, `callbackextension`, `registertrying`, `timert1`, `timerb`, `qualifyfreq`, `constantssrc`, `contactpermit`, `contactdeny`, `usereqphone`, `textsupport`, `faxdetect`, `buggymwi`, `auth`, `fullname`, `trunkname`, `cid_number`, `callingpres`, `mohinterpret`, `mohsuggest`, `parkinglot`, `hasvoicemail`, `subscribemwi`, `vmexten`, `autoframing`, `rtpkeepalive`, `call-limit`, `g726nonstandard`, `ignoresdpversion`, `allowtransfer`, `dynamic`, `encryption`, `notifyringing`) VALUES
(1046, 0, 'voxout', NULL, 5060, NULL, 'pippo', NULL, NULL, NULL, NULL, 'voxout.voxbone.com', NULL, 'fromoutside', '', NULL, 'pluto', NULL, NULL, 'UDP', 'auto', NULL, 'no', '', NULL, NULL, NULL, 'all', 'alaw;ulaw;gsm', 'port,invite', 'yes', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '', NULL, NULL, NULL, NULL, 'yes', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, 'yes');

If I check the DNS traffic while dialing, only a A search is performed:

17:19:49.778464 IP 213.133.102.85.51728 > 213.133.100.100.domain: 2677+ A? voxout.voxbone.com. (36)
        0x0000:  4500 0040 3688 4000 4011 8e60 d585 6655  E.. at 6.@. at ..`..fU
        0x0010:  d585 6464 ca10 0035 002c c6f4 0a75 0100  ..dd...5.,...u..
        0x0020:  0001 0000 0000 0000 0676 6f78 6f75 7407  .........voxout.
        0x0030:  766f 7862 6f6e 6503 636f 6d00 0001 0001  voxbone.com.....
17:19:49.781411 IP 213.133.100.100.domain > 213.133.102.85.51728: 2677 0/1/0 (97)
        0x0000:  4500 007d 1e20 0000 3b11 eb8b d585 6464  E..}....;.....dd
        0x0010:  d585 6655 0035 ca10 0069 50e6 0a75 8180  ..fU.5...iP..u..
        0x0020:  0001 0000 0001 0000 0676 6f78 6f75 7407  .........voxout.
        0x0030:  766f 7862 6f6e 6503 636f 6d00 0001 0001  voxbone.com.....
        0x0040:  c013 0006 0001 0000 0a43 0031 036e 7330  .........C.1.ns0
        0x0050:  0b64 6e73 6d61 6465 6561 7379 c01b 0866  .dnsmadeeasy...f
        0x0060:  7261 6e63 6f69 73c0 1377 914a 6b00 00a8  rancois..w.Jk...
        0x0070:  c000 000e 1000 1275 0000 000e 10         .......u.....
17:19:49.781510 IP 213.133.102.85.32894 > 213.133.100.100.domain: 7987+ A? voxout.voxbone.com. (36)
        0x0000:  4500 0040 368b 4000 4011 8e5d d585 6655  E.. at 6.@. at ..]..fU
        0x0010:  d585 6464 807e 0035 002c fbc8 1f33 0100  ..dd.~.5.,...3..
        0x0020:  0001 0000 0000 0000 0676 6f78 6f75 7407  .........voxout.
        0x0030:  766f 7862 6f6e 6503 636f 6d00 0001 0001  voxbone.com.....
17:19:49.784439 IP 213.133.100.100.domain > 213.133.102.85.32894: 7987 0/1/0 (97)
        0x0000:  4500 007d 1e21 0000 3b11 eb8a d585 6464  E..}.!..;.....dd
        0x0010:  d585 6655 0035 807e 0069 85ba 1f33 8180  ..fU.5.~.i...3..
        0x0020:  0001 0000 0001 0000 0676 6f78 6f75 7407  .........voxout.
        0x0030:  766f 7862 6f6e 6503 636f 6d00 0001 0001  voxbone.com.....
        0x0040:  c013 0006 0001 0000 0a43 0031 036e 7330  .........C.1.ns0
        0x0050:  0b64 6e73 6d61 6465 6561 7379 c01b 0866  .dnsmadeeasy...f
        0x0060:  7261 6e63 6f69 73c0 1377 914a 6b00 00a8  rancois..w.Jk...
        0x0070:  c000 000e 1000 1275 0000 000e 10         .......u.....

If I check for DNS SRV record for voxout, I find the correct info:

[root at srv01 asterisk-12.4.0]# host -t SRV _sip._udp.voxout.voxbone.com
_sip._udp.voxout.voxbone.com has SRV record 1 10 5060 be.voxout.voxbone.com.
_sip._udp.voxout.voxbone.com has SRV record 1 10 5060 de.voxout.voxbone.com.


> SRV lookup is not performed when using a realtime peer
> ------------------------------------------------------
>
>                 Key: ASTERISK-24221
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24221
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 12.2.0
>            Reporter: Leandro Dardini
>            Assignee: Leandro Dardini
>            Severity: Minor
>
> When dialing a trunk defined as realtime, (using odbc connector), the host is not resolved using SRV, but just queried for the A record, despite having srvlookup set to yes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list