select codec from client list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again :)

I found define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER and run-time method
pjmedia_sdp_neg_set_prefer_remote_codec_order() which solve my problem.

I call run-time method in pjsua callback on_incoming_call() as:

 pjsua_call *call;
 pjsip_dialog *dlg;
 pj_status_t status;

status = acquire_call("ESip::on_incoming_call()", call_id, &call, &dlg);
if (status == PJ_SUCCESS) {
    status = pjmedia_sdp_neg_set_prefer_remote_codec_order( call->inv-
>neg,PJ_FALSE);
    if (status != PJ_SUCCESS) {
         PJ_LOG(3,("ESip", "Can't set \"codec select\" from local side!!"));
    }

    pjsip_dlg_dec_lock(dlg);

} else {
    PJ_LOG(3,("ESip", "Can't acquire_call!!!!"));
}

but when codec  L16/8000/1 is set to highest priority my application  in 
windows crash when i call method:
pjsua_call_answer()

crash:
file: pool.c
method: static void reset_pool(pj_pool_t *pool)
line:246:    block = block->prev;
local variables:
	pool	0x00d45aa8 {prev=0xfeeefeee next=0xfeeefeee obj_name=0x00d45ab0 
	factory	0xfeeefeee {policy={...} create_pool=??? release_pool=??? ...}	
	factory_data	0xfeeefeee	void *
	capacity	4277075694	unsigned int
	increment_size	4277075694	unsigned int
	block_list	{prev=0xfeeefeee next=0xfeeefeee buf=0xfeeefeee <Bad Ptr> ...}	
	callback	0xfeeefeee	void (pj_pool_t *, unsigned int)*

it seems the object pool is invalid...


in linux i get error:

13:21:07.320 pjsua_call.c  Unable to create media session: Unknown error 
220103 [status=220103]
 13:21:07.324   pjsua_core.c  TX 998 bytes Response msg 488/INVITE/cseq=102 
(tdta0x1efd58) to UDP 192.168.32.123:5060:
SIP/2.0 488 Not Acceptable Here                                                                                       
Via: SIP/2.0/UDP 
192.168.32.123:5060;rport=5060;received=192.168.32.123;branch=z9hG4bK6bc82d9a                        
Call-ID: 7040e7232f2769d86f05042c564eba90 at 192.168.32.123                                                              
From: "pc4" <sip:pc4@192.168.32.123>;tag=as2ebd9d40                                                                   
To: <sip:pc2 at 192.168.32.17>;tag=-gLm8NiD0PjorU33UJc9xoQUXgPjHj4l                                                      
CSeq: 102 INVITE                                                                                                      
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, 
MESSAGE, OPTIONS                            
Supported: replaces, 100rel, timer, norefersub                                                                        
Content-Type: application/sdp                                                                                         
Content-Length:   478                                                                                                 

v=0
o=- 3486280867 3486280867 IN IP4 192.168.32.17
s=pjmedia                                     
c=IN IP4 192.168.32.17                        
t=0 0
m=audio 4004 RTP/AVP 105 3 103 102 0 8 9 109 104 101
a=rtcp:4005 IN IP4 192.168.32.17
a=rtpmap:105 L16/8000
a=rtpmap:3 GSM/8000
a=rtpmap:103 speex/16000
a=rtpmap:102 speex/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:109 iLBC/8000
a=fmtp:109 mode=30
a=rtpmap:104 speex/32000
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

--end msg--
 13:21:07.333   pjsua_call.c  Error creating response: Unknown error 170488 
[status=170488]


These errors occurred only when one side have disable L16/8000/1 codec. When i 
enable codec and i set highest priority for both side it works.

some hint?

thanks


> Hello all
> When server send list of codec in INVITE:
>
> a=rtpmap:0 PCMU/8000
> a=rtpmap:3 GSM/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:112 AAL2-G726-32/8000
> a=rtpmap:5 DVI4/8000
> a=rtpmap:10 L16/8000
> a=rtpmap:7 LPC/8000
> a=rtpmap:102 speex/8000
> a=rtpmap:111 G726-32/8000
>
> and in my application is list of codec defined as:
>
> a=rtpmap:3 GSM/8000
> a=rtpmap:112 L16/48000/2
> a=rtpmap:111 L16/48000
> a=rtpmap:110 L16/32000/2
> a=rtpmap:109 L16/32000
> a=rtpmap:108 L16/16000/2
> a=rtpmap:107 L16/16000
> a=rtpmap:106 L16/8000/2
> a=rtpmap:105 L16/8000
> a=rtpmap:10 L16/44100/2
> a=rtpmap:11 L16/44100
> a=rtpmap:9 G722/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:113 iLBC/8000
> a=fmtp:113 mode=30
> a=rtpmap:104 speex/32000
> a=rtpmap:102 speex/8000
> a=rtpmap:103 speex/16000
>
> My application do not select first aplication codec
> a=rtpmap:3 GSM/8000 but first server codec
> a=rtpmap:0 PCMU/8000
>
> Exists some way how can i set pjsip stack for selecting first codec from
> client and not from server? I want prefer list of codecs from my
> application.
>
> thanks




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux