<div dir="ltr"><div><div style>Thanks Saul. Will try to use this script as a base for my script :)</div><div style><br></div><div style>I'm not sure whether I have to use STUN server. <br></div><div style>I tried using "sip-session" or "sip-audio-session" script with and without STUN server configured and RTP worked both ways. And those calls were made to/from EC2 instance.</div>
<div><br></div><div style>This is slightly out of topic, but the only problem I have with both of those scripts is that they send DTMF as RTP events even if the account is configured to use inband ones. </div><div style><div>
I've enabled inband dtmf by:<br></div><div>sip-settings -a set <span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span> rtp.inband_dtmf=True</div>
</div><div style><div><br></div><div>To configure a STUN server for my account [ I used one out of many listed here <a href="http://www.tek-tips.com/faqs.cfm?fid=7542" target="_blank">http://www.tek-tips.com/faqs.cfm?fid=7542</a> ] I run:<br>
</div><div>sip-settings -a set <span style="font-size:13px;color:rgb(38,38,38);font-family:arial,sans-serif;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span> nat_traversal.stun_server_list='<a href="http://stun.ekiga.net/" target="_blank">stun.ekiga.net</a>'<br>
</div><div><br></div></div><div style>Here's how I launch the scripts:</div><div>sip-session --auto-answer -S -c ~/.sipclient -a <span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span><br>
</div><div>sip-audio-session --auto-answer -S -c ~/.sipclient -a <span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span><br>
</div><div><br></div><div style>When I use "sip-session" to call my desk phone, and I use "/dtmf {0-9}" command, then on desk phone I can barely hear some really faint and really short signal which presumably is the DTMF.</div>
<div style>When I use "sip-audio-session" to answer incoming calls from my desk phone, when I press keys on my phone then all tones are send as RTP events.</div><div><br></div><div style>I could attach pcap files but they're stripped off automatically :)</div>
<div><br></div><div><div>Here's my config file: ~/.sipclient/config</div><div><div>Accounts:</div><div>    <span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span></div>
<div>        enabled = true</div><div>        auth:</div><div>            password = some_password</div><div><br></div><div>        nat_traversal:</div><div>            stun_server_list = "<a href="http://stun.ekiga.net:3478">stun.ekiga.net:3478</a>",</div>
<div><br></div><div>        rtp:</div><div>            audio_codec_list = PCMA,</div><div>            inband_dtmf = true</div><div><br></div><div>        sip:</div><div>            outbound_proxy = "nat.<span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="http://myaccount.com">myaccount.com</a></span>:5065;transport=udp"</div>
<div><br></div><div>SIPSimpleSettings:</div><div>    default_account = <span style="color:rgb(38,38,38);font-family:arial,sans-serif;font-size:13px;line-height:16px"><a href="mailto:user@myaccount.com">user@myaccount.com</a></span></div>
<div>    instance_id = "urn:uuid:e83fa8c5-80b1-482f-bb2a-e9dd7bdd9ef8"</div><div>    audio:</div><div>        alert_device =</div><div>        input_device =</div><div>        output_device =</div></div></div><div>
<br></div><div><br></div><div><br></div><div></div></div><div><br></div><div style><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 June 2013 17:31, Saúl Ibarra Corretgé <span dir="ltr"><<a href="mailto:saul@ag-projects.com" target="_blank">saul@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
On Jun 25, 2013, at 4:55 PM, Janusz Kowalczyk wrote:<br>
<br>
> Hi Guys,<br>
><br>
> I'm trying to use SipSimple SDK write test scripts that will be executed with fabric on a remote machine without a soundcard (ie. Amazon EC2) and which would dial in to our voice service and play back some wav files and/or DTMF's.<br>

><br>
><br>
> At the moment I'm trying to use modified version of Saul's "jamesbond" script<br>
> <a href="https://github.com/saghul/sipsimple-examples/tree/master/jamesbond" target="_blank">https://github.com/saghul/sipsimple-examples/tree/master/jamesbond</a><br>
> to make a call and play a wav file once call is established. Modified script is at the end of email.<br>
><br>
> The problem is that there's no incoming RTP stream. I doubled check firewall rules and UDP traffic is allowed on all ports. I've attached a pcap file from an example call.<br>
><br>
> I'd be grateful if you could help me to figure out what's the problem.<br>
><br>
<br>
</div>Unless your service does NAT traversal you'll not be able to get inbound RTP, because you are running from a private IP address, unless there is direct routing between the two endpoints, which I'm assuming there isn't.<br>

<div class="im"><br>
> btw. Is there a good and simple example script that would make unattended calls, play wav files and DTMF tones?<br>
><br>
<br>
</div>Have a look at sip-audio-session script, it's part of the sipclients package. It doesn't play DTMF, but shouldn't be hard to add.<br>
<br>
<br>
Cheers,<br>
<br>
--<br>
Saúl Ibarra Corretgé<br>
AG Projects<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Zapraszam na swojego foto-bloga: <a href="http://na100procentchyba.wordpress.com/">http://na100procentchyba.wordpress.com/</a><br>Autopodpis: Staraj się używać pola Ukryty do Wiadomości (UDW) przy wysyłaniu wiadomości do wielu odbiorców, ograniczysz przez to rozprzestrzenianie się spamu!<br>
Autosignature: Try to use field BCC (blind carbon copy) when sending message to many recepients, it will restrain spread of spam!
</div>