From d25e39edf5315e37cf8b955c70161ac0fbd6f374 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Fri, 10 Jul 2020 14:03:28 -0400 Subject: [PATCH] Use remote_addr and tag --- lib/sippy_cup/scenario.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/sippy_cup/scenario.rb b/lib/sippy_cup/scenario.rb index e26a169..82863f5 100644 --- a/lib/sippy_cup/scenario.rb +++ b/lib/sippy_cup/scenario.rb @@ -510,9 +510,9 @@ def receive_answer(opts = { compact_header: false }) receive_200(options.merge(opts)) do |recv| recv << doc.create_element('action') do |action| action << doc.create_element('ereg') do |ereg| - ereg['regexp'] = '.*;tag=([^;]*)' + ereg['regexp'] = '.*.*;tag=([^;]*)' ereg['search_in'] = 'hdr' - ereg['header'] = opts[:compact_header] ? 't:' : 'To:' + ereg['header'] = opts[:compact_header] ? 'f:' : 'From:' ereg['assign_to'] = 'dummy,remote_addr,remote_tag' end end @@ -798,7 +798,7 @@ def send_bye(opts = {}) BYE [next_url] SIP/2.0 Via: SIP/2.0/[transport] #{@adv_ip}:[local_port];rport;branch=[branch] [routes] -To: "#{@from_user}" [peer_tag_param] +To: "#{@from_user}" ;tag=[$remote_tag] From: "#{@to_user}" ;tag=[call_number] [last_Call-ID:] CSeq: [cseq] BYE @@ -821,8 +821,8 @@ def send_bye_using_contact(opts = {}) BYE [next_url] SIP/2.0 Via: SIP/2.0/[transport] #{@adv_ip}:[local_port];rport;branch=[branch] [routes] -To: "#{@from_user}" [from_tag_param] -From: "#{@to_user}" [to_tag_param] +To: "#{@from_user}" ;tag=[$remote_tag] +From: "#{@to_user}" ;tag=[call_number] [last_Call-ID:] Contact: Max-Forwards: 100