Skip to content

Commit

Permalink
Merge pull request #14 from sfgeorge/feature/various-tweaks
Browse files Browse the repository at this point in the history
Various tweaks
  • Loading branch information
bklang committed Sep 4, 2013
2 parents 1a9ba8e + e6d82c5 commit 17fbc65
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/sippy_cup/scenario.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def invite(opts = {})
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:#{@from_user}@[local_ip]>;tag=[call_number]
From: "#{@from_user}" <sip:#{@from_user}@[local_ip]>;tag=[call_number]
To: <sip:[service]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: [cseq] INVITE
Expand Down Expand Up @@ -177,15 +177,15 @@ def ack_answer(opts = {})
ACK [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:#{@from_user}@[local_ip]>;tag=[call_number]
From: "#{@from_user}" <sip:#{@from_user}@[local_ip]>;tag=[call_number]
[last_To:]
[routes]
Call-ID: [call_id]
CSeq: [cseq] ACK
Contact: <sip:#{@from_user}@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 100
User-Agent: #{USER_AGENT}
Content-Length: 0
[routes]
ACK
@scenario << new_send(msg, opts)
start_media
Expand Down Expand Up @@ -218,16 +218,17 @@ def send_digits(digits, delay = 0.250)
def send_bye(opts = {})
msg = <<-MSG
BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
BYE [next_url] SIP/2.0
[last_Via:]
[last_From:]
From: "#{@from_user}" <sip:#{@from_user}@[local_ip]>;tag=[call_number]
[last_To:]
[last_Call-ID]
CSeq: [cseq] BYE
Contact: <sip:#{@from_user}@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 100
User-Agent: #{USER_AGENT}
Content-Length: 0
[routes]
MSG
@scenario << new_send(msg, opts)
end
Expand All @@ -252,13 +253,13 @@ def ack_bye(opts = {})
[last_Via:]
[last_From:]
[last_To:]
[routes]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:#{@from_user}@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 100
User-Agent: #{USER_AGENT}
Content-Length: 0
[routes]
ACK
@scenario << new_send(msg, opts)
end
Expand Down

0 comments on commit 17fbc65

Please sign in to comment.