{"id":576,"date":"2019-12-12T08:37:27","date_gmt":"2019-12-12T03:07:27","guid":{"rendered":"https:\/\/askadmin.com\/?p=576"},"modified":"2020-07-29T19:32:19","modified_gmt":"2020-07-29T14:02:19","slug":"sip-authentication-response-with-nonce-in-sip-header","status":"publish","type":"post","link":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/","title":{"rendered":"SIP authentication response with nonce in SIP header"},"content":{"rendered":"<p><strong>TIP OF THE DAY:<\/strong><\/p>\n<p>SIP useragent \/Registrar uses digest authentication for SIP authentication.\u00a0 To\u00a0 prevent replay attacks SIP registrar generates an arbitrary number\u00a0 NONCE ( number once) and send to sip client. SIP client uses that NONCE to hash the sip credentials\u00a0 and send to registrar.<\/p>\n<p>If you have packet capture and want to compare the\u00a0 hashed credentials in response header\u00a0 you can use this script . Change nonce ,authid,pwd,uri and realm\u00a0 values and run the script.<\/p>\n<p><strong><em>#!\/usr\/bin\/perl -w<\/em><\/strong><br \/>\n<strong><em>use Digest::MD5 qw(md5_hex);<\/em><\/strong><\/p>\n<p><strong><em>$authid = &#8216;test&#8217;;<\/em><\/strong><br \/>\n<strong><em>$pwd = &#8216;1234&#8217;;<\/em><\/strong><br \/>\n<strong><em>$realm = &#8216;asterisk&#8217;;<\/em><\/strong><br \/>\n<strong><em>$method = &#8216;REGISTER&#8217;;<\/em><\/strong><br \/>\n<strong><em>$uri = &#8216;sip:sip.test.com&#8217;;<\/em><\/strong><br \/>\n<strong><em>$nonce = &#8216;035cf70b1c4fcf4731150330410151743443&#8217;;<\/em><\/strong><\/p>\n<p><strong><em>$a1 = md5_hex(&#8220;$authid:$realm:$pwd&#8221;);<\/em><\/strong><br \/>\n<strong><em>$a2 = md5_hex(&#8220;$method:$uri&#8221;);<\/em><\/strong><br \/>\n<strong><em>print md5_hex(&#8220;$a1:$nonce:$a2&#8221;), &#8220;\\n&#8221;;<\/em><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TIP OF THE DAY: SIP useragent \/Registrar uses digest authentication for SIP authentication.\u00a0 To\u00a0 prevent replay attacks SIP registrar generates an arbitrary number\u00a0 NONCE ( number once) and send to sip client. SIP client uses that NONCE to hash the sip credentials\u00a0 and send to registrar. If you have packet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1,6],"tags":[178,177,176,175,179],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner\" \/>\n<meta property=\"og:description\" content=\"TIP OF THE DAY: SIP useragent \/Registrar uses digest authentication for SIP authentication.\u00a0 To\u00a0 prevent replay attacks SIP registrar generates an arbitrary number\u00a0 NONCE ( number once) and send to sip client. SIP client uses that NONCE to hash the sip credentials\u00a0 and send to registrar. If you have packet [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/\" \/>\n<meta property=\"og:site_name\" content=\"Ask Admin - A Lifelong Learner\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-12T03:07:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-29T14:02:19+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"balu sreekanth\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/askadmin.com\/aa\/#website\",\"url\":\"https:\/\/askadmin.com\/aa\/\",\"name\":\"Ask Admin - A Lifelong Learner\",\"description\":\"Mobile App Development | IP Telephony | Linux\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/askadmin.com\/aa\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#webpage\",\"url\":\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/\",\"name\":\"SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner\",\"isPartOf\":{\"@id\":\"https:\/\/askadmin.com\/aa\/#website\"},\"datePublished\":\"2019-12-12T03:07:27+00:00\",\"dateModified\":\"2020-07-29T14:02:19+00:00\",\"author\":{\"@id\":\"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345\"},\"breadcrumb\":{\"@id\":\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/askadmin.com\/aa\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SIP authentication response with nonce in SIP header\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345\",\"name\":\"balu sreekanth\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/askadmin.com\/aa\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g\",\"caption\":\"balu sreekanth\"},\"sameAs\":[\"http:\/\/askadmin.com\"],\"url\":\"https:\/\/askadmin.com\/aa\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/","og_locale":"en_US","og_type":"article","og_title":"SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner","og_description":"TIP OF THE DAY: SIP useragent \/Registrar uses digest authentication for SIP authentication.\u00a0 To\u00a0 prevent replay attacks SIP registrar generates an arbitrary number\u00a0 NONCE ( number once) and send to sip client. SIP client uses that NONCE to hash the sip credentials\u00a0 and send to registrar. If you have packet [&hellip;]","og_url":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/","og_site_name":"Ask Admin - A Lifelong Learner","article_published_time":"2019-12-12T03:07:27+00:00","article_modified_time":"2020-07-29T14:02:19+00:00","twitter_misc":{"Written by":"balu sreekanth","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/askadmin.com\/aa\/#website","url":"https:\/\/askadmin.com\/aa\/","name":"Ask Admin - A Lifelong Learner","description":"Mobile App Development | IP Telephony | Linux","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/askadmin.com\/aa\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#webpage","url":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/","name":"SIP authentication response with nonce in SIP header - Ask Admin - A Lifelong Learner","isPartOf":{"@id":"https:\/\/askadmin.com\/aa\/#website"},"datePublished":"2019-12-12T03:07:27+00:00","dateModified":"2020-07-29T14:02:19+00:00","author":{"@id":"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345"},"breadcrumb":{"@id":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/askadmin.com\/aa\/sip-authentication-response-with-nonce-in-sip-header\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/askadmin.com\/aa\/"},{"@type":"ListItem","position":2,"name":"SIP authentication response with nonce in SIP header"}]},{"@type":"Person","@id":"https:\/\/askadmin.com\/aa\/#\/schema\/person\/e1ff95d4a91ea001e25af3273533a345","name":"balu sreekanth","image":{"@type":"ImageObject","@id":"https:\/\/askadmin.com\/aa\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6aebf95935573dc70f536f1003a2fb8c?s=96&d=mm&r=g","caption":"balu sreekanth"},"sameAs":["http:\/\/askadmin.com"],"url":"https:\/\/askadmin.com\/aa\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/576"}],"collection":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":2,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/posts\/576\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/askadmin.com\/aa\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}