* [gentoo-user] how to patch the asterisk ebuild
@ 2006-10-21 16:54 Kitti Jaisong
2006-10-21 17:43 ` Régis Décamps
2006-10-21 22:13 ` Anielkis Herrera Gonzalez
0 siblings, 2 replies; 3+ messages in thread
From: Kitti Jaisong @ 2006-10-21 16:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1.1: Type: text/plain, Size: 246 bytes --]
Hi all,
somebody know how to patch the software via ebuild. i need to patch the asterisk.1.2.13 in part of chan_sip.c for correct the silencesupp in the huawei softswitch. but i dont know how to correct in the ebuild
Thanks,
kitti
[-- Attachment #1.2: Type: text/html, Size: 657 bytes --]
[-- Attachment #2: huawei.patch --]
[-- Type: application/octet-stream, Size: 2730 bytes --]
--- chan_sip_old.c 2006-10-18 03:37:18.000000000 +0700
+++ chan_sip_new.c 2006-10-20 16:48:21.000000000 +0700
@@ -605,6 +605,7 @@ static struct sip_pvt {
unsigned int flags; /*!< SIP_ flags */
int timer_t1; /*!< SIP timer T1, ms rtt */
unsigned int sipoptions; /*!< Supported SIP sipoptions on the other end */
+ int silence_supp; /*!< Show/Hide silenceSupp from header */
int capability; /*!< Special capability (codec) */
int jointcapability; /*!< Supported capability at both ends (codecs ) */
int peercapability; /*!< Supported peer capability */
@@ -768,6 +769,7 @@ struct sip_peer {
char cid_num[80]; /*!< Caller ID num */
char cid_name[80]; /*!< Caller ID name */
int callingpres; /*!< Calling id presentation */
+ int silence_supp; /*!< Show/Hide silenceSupp from header */
int inUse; /*!< Number of calls in use */
int call_limit; /*!< Limit of concurrent calls */
char vmexten[AST_MAX_EXTENSION]; /*!< Dialplan extension for MWI notify message*/
@@ -1879,6 +1881,7 @@ static int create_addr_from_peer(struct
}
ast_copy_flags(r, peer, SIP_FLAGS_TO_COPY);
+ r->silence_supp = peer->silence_supp;
r->capability = peer->capability;
r->prefs = peer->prefs;
if (r->rtp) {
@@ -4605,9 +4608,10 @@ static int add_sdp(struct sip_request *r
&a_audio_next, &a_audio_left,
debug);
}
-
- ast_build_string(&a_audio_next, &a_audio_left, "a=silenceSupp:off - - - -\r\n");
-
+ /* Show hide silenceSupp from header */
+ if (p->silence_supp){
+ ast_build_string(&a_audio_next, &a_audio_left, "a=silenceSupp:off ----\r\n");
+ }
if ((m_audio_left < 2) || (m_video_left < 2) || (a_audio_left == 0) || (a_video_left == 0))
ast_log(LOG_WARNING, "SIP SDP may be truncated due to undersized buffer!!\n");
@@ -12367,6 +12371,7 @@ static struct sip_peer *build_peer(const
peer->rtpkeepalive = global_rtpkeepalive;
peer->maxms = default_qualify;
peer->prefs = prefs;
+ perr->silence_supp = TRUE;
oldha = peer->ha;
peer->ha = NULL;
peer->addr.sin_family = AF_INET;
@@ -12530,6 +12535,14 @@ static struct sip_peer *build_peer(const
ast_log(LOG_WARNING, "Qualification of peer '%s' should be 'yes', 'no', or a number of milliseconds at line %d of sip.conf\n", peer->name, v->lineno);
peer->maxms = 0;
}
+ } else if (!strcasecmp(v->name, "silencesupp")) {
+ if (!strcasecmp(v->value, "hide")) {
+ peer->silence_supp = FALSE;
+ } else if (!strcasecmp(v->value, "show")) {
+ peer->silence_supp = TRUE;
+ } else {
+ ast_log(LOG_WARNING, "silencesupp bad param on %s just use: 'show' or 'hide'\n", peer->name);
+ }
}
/* else if (strcasecmp(v->name,"type"))
* ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] how to patch the asterisk ebuild
2006-10-21 16:54 [gentoo-user] how to patch the asterisk ebuild Kitti Jaisong
@ 2006-10-21 17:43 ` Régis Décamps
2006-10-21 22:13 ` Anielkis Herrera Gonzalez
1 sibling, 0 replies; 3+ messages in thread
From: Régis Décamps @ 2006-10-21 17:43 UTC (permalink / raw
To: gentoo-user
On 10/21/06, Kitti Jaisong <kittij@ttt.co.th> wrote:
>
>
>
>
> Hi all,
> somebody know how to patch the software via ebuild. i need to patch the
> asterisk.1.2.13 in part of chan_sip.c for correct the silencesupp in the
> huawei softswitch. but i dont know how to correct in the ebuild
>
You need to have your own ebuild thanks to a "portage overlay"
http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1
--
Régis
http://regis.decamps.info/blog/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] how to patch the asterisk ebuild
2006-10-21 16:54 [gentoo-user] how to patch the asterisk ebuild Kitti Jaisong
2006-10-21 17:43 ` Régis Décamps
@ 2006-10-21 22:13 ` Anielkis Herrera Gonzalez
1 sibling, 0 replies; 3+ messages in thread
From: Anielkis Herrera Gonzalez @ 2006-10-21 22:13 UTC (permalink / raw
To: gentoo-user
you can do it, making you own ebuild: copying the original to your
overlay and using the function epatch.. remember to update the
digest( ebuild <name.ebuild> digest)
On Sat, 2006-10-21 at 23:54 +0700, Kitti Jaisong wrote:
>
> Hi all,
> somebody know how to patch the software via ebuild. i need to
> patch the asterisk.1.2.13 in part of chan_sip.c for correct the
> silencesupp in the huawei softswitch. but i dont know how to correct
> in the ebuild
>
> Thanks,
>
> kitti
>
--
________________________________________________________
Ing. Anielkis Herrera González
Desarrollador de Nova LNX
Linux User #377809
Universidad de las Ciencias Informáticas
Cuba
________________________________________________________
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-21 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-21 16:54 [gentoo-user] how to patch the asterisk ebuild Kitti Jaisong
2006-10-21 17:43 ` Régis Décamps
2006-10-21 22:13 ` Anielkis Herrera Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox