Guest User

Untitled

a guest
Mar 12th, 2018
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.50 KB | None | 0 0
  1. ## Main Server (pjsip.conf)
  2.  
  3. [hh-astrelay]
  4. type = auth
  5. auth_type = userpass
  6. username = hh-astrelay
  7. password = testpass
  8.  
  9. [hh-astrelay]
  10. type = endpoint
  11. auth = hh-astrelay
  12. aors = hh-astrelay
  13. transport = transport_udp_nat
  14. context = hjuhsd_pbxin
  15. disallow = all
  16. allow = ulaw,alaw
  17.  
  18. [hh-astrelay]
  19. type = aor
  20. max_contacts = 1
  21.  
  22. ###### Remote Server (sip.conf)
  23. [general]
  24. context=unauthenticated
  25. bindport=5060
  26. allowguest=no ; Allow or reject guest calls (default is yes)
  27. allowoverlap=no ; Disable overlap dialing support. (Default is yes)
  28. transport=udp
  29. udpbindaddr=0.0.0.0
  30. tcpenable=no
  31. srvlookup=yes
  32. language=en
  33. trustrpid=yes
  34. sendrpid=yes
  35. disallow=all
  36. ;allow=g722
  37. allow=ulaw
  38. allow=alaw
  39. callcounter=yes
  40. localnet=172.16.0.0/12
  41.  
  42. register => hh-astrelay:testpass@172.20.62.36/net-voip1
  43.  
  44. [net-voip1]
  45. type=friend
  46. secret=testpass
  47. host=172.20.62.36
  48. context=net-voip1
  49. disallow=all
  50. allow=ulaw
  51.  
  52. ## remote server shows it is registered
  53. hh-astrelay*CLI> sip show peers
  54. Name/username Host Dyn Forcerport Comedia ACL Port Status Description
  55. net-voip1 172.20.62.36 Auto (No) No 5060 Unmonitored
  56. 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]
  57.  
  58. ## main server shows remote registration
  59. net-voip1*CLI> pjsip show endpoint hh-astrelay
  60.  
  61. Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.>
  62. I/OAuth: <AuthId/UserName...........................................................>
  63. Aor: <Aor............................................> <MaxContact>
  64. Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  65. Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................>
  66. Identify: <Identify/Endpoint.........................................................>
  67. Match: <criteria.........................>
  68. Channel: <ChannelId......................................> <State.....> <Time.....>
  69. Exten: <DialedExten...........> CLCID: <ConnectedLineCID.......>
  70. ==========================================================================================
  71.  
  72. Endpoint: hh-astrelay Not in use 0 of inf
  73. InAuth: hh-astrelay/hh-astrelay
  74. Aor: hh-astrelay 1
  75. Contact: hh-astrelay/sip:net-voip1@172.22.4.250:506 622d57bb9e Unknown nan
  76. Transport: transport_udp_nat udp 0 0 0.0.0.0:5060
  77.  
  78.  
  79. ParameterName : ParameterValue
  80. =========================================================
  81. 100rel : yes
  82. accountcode :
  83. acl :
  84. aggregate_mwi : true
  85. allow : (ulaw|alaw)
  86. allow_overlap : true
  87. allow_subscribe : true
  88. allow_transfer : true
  89. aors : hh-astrelay
  90. asymmetric_rtp_codec : false
  91. auth : hh-astrelay
  92. bind_rtp_to_media_address : false
  93. bundle : false
  94. call_group :
  95. callerid : <unknown>
  96. callerid_privacy : allowed_not_screened
  97. callerid_tag :
  98. connected_line_method : invite
  99. contact_acl :
  100. context : hjuhsd_pbxin
  101. cos_audio : 0
  102. cos_video : 0
  103. device_state_busy_at : 0
  104. direct_media : true
  105. direct_media_glare_mitigation : none
  106. direct_media_method : invite
  107. disable_direct_media_on_nat : false
  108. dtls_ca_file :
  109. dtls_ca_path :
  110. dtls_cert_file :
  111. dtls_cipher :
  112. dtls_fingerprint : SHA-256
  113. dtls_private_key :
  114. dtls_rekey : 0
  115. dtls_setup : active
  116. dtls_verify : No
  117. dtmf_mode : rfc4733
  118. fax_detect : false
  119. fax_detect_timeout : 0
  120. force_avp : false
  121. force_rport : true
  122. from_domain :
  123. from_user :
  124. g726_non_standard : false
  125. ice_support : false
  126. identify_by : username
  127. inband_progress : false
  128. incoming_mwi_mailbox :
  129. language :
  130. mailboxes :
  131. max_audio_streams : 1
  132. max_video_streams : 1
  133. media_address :
  134. media_encryption : no
  135. media_encryption_optimistic : false
  136. media_use_received_transport : false
  137. message_context :
  138. moh_passthrough : false
  139. moh_suggest : default
  140. mwi_from_user :
  141. mwi_subscribe_replaces_unsolicited : false
  142. named_call_group :
  143. named_pickup_group :
  144. notify_early_inuse_ringing : false
  145. one_touch_recording : false
  146. outbound_auth :
  147. outbound_proxy :
  148. pickup_group :
  149. preferred_codec_only : false
  150. record_off_feature : automixmon
  151. record_on_feature : automixmon
  152. refer_blind_progress : true
  153. rewrite_contact : false
  154. rpid_immediate : false
  155. rtcp_mux : false
  156. rtp_engine : asterisk
  157. rtp_ipv6 : false
  158. rtp_keepalive : 0
  159. rtp_symmetric : false
  160. rtp_timeout : 0
  161. rtp_timeout_hold : 0
  162. sdp_owner : -
  163. sdp_session : Asterisk
  164. send_diversion : true
  165. send_pai : false
  166. send_rpid : false
  167. set_var :
  168. srtp_tag_32 : false
  169. sub_min_expiry : 0
  170. subscribe_context :
  171. t38_udptl : false
  172. t38_udptl_ec : none
  173. t38_udptl_ipv6 : false
  174. t38_udptl_maxdatagram : 0
  175. t38_udptl_nat : false
  176. timers : yes
  177. timers_min_se : 90
  178. timers_sess_expires : 1800
  179. tone_zone :
  180. tos_audio : 0
  181. tos_video : 0
  182. transport : transport_udp_nat
  183. trust_id_inbound : false
  184. trust_id_outbound : false
  185. use_avpf : false
  186. use_ptime : false
  187. user_eq_phone : false
  188. voicemail_extension :
  189. webrtc : no
  190.  
  191. net-voip1*CLI> pjsip show aor hh-astrelay
  192.  
  193. Aor: <Aor..............................................> <MaxContact>
  194. Contact: <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
  195. ==========================================================================================
  196.  
  197. Aor: hh-astrelay 1
  198. Contact: hh-astrelay/sip:net-voip1@172.22.4.250:5060 622d57bb9e Unknown nan
  199.  
  200.  
  201. ParameterName : ParameterValue
  202. ======================================================
  203. authenticate_qualify : false
  204. contact : sip:net-voip1@172.22.4.250:5060
  205. default_expiration : 3600
  206. mailboxes :
  207. max_contacts : 1
  208. maximum_expiration : 7200
  209. minimum_expiration : 60
  210. outbound_proxy :
  211. qualify_frequency : 0
  212. qualify_timeout : 3.000000
  213. remove_existing : false
  214. support_path : false
  215. voicemail_extension :
  216.  
  217. ### Dialing the remote from main server gives this error in console log
  218. -- Called PJSIP/22@hh-astrelay
  219. [Mar 1 22:31:15] WARNING[10551]: res_pjsip_outbound_authenticator_digest.c:178 digest_create_request_with_auth: Endpoint: 'hh-astrelay': Unable to create request with auth. No auth credentials for realm(s) 'asterisk' in challenge.
Add Comment
Please, Sign In to add comment