[asterisk-dev] Problem doing SIP/RTP with an Asterisk to another Asterisk that has PSTN card

Abelenda Diego diego.abelenda at domo-safety.com
Tue Aug 28 08:19:13 CDT 2012


Hello,

I have something weird I am trying to make an application that
does a dialog over the audio stream with a "server".

My test case is :

Asterisk_client -- SIP --> Asterisk_server -> Playback(audiofile)

My real case is :
Asterisk_client -- SIP --> SIP_Provider(Asterisk) -- PSTN --> server


My test case works without problem. But in the real case I don't get
any audio stream.

I tried with Wireshark to see what happens and the only difference is
that I get a 183 Progress Message from the server. But no stream begins.
When I call the same SIP provider with Ekiga, the softphone sends some
magic RTP packet (containing 0x00 only) and then the SIP provider
starts sending the audio stream.

In the application I use ast_request_and_dial so the 183 progress is
completely unseen. ast_request_and_dial returns no problem with state
UP but when using ast_waitfor() I just wait until the timeout and get
nothing (20sec timeout where I should get silence). As said before
wireshark doesn't detect any RTP packet from the server to my Asterisk,
and I send silence using silence_generator.

My Asterisk configuration look like this :
    sip.conf :
	disallow=all
	allow=ulaw:50
	jbenable=no
	realm=domosafety.com
	dtmfmode=inband

	[fakeserver]
	type=peer
	port=5060
	host=<host>
	username=<username>
	defaultuser=<username>
	fromuser=<username>
	touser=<username>
	secret=<password>
	canreinvite=yes
	context=ServerContext
	qualify=yes
	progressinband=yes
	insecure=invite,port

	[realserver]
	type=peer
	port=5060
	host=<host>
	username=<username>
	defaultuser=<username>
	fromuser=<username>
	touser=<username>
	secret=<password>
	canreinvite=yes
	context=ServerContext
	qualify=yes
	progressinband=yes
	insecure=invite,port
 
    extensions.conf:
	[ServerContext]
	exten => realserver,1,Dial(SIP/<number>@realserver)
	exten => fakeservre,1,Dial(SIP/<number>@fakeserver)


I am out of ideas as to why I have this problem... someone has some tip
for me ?

I put everything that seemed related in my configuration but nothing
changed.

Thank you in advance for any reply.

Best regards,
Diego Abelenda




More information about the asterisk-dev mailing list