Skip to content

Commit

Permalink
Use remote_addr and tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Karn Saheb committed Jul 10, 2020
1 parent 1f21579 commit d25e39e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/sippy_cup/scenario.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '<sip:(.*)>.*;tag=([^;]*)'
ereg['regexp'] = '.*<sip:(.*)>.*;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
Expand Down Expand Up @@ -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}" <sip:#{@from_user}@[remote_ip]:[remote_port]>[peer_tag_param]
To: "#{@from_user}" <sip:[$remote_addr]>;tag=[$remote_tag]
From: "#{@to_user}" <sip:#{@to_user}@stage.tncp.textnow.com>;tag=[call_number]
[last_Call-ID:]
CSeq: [cseq] BYE
Expand All @@ -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}" <sip:#{@from_user}@[remote_ip]:[remote_port]>[from_tag_param]
From: "#{@to_user}" <sip:#{@to_user}@stage.tncp.textnow.com>[to_tag_param]
To: "#{@from_user}" <sip:[$remote_addr]>;tag=[$remote_tag]
From: "#{@to_user}" <sip:#{@to_user}@stage.tncp.textnow.com>;tag=[call_number]
[last_Call-ID:]
Contact: <sip:#{@adv_ip};transport=[transport]>
Max-Forwards: 100
Expand Down

0 comments on commit d25e39e

Please sign in to comment.