[pjsip] help add "algorithm=MD5" (huaming.zeng)

huaming.zeng huaming.zeng at mogenesis.com
Sun Dec 6 20:42:02 EST 2009


hi all:
I have found it:
just add in the pjsua_app.c:
case OPT_USE_IMS: /* Activate IMS settings */
    cur_acc->auth_pref.initial_auth = PJ_TRUE;
cur_acc->auth_pref.algorithm = pj_str("MD5");//add this line
    break;


2009-12-07 



曾华明(Zenghuaming)
Mob:13911375643   Tel: 010-64391081
Fax: 010-64391082   MSN: zenghuaming at hotmail.com
北京创世互动科技有限公司
Beijing Genesis Interactive Technology co.,Ltd.

本邮件(包括任何附件)含有机密资料并受法律保护。如您不是正确的收件人,请勿阅读本邮件的内容,请立即回复本邮件告知发件人,并请您立即删除本邮件并销毁所有拷贝信息。如您已经阅读了本邮件,请对邮件内容进行保密,不要使用、复制、揭露、传播到任何第三方。谢谢您的合作。
This email (including any attachments hereto) is intended only for the named recipient above and contains confidential and legally privileged information. In case that you have received this email in error or are not the intended recipient of this email, please do not read the content of this email and please immediately notify the sender by replying this email, delete it from your computer system, and destroy all hard copies hereof. Should you have already learned any matters of this email, you shall treat all information contained herein in confidence and shall not use, reproduce, disclose and distribute it to any third party. Thank you for your cooperation. 



发件人: pjsip-request 
发送时间: 2009-12-06  22:03:59 
收件人: pjsip 
抄送: 
主题: pjsip Digest, Vol 28, Issue 12 
 
Send pjsip mailing list submissions to
pjsip at lists.pjsip.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
or, via email, send a message with subject or body 'help' to
pjsip-request at lists.pjsip.org
You can reach the person managing the list at
pjsip-owner at lists.pjsip.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of pjsip digest..."
Today's Topics:
   1. Re: Multiple concurent UDP transports (Liu Jahow)
   2. help add "algorithm=MD5" (huaming.zeng)
   3. Call Recording - Simple question (Jose Suarez)
   4. Re: Three way Calling (???)
----------------------------------------------------------------------
Message: 1
Date: Sun, 6 Dec 2009 12:03:02 +0800
From: Liu Jahow <jahowliu at gmail.com>
Subject: Re: [pjsip] Multiple concurent UDP transports
To: pjsip list <pjsip at lists.pjsip.org>
Message-ID:
<19229f700912052003n471cd256j33e78c08b768b98e at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi,
As far as I know, for UDP, there will be only one entry with the same
transport type in the transport manager even if we register multi transports
with the same type but different ports. It seems that transport manager will
accept the new one registration to replace the last one. But those
transports we create still do work and just we can't see them in transport
manager.
Besides, we need to close our UDP transport ourself if we want to use the
PJSUA_DESTROY to close the PJSUA. Because PJSUA_DESTROY will only destroy
the transport manager and it only have idea that it has only one UDP
transport, the last transport.
2009/12/5 Alexandre Savard <alexandre.savard at savoirfairelinux.com>
> Hi,
>
> Our softphone support mulltiple sip accounts and we would like to support
> per
> account transport management (i.e. binding transport to a specific
> interface, use stun per account).
>
> I noticed the following in pjsip:
>
> We create a standard sip udp transport at initialization,
> pjsip_tpmgr_get_transport_count returns 1
>
> [sfl-debug] Number of transport: 1
> 17:47:12.994 sip_transport.   Outstanding transmit buffers: 0
> 17:47:12.994 sip_transport.   Dumping listeners:
> 17:47:12.994 sip_transport.   Dumping transports:
> 17:47:12.994 sip_transport.    udp0x1de8910 udp 0.0.0.0:5060 [published as
> 192.168.50.182:5060] (refcnt=1)
>
> If, for example,  we create a new udp transport using STUN ,
> pjsip_tpmgr_get_transport_count still return 1
>
> [sfl-debug] Number of transport: 1
>  17:57:50.630 sip_transport.   Outstanding transmit buffers: 0
>  17:57:50.630 sip_transport.   Dumping listeners:
>  17:57:50.630 sip_transport.   Dumping transports:
>  17:57:50.630 sip_transport.   udp0x9b7260 udp 0.0.0.0:56268 [published as
> 208.88.110.46:63516] (refcnt=1)
>
> Looking at the code, transport_attach registers the account in the
> transport manager's hashtable using the transport type and address family,
> which are the same for both transport. The entry in the hashtable is set to
> NULL and the newly created transport takes its place.
>
> I can still receive calls on my two accounts even
>
> Answer INVITE request using transport: udp0x9b7260 udp 0.0.0.0:56268[published as
> 208.88.110.46:63516] (refcnt=3)
> Answer INVITE request using transport: udp0x7849e0 udp 0.0.0.0:5060 [published as
> 192.168.50.182:5060] (refcnt=9)
>
>
> So, my question is: How this fact (having two transport of the same type)
> affects the behavior of the library?
> I noticed taht reference counting looked like inaccurate.
>
> Since this feature could be interesting for our application, would it be
> hard to implement it in PJSIP. I saw that we could specify an remote IP
> address (which is inittialized at 0) as a key in transport manager's hash
> table.
>
> Thanks,
>
> Alexandre
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
-- 
Best Regards,
Alex Liu
foxconn mail : alex.ch.liu at ambit.com.tw
private mail : jahowliu at gmail.com
msn : jahowliu at yahoo.com.tw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091206/0e5cbd3e/attachment-0001.html>
------------------------------
Message: 2
Date: Sun, 6 Dec 2009 14:32:34 +0800
From: "huaming.zeng" <huaming.zeng at mogenesis.com>
Subject: [pjsip] help add "algorithm=MD5"
To: "pjsip" <pjsip at lists.pjsip.org>
Message-ID: <200912061432342964805 at mogenesis.com>
Content-Type: text/plain; charset="gb2312"
hi all:
How can I append the "algorithm=MD5" string to the Authorization header;
///////////////////////////////////////////////////////////////////////////////////////////////
REGISTER sip:open-ims.test SIP/2.0
Via: SIP/2.0/UDP 192.168.1.107:5060;rport;branch=z9hG4bKPj70cdc9dd45d847f2bdfc0f398364194c
Route: <sip:192.168.1.111;lr>
From: <sip:alice at open-ims.test>;tag=b87864cedb1245f2b0468a982cf3e64f
To: <sip:alice at open-ims.test>
Call-ID: e92972a790954d1b88b04094bc754e5f
CSeq: 38705 REGISTER
Authorization: Digest username="alice at open-ims.test", realm="open-ims.test", nonce="", uri="sip:open-ims.test", response=""
Require: pref
User-Agent: PJSUA v1.4-trunk/win32
Contact: <sip:alice at 192.168.1.107:5060>
Expires: 300
Content-Length:  0
//
the correct one is :
Authorization: Digest username="18811041901 at bjmcc.com",realm="bjmcc.com",nonce="",uri="sip:bjmcc.com",response="", algorithm=MD5 
//this is my cfg file
# This is a comment in the config file.
--id sip:alice at open-ims.test
--registrar sip:open-ims.test
--realm open-ims.test
--username alice
--password alice
--proxy sip:192.168.1.111;lr
--use-ims
--username alice at open-ims.test
--password alice
--publish
--realm open-ims.test
2009-12-06 
????Zenghuaming?
Mob:13911375643   Tel: 010-64391081
Fax: 010-64391082   MSN: zenghuaming at hotmail.com
????????????
Beijing Genesis Interactive Technology co.,Ltd.
???(??????)??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
This email (including any attachments hereto) is intended only for the named recipient above and contains confidential and legally privileged information. In case that you have received this email in error or are not the intended recipient of this email, please do not read the content of this email and please immediately notify the sender by replying this email, delete it from your computer system, and destroy all hard copies hereof. Should you have already learned any matters of this email, you shall treat all information contained herein in confidence and shall not use, reproduce, disclose and distribute it to any third party. Thank you for your cooperation. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091206/a29ea7bf/attachment-0001.html>
------------------------------
Message: 3
Date: Sun, 6 Dec 2009 03:47:42 -0300
From: "Jose Suarez" <jsuarez at padirac.com.ar>
Subject: [pjsip] Call Recording - Simple question
To: "pjsip list" <pjsip at lists.pjsip.org>
Message-ID: <9623662CB2D84ABFA8C6E92274DFB992 at pc1>
Content-Type: text/plain; charset="iso-8859-1"
Hi all, I want to record a call. I'm developing an automatic dialer. I make a call and then play a wav file. During that call I want to record it. For do that I do the following function:
CDialerSIP::e_i_SIP_RetRecord CDialerSIP::record ()
{
         pj_status_t pjStatus;
         std::string strLog;
         std::stringstream ssLog;
     
         pjStatus = pjsua_recorder_create (&(pj_str("./record.wav")),0,NULL,0,0,&m_pjRecorderId);
         if (pjStatus != PJ_SUCCESS)
         {
              m_oLogger.write ("record - pjsua_record_create - Fall?.", CDialerLogger::iLogError);
              return CDialerSIP::i_Record_Error;
         }
         pjStatus = pjsua_conf_connect ( pjsua_call_get_conf_port(m_pjCallId), pjsua_recorder_get_conf_port(m_pjRecorderId));

         if (pjStatus != PJ_SUCCESS)
         {
              m_oLogger.write ("record - pjsua_conf_connect - Fall?.", CDialerLogger::iLogError);
              return CDialerSIP::i_Record_Error;
         }
         sleep (10);
         pjsua_conf_disconnect (pjsua_call_get_conf_port(m_pjCallId), pjsua_player_get_conf_port(m_pjRecorderId));

         pjStatus = pjsua_recorder_destroy (m_pjRecorderId);
         if (pjStatus != PJ_SUCCESS)
         {
              m_oLogger.write ("record - pjsua_recorder_destroy - Fall?.", CDialerLogger::iLogError);
              return CDialerSIP::i_Record_Error;
         }
         ssLog << "record - Ok";

         strLog = ssLog.str();

         m_oLogger.write (strLog, CDialerLogger::iLogInformation);

         return CDialerSIP::i_Record_Normal;
    }
m_pjCallId and m_pjRecorderId are members of the CDialerSIP' class.
I recorder during 10 senconds, in that time I'm playing a wav file, so the recorder file should contain samples of that file, but the recorder file only has silence with very loud noise, in that noise you can hear very very loud the samples of the playing file. Do you know what happen? 
Thanks in advance
Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091206/3654279b/attachment-0001.html>
------------------------------
Message: 4
Date: Sun, 6 Dec 2009 21:56:03 +0800
From: ??? <zbluecn at gmail.com>
Subject: Re: [pjsip] Three way Calling
To: pjsip list <pjsip at lists.pjsip.org>
Message-ID:
<b498b6700912060556q288891fcn6e2510515bd68ff3 at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Use asterisk
On 12/4/09, Wong Peter <peterapiit at gmail.com> wrote:
> Hello to all, does anyone know how to three way calling ?
>
> Thanks.
>
> --
> Linux
>
-- 
Sent from my mobile device
Experiences Of Code
--=============--
emailto://zbluecn@gmail.com
mobile:13611156504
http://blog.csdn.net/zblue78
msn://zbluecn@hotmail.com
------------------------------
_______________________________________________
pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
End of pjsip Digest, Vol 28, Issue 12
*************************************
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4664 (20091206) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091207/dbd18f90/attachment.html>


More information about the pjsip mailing list